|
|
2014-01-07
, 21:28
|
|
|
Posts: 3,404 |
Thanked: 4,474 times |
Joined on Oct 2005
@ Germany
|
#2
|
| The Following 5 Users Say Thank You to pycage For This Useful Post: | ||
|
|
2014-01-07
, 22:04
|
|
|
Posts: 2,351 |
Thanked: 5,243 times |
Joined on Jan 2009
@ Barcelona
|
#3
|
|
|
2014-01-08
, 08:49
|
|
|
Posts: 141 |
Thanked: 267 times |
Joined on May 2010
@ Germany
|
#4
|
#!/usr/bin/python
import dbus
bus = dbus.SessionBus()
object = bus.get_object('org.freedesktop.Notifications','/org/freedesktop/Notifications')
interface = dbus.Interface(object,'org.freedesktop.Notifications')
#print(interface.GetCapabilities())
interface.Notify("app_name",
0,
"/usr/share/icons/hicolor/86x86/apps/harbour-tidings.png",
"Here is the title",
"and here the body",
dbus.Array(),
dbus.Array(),
0)
| The Following 20 Users Say Thank You to EmaNymton For This Useful Post: | ||
benny1967, Daneel, evk, Faz, jalomann, juiceme, Kaacz, kimmoli, mattaustin, mgbler, OVK, pycage, rcolistete, richardski, rolfok, Schturman, szopin, thedead1440, Transcend, zamorph | ||
|
|
2014-01-08
, 08:54
|
|
|
Posts: 562 |
Thanked: 2,744 times |
Joined on Dec 2013
@ Espoo, Finland
|
#5
|
|
|
2014-01-08
, 10:06
|
|
|
Posts: 562 |
Thanked: 2,744 times |
Joined on Dec 2013
@ Espoo, Finland
|
#7
|

signal sender=:1.198 -> dest=(null destination) serial=590 path=/org/freedesktop/Telepathy/Connection/gabble/jabber/gmail_2ecom_1a4623dead_5f0xdabeef; interface=org.freedesktop.Telepathy.Connection.Interface.SimplePresence; member=PresencesChanged
array [
dict entry(
uint32 21
struct {
uint32 3
string "away"
string "Hell yeah!!!
"
}
)
]
signal sender=:1.433 -> dest=(null destination) serial=12 path=/com/google/code/AccountsSSO/SingleSignOn/AuthSession_0; interface=com.google.code.AccountsSSO.SingleSignOn.AuthSession; member=stateChanged
int32 8
string "The request is started successfully"
method return sender=:1.433 -> dest=:1.34 reply_serial=848
array [
dict entry(
string "Secret"
variant string "plaintextpassword"
)
dict entry(
string "UserName"
variant string "youmightquessthisone"
)
]
|
|
2014-01-08
, 10:23
|
|
|
Posts: 141 |
Thanked: 267 times |
Joined on May 2010
@ Germany
|
#8
|

#!/usr/bin/python
import dbus
bus = dbus.SessionBus()
object = bus.get_object('org.freedesktop.Notifications','/org/freedesktop/Notifications')
interface = dbus.Interface(object,'org.freedesktop.Notifications')
#print(interface.GetCapabilities())
interface.Notify("app_name",
0,
"icon-m-notifications",
"Here is the title",
"and here the body",
dbus.Array(["default", ""]),
dbus.Dictionary({"x-nemo-preview-body": "preview body",
"x-nemo-preview-summary": "preview summary"},
signature='sv'),
0)
| The Following 10 Users Say Thank You to EmaNymton For This Useful Post: | ||
|
|
2014-01-08
, 10:36
|
|
|
Posts: 562 |
Thanked: 2,744 times |
Joined on Dec 2013
@ Espoo, Finland
|
#9
|
|
|
2014-01-08
, 19:26
|
|
Posts: 80 |
Thanked: 51 times |
Joined on Feb 2010
@ Finland
|
#10
|
first of all, I'm not an expert using dbus but I wonder, if it is possible to use dbus to show messages on the event-screen of sailfish like on the N9. I started with dbus-monitor and logged for example an incoming email notification:
... method call sender=:1.33 -> dest=org.freedesktop.Notifications serial=1070 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify string "messageserver5" uint32 0 string "" string "MY_NAME" string "HEADER_OF_MAIL" array [ string "default" string "" ] array [ dict entry( string "x-nemo.email.published-messages" variant string "1400" ) dict entry( string "category" variant string "x-nemo.email" ) dict entry( string "x-nemo-item-count" variant int32 1 ) dict entry( string "x-nemo-timestamp" variant string "2014-01-07T19:38:53Z" ) dict entry( string "x-nemo-preview-body" variant string "HEADER_OF_MAIL" ) dict entry( string "x-nemo-remote-action-default" variant string "com.jolla.email.ui /com/jolla/email/ui com.jolla.email.ui openMessage AAAAAgAAAAV4" ) dict entry( string "x-nemo-preview-summary" variant string "MY_NAME" ) ] int32 -1 ...The error message is weird, because Notify is a known method
[nemo@localhost ~]$ dbus-send --session --type=method_call --print-reply --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.DBus.Introspectable.Introspect method return sender=:1.29 -> dest=:1.807 reply_serial=2 string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> <node> <interface name="org.freedesktop.Notifications"> <method name="GetCapabilities"> <arg direction="out" type="as" name="capabilities"/> </method> <method name="Notify"> <arg direction="in" type="s" name="app_name"/> <arg direction="in" type="u" name="replaces_id"/> <arg direction="in" type="s" name="app_icon"/> <arg direction="in" type="s" name="summary"/> <arg direction="in" type="s" name="body"/> <arg direction="in" type="as" name="actions"/> <arg direction="in" type="a{sv}" name="hints"/> <arg direction="in" type="i" name="expire_timeout"/> <arg direction="out" type="u" name="id"/> <annotation value="QVariantHash" name="org.qtproject.QtDBus.QtTypeName.In6"/> </method> <method name="CloseNotification"> <arg direction="in" type="u" name="id"/> </method> <method name="GetServerInformation"> <arg direction="out" type="s"/> <arg direction="out" type="s" name="name"/> <arg direction="out" type="s" name="vendor"/> <arg direction="out" type="s" name="version"/> </method> <signal name="NotificationClosed"> <arg type="u" name="id"/> <arg type="u" name="reason"/> </signal> <signal name="ActionInvoked"> <arg type="u" name="id"/> <arg type="s" name="action_key"/> </signal> <method name="GetNotifications"> <arg direction="in" type="s" name="app_name"/> <arg direction="out" type="a(sussasa{sv}i)" name="notifications"/> <annotation value="NotificationList" name="org.qtproject.QtDBus.QtTypeName.Out0"/> </method> </interface> <interface name="org.freedesktop.DBus.Properties"> <method name="Get"> <arg name="interface_name" type="s" direction="in"/> <arg name="property_name" type="s" direction="in"/> <arg name="value" type="v" direction="out"/> </method> <method name="Set"> <arg name="interface_name" type="s" direction="in"/> <arg name="property_name" type="s" direction="in"/> <arg name="value" type="v" direction="in"/> </method> <method name="GetAll"> <arg name="interface_name" type="s" direction="in"/> <arg name="values" type="a{sv}" direction="out"/> <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/> </method> </interface> <interface name="org.freedesktop.DBus.Introspectable"> <method name="Introspect"> <arg name="xml_data" type="s" direction="out"/> </method> </interface> <interface name="org.freedesktop.DBus.Peer"> <method name="Ping"/> <method name="GetMachineId"> <arg name="machine_uuid" type="s" direction="out"/> </method> </interface> </node> "