[maemo-developers] [maemo-developers] osso rpc call with argument : looking for python example

From: Pierre Amadio pierre.amadio at libertysurf.fr
Date: Sat Feb 10 14:57:39 EET 2007

I do not understand how to send arguments with libosso.

I have 2 python script: rapier and rapierbg.
I would like rapier to send a rpc call to rapierbg.

I have created the /usr/share/dbus-1/services/rapierbg.service file with
the following content:
[D-BUS Service]

In rapier, i have the following code to start the rpc request:

                    "org.maemo.rapierbg", "do_something")

In rapierbg i have:

osso_c = osso.Context("org.maemo.rapierbg", "0.0.1", False)
osso_rpc = osso.Rpc(osso_c)
                          "org.maemo.rapierbg", callback_func,osso_c)

as well as the following definition:

def callback_func(interface, method, arguments, user_data):
    print "A RPC received"
    print "interface=",interface
    print "arguments=",arguments
    print "user_data=",user_data

Now, things sort of work when i launch rapier, callbac_func is called
and i see 'A RPC received' being printed on the console.

If i try to add somes arguments in rapier this way:

                    "org.maemo.rapierbg", "do_something",args)

Then, it looks like callback_func is not being called at all.

Any idea as to how to send arguments or what error i may have made would be appreciated.

Pierre Amadio

More information about the maemo-developers mailing list