tmisu

Notification to stdout daemon
git clone https://git.inz.fi/tmisu/
Log | Files | Refs | README | LICENSE

tmisu.h (1909B)


      1 #ifndef TMISU_H
      2 #define TMISU_H
      3 
      4 #include <stdio.h>
      5 #include <string.h>
      6 #include <dbus/dbus.h>
      7 
      8 extern char print_json;
      9 
     10 struct notification_data {
     11 	const char *app_name;
     12 	dbus_uint32_t replaces;
     13 	const char *icon;
     14 	const char *summary;
     15 	const char *body;
     16 	DBusMessageIter actions;
     17 	DBusMessageIter hints;
     18 	dbus_int32_t expiry_ms;
     19 };
     20 
     21 #define INTROSPECTION_XML "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"\
     22 	"<node>\n"\
     23 	"   <interface name=\"org.freedesktop.Notifications\">\n"\
     24 	"       <method name=\"Notify\">\n"\
     25 	"            <arg direction=\"in\"  type=\"s\"     name=\"app_name\"/>\n"\
     26 	"            <arg direction=\"in\"  type=\"u\""\
     27 	" name=\"replaces_id\"/>\n"\
     28 	"            <arg direction=\"in\"  type=\"s\"     name=\"app_icon\"/>\n"\
     29 	"            <arg direction=\"in\"  type=\"s\"     name=\"summary\"/>\n"\
     30 	"            <arg direction=\"in\"  type=\"s\"     name=\"body\"/>\n"\
     31 	"            <arg direction=\"in\"  type=\"as\"    name=\"actions\"/>\n"\
     32 	"            <arg direction=\"in\"  type=\"a{sv}\" name=\"hints\"/>\n"\
     33 	"            <arg direction=\"in\"  type=\"i\""\
     34 	" name=\"expire_timeout\"/>\n"\
     35 	"            <arg direction=\"out\" type=\"u\""\
     36 	" name=\"id\"/>\n"\
     37 	"       </method>\n"\
     38 	"        <method name=\"GetServerInformation\">\n"\
     39 	"            <arg direction=\"out\" type=\"s\" name=\"name\"/>\n"\
     40 	"            <arg direction=\"out\" type=\"s\" name=\"vendor\"/>\n"\
     41 	"            <arg direction=\"out\" type=\"s\" name=\"version\"/>\n"\
     42 	"            <arg direction=\"out\" type=\"s\" name=\"spec_version\"/>\n"\
     43 	"        </method>\n"\
     44 	"        <method name=\"GetCapabilities\">\n"\
     45 	"            <arg type=\"as\" name=\"capabilities\" direction=\"out\"/>\n"\
     46 	"        </method>\n"\
     47 	"   </interface>\n"\
     48 	"</node>"
     49 
     50 #define INTROSPECTION_NODE_XML "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"\
     51 	"<node>\n"\
     52 	"	<node name=\"%.*s\"/>\n"\
     53 	"</node>"
     54 
     55 #endif