ANN: mickeydbus 0.9
Emanuele Leomanni
emanuele183 at gmail.com
Tue Jul 8 17:15:33 CEST 2008
This is very great,
thank you Michael...life with dbus is easier now...
Emanuele
On Tue, Jul 8, 2008 at 4:21 PM, Michael 'Mickey' Lauer <mickey at openmoko.org>
wrote:
> Hi,
>
> with the framework we see an increasing amount of dbus interaction. Since
> the
> syntax of dbus-send is quite a pain, I decided to write something
> lean-and-mean to facilitate interaction and introspection with dbus.
>
> I'm pleased to announce mickeydbus 0.9. Grab it @
> git://git.freesmartphone.org/python-helpers.git/mickeydbus -- note that it
> needs python-dbus.
>
> Here is an example session:
>
> 1.) Find out which bus names are currently registered, -s means 'check for
> system bus'. Without -s it's going to look on the session bus):
>
> root at om-gta02:~# mdbus -s
> :1.0
> :1.1
> :1.2
> :1.42
> :1.47
> :1.60
> :1.61
> org.bluez
> org.freedesktop.Avahi
> org.freedesktop.DBus
> org.freesmartphone.frameworkd
> org.freesmartphone.ogsmd
> org.pyneo.muxer
>
> 2.) Find out which objects are served by a certain service:
>
> root at om-gta02:~# mdbus -s org.freesmartphone.frameworkd
> /
> /org
> /org/freesmartphone
> /org/freesmartphone/Framework
> /org/freesmartphone/GSM
> /org/freesmartphone/GSM/Device
> /org/freesmartphone/GSM/Server
>
> 3.) Find out the interface of a certain object:
>
> root at om-gta02:~# mdbus -s
> org.freesmartphone.frameworkd /org/freesmartphone/Framework
> [METHOD] org.freedesktop.DBus.Introspectable.Introspect()
> [METHOD] org.freesmartphone.Objects.ListObjectsByInterface( s:interface
> )
>
> root at om-gta02:~# mdbus -s
> org.freesmartphone.frameworkd /org/freesmartphone/GSM/Device
> [METHOD] org.freesmartphone.GSM.Call.Activate( i:index )
> [METHOD] org.freesmartphone.GSM.Call.ActivateConference( i:index )
> [METHOD] org.freesmartphone.GSM.Call.HoldActive()
> [METHOD] org.freesmartphone.GSM.Call.Initiate( s:number, s:type_ )
> [METHOD] org.freesmartphone.GSM.Call.Release( i:index )
> [METHOD] org.freesmartphone.GSM.Call.ReleaseAll()
> [METHOD] org.freesmartphone.GSM.Call.ReleaseHeld()
> [SIGNAL] org.freesmartphone.GSM.Call.CallStatus( i:index, s:status,
> a{sv}:properties )
> [METHOD] org.freedesktop.DBus.Introspectable.Introspect()
> [METHOD] org.freesmartphone.GSM.Device.CancelCommand()
> [METHOD] org.freesmartphone.GSM.Device.GetAntennaPower()
> [METHOD] org.freesmartphone.GSM.Device.GetFeatures()
> [METHOD] org.freesmartphone.GSM.Device.GetInfo()
> [METHOD] org.freesmartphone.GSM.Device.PrepareForSuspend()
> [METHOD] org.freesmartphone.GSM.Device.RecoverFromSuspend()
> [METHOD] org.freesmartphone.GSM.Device.SetAntennaPower( b:power )
> [METHOD] org.freesmartphone.GSM.SIM.ChangeAuthCode( s:old_pin, s:new_pin
> )
> [METHOD] org.freesmartphone.GSM.SIM.DeleteEntry( i:index )
> [METHOD] org.freesmartphone.GSM.SIM.DeleteMessage( i:index )
> [METHOD] org.freesmartphone.GSM.SIM.GetAuthStatus()
> [METHOD] org.freesmartphone.GSM.SIM.GetImsi()
> [METHOD] org.freesmartphone.GSM.SIM.GetMessagebookInfo()
> [METHOD] org.freesmartphone.GSM.SIM.GetPhonebookInfo()
> [METHOD] org.freesmartphone.GSM.SIM.GetServiceCenterNumber()
> [METHOD] org.freesmartphone.GSM.SIM.GetSimCountryCode()
> [METHOD] org.freesmartphone.GSM.SIM.GetSubscriberNumbers()
> [METHOD] org.freesmartphone.GSM.SIM.RetrieveEntry( i:index )
> [METHOD] org.freesmartphone.GSM.SIM.RetrieveMessage( i:index )
> [METHOD] org.freesmartphone.GSM.SIM.RetrieveMessagebook( s:category )
> [METHOD] org.freesmartphone.GSM.SIM.RetrievePhonebook()
> [METHOD] org.freesmartphone.GSM.SIM.SendAuthCode( s:code )
> [METHOD] org.freesmartphone.GSM.SIM.SetServiceCenterNumber( s:number )
> [METHOD] org.freesmartphone.GSM.SIM.StoreEntry( i:index, s:name,
> s:number )
> [METHOD] org.freesmartphone.GSM.SIM.StoreMessage( s:number, s:contents )
> [METHOD] org.freesmartphone.GSM.SIM.Unlock( s:puk, s:new_pin )
> [SIGNAL] org.freesmartphone.GSM.SIM.AuthStatus( s:status )
> [SIGNAL] org.freesmartphone.GSM.SIM.NewMessage( i:index )
> [METHOD] org.freesmartphone.GSM.Network.DisableCallForwarding( s:reason,
> s:class_ )
> [METHOD] org.freesmartphone.GSM.Network.EnableCallForwarding( s:reason,
> s:class_, s:number, i:timeout )
> [METHOD] org.freesmartphone.GSM.Network.GetCallForwarding( s:reason )
> [METHOD] org.freesmartphone.GSM.Network.GetCallingIdentification()
> [METHOD] org.freesmartphone.GSM.Network.GetNetworkCountryCode()
> [METHOD] org.freesmartphone.GSM.Network.GetSignalStrength()
> [METHOD] org.freesmartphone.GSM.Network.GetStatus()
> [METHOD] org.freesmartphone.GSM.Network.ListProviders()
> [METHOD] org.freesmartphone.GSM.Network.Register()
> [METHOD] org.freesmartphone.GSM.Network.RegisterWithProvider(
> i:operator_code )
> [METHOD] org.freesmartphone.GSM.Network.SetCallingIdentification(
> s:status )
> [METHOD] org.freesmartphone.GSM.Network.Unregister()
> [SIGNAL] org.freesmartphone.GSM.Network.SignalStrength( i:strength )
> [SIGNAL] org.freesmartphone.GSM.Network.Status( a{sv}:status )
> [METHOD] org.freesmartphone.GSM.PDP.ActivateContext( s:apn, s:user,
> s:password )
> [METHOD] org.freesmartphone.GSM.PDP.DeactivateContext()
> [METHOD] org.freesmartphone.GSM.PDP.GetCurrentGprsClass()
> [METHOD] org.freesmartphone.GSM.PDP.ListAvailableGprsClasses()
> [METHOD] org.freesmartphone.GSM.PDP.SetCurrentGprsClass( s:class_ )
> [SIGNAL] org.freesmartphone.GSM.PDP.ContextStatus( i:index, s:status,
> a{sv}:properties )
> [METHOD] org.freesmartphone.GSM.Test.Command( s:command )
> [METHOD] org.freesmartphone.GSM.Test.Echo( s:echo )
>
> 4.) Call a method on an interface:
>
> root at om-gta02:~# mdbus -s
> org.freesmartphone.frameworkd /org/freesmartphone/GSM/Device
> org.freesmartphone.GSM.Device.GetInfo
> /org/freesmartphone/GSM/Device: GetInfo ->
> dbus.Dictionary({dbus.String(u'imei'): dbus.String(u'354651011602234',
> variant_level=1), dbus.String(u'model'): dbus.String(u'Neo1973 Embedded GSM
> Modem', variant_level=1), dbus.String(u'revision'): dbus.String(u'HW: GTA,
> GSM: gsm_ac_gp_fd_pu_em_cph_ds_vc_cal35_ri_36_amd8_ts0-Moko9-beta1',
> variant_level=1), dbus.String(u'manufacturer'):
> dbus.String(u'FIC/OpenMoko',
> variant_level=1)}, signature=dbus.Signature('sv'))
>
> root at om-gta02:~#
>
> The next version will also feature a signal listening mode and some
> structure
> output beautifying.
>
> Comments?
>
> Cheers,
>
> Mickey.
>
> _______________________________________________
> smartphones-standards mailing list
> smartphones-standards at linuxtogo.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-standards
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxtogo.org/pipermail/smartphones-standards/attachments/20080708/5821c9da/attachment-0001.htm>
More information about the smartphones-standards
mailing list