e_notify_private.h
Go to the documentation of this file.
1 #ifndef E_NOTIFY_PRIVATE_H
2 #define E_NOTIFY_PRIVATE_H
3 
4 #define E_NOTIFICATION_BUS_NAME "org.freedesktop.Notifications"
5 #define E_NOTIFICATION_INTERFACE "org.freedesktop.Notifications"
6 #define E_NOTIFICATION_PATH "/org/freedesktop/Notifications"
7 
8 #define e_notification_call_new(member) dbus_message_new_method_call(E_NOTIFICATION_BUS_NAME, E_NOTIFICATION_PATH, E_NOTIFICATION_INTERFACE, member)
9 
10 typedef void (*E_DBus_Variant_Marshaller) (DBusMessageIter *iter, void *data);
11 #define E_DBUS_VARIANT_MARSHALLER(x) ((E_DBus_Variant_Marshaller)(x))
12 
13 void e_notify_marshal_dict_variant(DBusMessageIter *iter, const char *key, char *type_str, E_DBus_Variant_Marshaller func, void *data);
14 void e_notify_marshal_dict_string(DBusMessageIter *iter, const char *key, const char *value);
15 void e_notify_marshal_dict_byte(DBusMessageIter *iter, const char *key, char value);
16 void e_notify_marshal_dict_int(DBusMessageIter *iter, const char *key, int value);
17 
18 void e_notify_marshal_string_array(DBusMessageIter *iter, const char **strings);
19 void e_notify_marshal_string_list_as_array(DBusMessageIter *iter, Eina_List *strings);
20 Eina_List * e_notify_unmarshal_string_array_as_list(DBusMessageIter *iter, DBusError *err);
21 DBusMessage * e_notify_marshal_get_capabilities();
22 DBusMessage * e_notify_marshal_get_capabilities_return(DBusMessage *method_call, const char **capabilities);
23 void * e_notify_unmarshal_get_capabilities_return(DBusMessage *msg, DBusError *err);
26 DBusMessage * e_notify_marshal_get_server_information_return(DBusMessage *method_call, const char *name, const char *vendor, const char *version, const char *spec_version);
27 void * e_notify_unmarshal_get_server_information_return(DBusMessage *msg, DBusError *err);
29 DBusMessage * e_notify_marshal_close_notification(dbus_uint32_t id);
30 dbus_uint32_t e_notify_unmarshal_close_notification(DBusMessage *msg, DBusError *err);
31 DBusMessage * e_notify_marshal_notification_closed_signal(dbus_uint32_t id, dbus_uint32_t reason);
33 DBusMessage * e_notify_marshal_action_invoked_signal(dbus_uint32_t id, const char *action_id);
35 DBusMessage * e_notify_marshal_notify(E_Notification *n);
36 E_Notification * e_notify_unmarshal_notify(DBusMessage *msg, DBusError *err);
37 DBusMessage * e_notify_marshal_notify_return(DBusMessage *method_call, dbus_uint32_t notification_id);
38 void * e_notify_unmarshal_notify_return(DBusMessage *msg, DBusError *err);
39 void e_notify_free_notify_return(void *data);
40 void e_notify_unmarshal_notify_actions(E_Notification *n, DBusMessageIter *iter);
41 void e_notify_unmarshal_notify_hints(E_Notification *n, DBusMessageIter *iter);
42 void e_notify_marshal_hint_image(DBusMessageIter *iter, E_Notification_Image *img);
44 void loginit(void);
45 extern int _e_dbus_notify_log_dom;
46 
47 #ifndef E_DBUS_COLOR_DEFAULT
48 #define E_DBUS_COLOR_DEFAULT EINA_COLOR_CYAN
49 #endif
50 
51 #undef DBG
52 #undef INF
53 #undef WRN
54 #undef ERR
55 
56 #define DBG(...) EINA_LOG_DOM_DBG(_e_dbus_notify_log_dom, __VA_ARGS__)
57 #define INF(...) EINA_LOG_DOM_INFO(_e_dbus_notify_log_dom, __VA_ARGS__)
58 #define WRN(...) EINA_LOG_DOM_WARN(_e_dbus_notify_log_dom, __VA_ARGS__)
59 #define ERR(...) EINA_LOG_DOM_ERR(_e_dbus_notify_log_dom, __VA_ARGS__)
60 
62 {
63  int width;
64  int height;
65  int rowstride;
66  char has_alpha;
68  int channels;
69  unsigned char *data;
70 };
71 
73 {
74  int id;
75  const char *app_name;
76  unsigned int replaces_id;
77  const char *app_icon;
78  const char *summary;
79  const char *body;
81 
82  Eina_List *actions;
83 
84  struct
85  {
86  char urgency;
87  const char *category;
88  const char *desktop;
89  const char *sound_file;
90  const char *image_path;
92  int x, y;
95  } hints;
96 
98  unsigned char closed;
99 
100  int refcount;
101 };
102 
104 {
105  const char *id;
106  const char *name;
107 };
108 
109 #endif