[GnomeMeeting-devel-list] (4/4) Dbus and gnomemeeting : scripting



Hi,

last but not least, I use the following files to help me in my developpment work : clean and compile to, well, clean and compile respectively my sources to/from the bare minimum. And the python code has an example of each call to each method ; I generally paste the first lines of it into a new python interpreter, then give orders depending what I want to test.

So to test the dbus component, the complete setup is :
* use the compile script to get dbus-helper, gnomemeeting [it's also the dbus-component's executable name!] and gnomemeeting-remote ; * run them + a python interpreter (+ optionnally dbus-monitor to watch what gets on the 'wire') ; * give orders to everyone through dbus, using either the remote or the python script ; * watch everything react as expected -- and warn me if something strange or wrong happens.

Thanks,

Snark
#!/bin/sh

rm -rf aclocal.m4 AUTHORS autom4te.cache ChangeLog config.guess config.log config.status config.sub configure COPYING depcomp INSTALL install-sh Makefile Makefile.in missing NEWS README *-marshal.[ch] *-stub.h *.service *~
#!/bin/sh

aclocal

touch NEWS README AUTHORS ChangeLog

automake -a -c

autoconf

./configure

make
import dbus
bus = dbus.SessionBus()

obj = bus.get_object ('net.gnomemeeting.helper', '/net/gnomemeeting/helper')
helper = dbus.Interface(obj, 'net.gnomemeeting.helper')
obj = bus.get_object ('net.gnomemeeting.instance', '/net/gnomemeeting/instance')
accounts = dbus.Interface(obj, 'net.gnomemeeting.accounts')
calls = dbus.Interface(obj, 'net.gnomemeeting.calls')
self = dbus.Interface(obj, 'net.gnomemeeting.self')

helper.GetVersion()
helper.GetSupportedProtocols()

accounts.GetAccountsList ()
accounts.Register ('foo')
accounts.Unregister ('foo')
accounts.ResignalAccountState ('foo')

calls.GetCallsList ()
calls.Connect ('sip:bar')
calls.Disconnect ('token')
calls.PlayPause ('token')
calls.Transfer ('token', 'sip:foo')
calls.ResignalCallInfo ('token')

self.GetLocalAddress ('SIP')
self.GetName ()
self.GetLocation ()
self.GetComment ()
self.Shutdown ()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]