1 #ifndef _ELM_SYS_NOTIFY_EO_LEGACY_H_
2 #define _ELM_SYS_NOTIFY_EO_LEGACY_H_
3 
4 #ifndef _ELM_SYS_NOTIFY_EO_CLASS_TYPE
5 #define _ELM_SYS_NOTIFY_EO_CLASS_TYPE
6 
7 typedef Eo Elm_Sys_Notify;
8 
9 #endif
10 
11 #ifndef _ELM_SYS_NOTIFY_EO_TYPES
12 #define _ELM_SYS_NOTIFY_EO_TYPES
13 
14 /** System notification server types
15  *
16  * @ingroup Elm_Sys_Notify
17  */
18 typedef enum
19 {
20   ELM_SYS_NOTIFY_SERVER_NONE = 0, /**< No notificationserver (disables
21                                    * notifications) */
22   ELM_SYS_NOTIFY_SERVER_DBUS = 1 /* 1 >> 0 */ /**< Use DBus as a notification
23                                                * server */
24 } Elm_Sys_Notify_Server;
25 
26 /** The reason the notification was closed
27  *
28  * @since 1.8
29  *
30  * @ingroup Elm_Sys_Notify
31  */
32 typedef enum
33 {
34   ELM_SYS_NOTIFY_CLOSED_EXPIRED = 0, /**< The notification expired */
35   ELM_SYS_NOTIFY_CLOSED_DISMISSED, /**< The notification was dismissed by the
36                                     * user */
37   ELM_SYS_NOTIFY_CLOSED_REQUESTED, /**< The notification was closed by a call to
38                                     * CloseNotification method */
39   ELM_SYS_NOTIFY_CLOSED_UNDEFINED /**< Undefined/reserved reasons */
40 } Elm_Sys_Notify_Closed_Reason;
41 
42 /** Data on event when notification closed is emitted
43  *
44  * @since 1.8
45  *
46  * @ingroup Elm_Sys_Notify
47  */
48 typedef struct _Elm_Sys_Notify_Notification_Closed
49 {
50   unsigned int id; /**< ID of the notification */
51   Elm_Sys_Notify_Closed_Reason reason; /**< The reason the notification was
52                                         * closed */
53 } Elm_Sys_Notify_Notification_Closed;
54 
55 /** Data on event when the action invoked is emitted
56  *
57  * @since 1.8
58  *
59  * @ingroup Elm_Sys_Notify
60  */
61 typedef struct _Elm_Sys_Notify_Action_Invoked
62 {
63   unsigned int id; /**< ID of the notification */
64   char *action_key; /**< The key of the action invoked. These match the keys
65                      * sent over in the list of actions */
66 } Elm_Sys_Notify_Action_Invoked;
67 
68 
69 #endif
70 
71 /**
72  * @brief Set the notifications server to be used.
73  *
74  * @note This is an advanced function that should be used only to fulfill very
75  * specific purposes. Use elm_need_sys_notify() which activates the default
76  * available notification servers.
77  *
78  * @param[in] obj The object.
79  * @param[in] servers Binary mask of servers to enable. If a server is not
80  * present in the binary mask but was previously registered, it will be
81  * unregistered.
82  *
83  * @return @c true on success, @c false on failure
84  *
85  * @since 1.17
86  *
87  * @ingroup Elm_Sys_Notify_Group
88  */
89 EAPI Eina_Bool elm_sys_notify_servers_set(Elm_Sys_Notify *obj, Elm_Sys_Notify_Server servers);
90 
91 /**
92  * @brief Get the notification servers that have been registered
93  *
94  * @param[in] obj The object.
95  *
96  * @return Binary mask of servers to enable. If a server is not present in the
97  * binary mask but was previously registered, it will be unregistered.
98  *
99  * @since 1.17
100  *
101  * @ingroup Elm_Sys_Notify_Group
102  */
103 EAPI Elm_Sys_Notify_Server elm_sys_notify_servers_get(const Elm_Sys_Notify *obj);
104 
105 /**
106  * @brief Returns the singleton instance of the notification manager
107  * Elm.Sys_Notify. It is initialized upon the first call of this function
108  *
109  * @return The unique notification manager
110  *
111  * @since 1.17
112  *
113  * @ingroup Elm_Sys_Notify_Group
114  */
115 EAPI Elm_Sys_Notify *elm_sys_notify_singleton_get(void);
116 
117 #endif
118