summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/NotificationProxy.c5
-rw-r--r--src/NotificationProxy.h14
2 files changed, 2 insertions, 17 deletions
diff --git a/src/NotificationProxy.c b/src/NotificationProxy.c
index 5ae59f2..cba12b9 100644
--- a/src/NotificationProxy.c
+++ b/src/NotificationProxy.c
@@ -236,8 +236,7 @@ np_error_t np_observe_notification( np_client_t client, const char *notification
236 * @param client The client to send to 236 * @param client The client to send to
237 * @param notification_spec Specification of the notifications that should be 237 * @param notification_spec Specification of the notifications that should be
238 * observed. This is expected to be an array of const char* that MUST have a 238 * observed. This is expected to be an array of const char* that MUST have a
239 * terminating NULL entry. However this parameter can be NULL; in this case, 239 * terminating NULL entry.
240 * the default set of notifications will be used.
241 * 240 *
242 * @return NP_E_SUCCESS on success, NP_E_INVALID_ARG when client is null, 241 * @return NP_E_SUCCESS on success, NP_E_INVALID_ARG when client is null,
243 * or an error returned by np_observe_notification. 242 * or an error returned by np_observe_notification.
@@ -253,7 +252,7 @@ np_error_t np_observe_notifications(np_client_t client, const char **notificatio
253 } 252 }
254 253
255 if (!notifications) { 254 if (!notifications) {
256 notifications = np_default_notifications; 255 return NP_E_INVALID_ARG;
257 } 256 }
258 257
259 while (notifications[i]) { 258 while (notifications[i]) {
diff --git a/src/NotificationProxy.h b/src/NotificationProxy.h
index 84f1f89..ea993c5 100644
--- a/src/NotificationProxy.h
+++ b/src/NotificationProxy.h
@@ -31,20 +31,6 @@ struct np_client_int {
31 GThread *notifier; 31 GThread *notifier;
32}; 32};
33 33
34static const char *np_default_notifications[11] = {
35 NP_SYNC_SUSPEND_REQUEST,
36 NP_SYNC_RESUME_REQUEST,
37 NP_PHONE_NUMBER_CHANGED,
38 NP_SYNC_CANCEL_REQUEST,
39 NP_DEVICE_NAME_CHANGED,
40 NP_ATTEMPTACTIVATION,
41 NP_DS_DOMAIN_CHANGED,
42 NP_APP_INSTALLED,
43 NP_APP_UNINSTALLED,
44 NP_ITDBPREP_DID_END,
45 NULL
46};
47
48gpointer np_notifier(gpointer arg); 34gpointer np_notifier(gpointer arg);
49 35
50#endif 36#endif