summaryrefslogtreecommitdiff
path: root/include/notification.h
diff options
context:
space:
mode:
authorKyuho Jo <kyuho.jo@samsung.com>2015-04-21 15:28:12 +0900
committerKyuho Jo <kyuho.jo@samsung.com>2015-04-22 11:14:20 +0900
commit956ddf2e3c442282f1076cfebd3a72d8d520fc42 (patch)
tree21a5f148f5655589aec79b51092f38f1955f11d5 /include/notification.h
parent44e2f4831958f38840103e2c96868b108293c761 (diff)
downloadnotification-956ddf2e3c442282f1076cfebd3a72d8d520fc42.tar.gz
notification-956ddf2e3c442282f1076cfebd3a72d8d520fc42.tar.bz2
notification-956ddf2e3c442282f1076cfebd3a72d8d520fc42.zip
1. new public API set for setting/getting permissions of the notification.
2. new internal API set for setting/getting property of settings. Change-Id: I982fce9538d11d6465a02e6abb4f91431e1145f8 Signed-off-by: Kyuho Jo <kyuho.jo@samsung.com>
Diffstat (limited to 'include/notification.h')
-rwxr-xr-xinclude/notification.h77
1 files changed, 76 insertions, 1 deletions
diff --git a/include/notification.h b/include/notification.h
index f371f8a..84b30f1 100755
--- a/include/notification.h
+++ b/include/notification.h
@@ -854,7 +854,7 @@ int notification_get_property(notification_h noti,
return;
}
- noti_err = notification_set_display_applist(noti, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_TICKER);
+ noti_err = notification_set_display_applist(noti, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY | NOTIFICATION_DISPLAY_APP_TICKER | NOTIFICATION_DISPLAY_APP_INDICATOR);
if(noti_err != NOTIFICATION_ERROR_NONE) {
notification_free(noti);
return;
@@ -1661,6 +1661,81 @@ int notification_delete_all(notification_type_e type);
int notification_post(notification_h noti);
/**
+ * @brief Sets permissions to application for updating or deletin the notification
+ * @since_tizen 2.4
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/notification
+ * @param[in] noti Notification handle
+ * @param[in] permission_type permission type
+ * @param[in] app_id target application id
+ * @return #NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval #NOTIFICATION_ERROR_NONE Success
+ * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
+ * @see #notification_get_permission
+ * @see #notification_permission_type_e
+ * @see #notification_h
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ notification_h noti = NULL;
+ int noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti = notification_create(NOTIFICATION_TYPE_NOTI);
+ if(noti == NULL) {
+ return;
+ }
+ ...
+
+ noti_err = notification_set_permission(noti, NOTIFICATION_PERMISSION_TYPE_DELETE, "org.tizen.xxx");
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+int notification_set_permission(notification_h handle, notification_permission_type_e permission_type, const char *app_id);
+
+/**
+ * @brief Gets permissions of the notification
+ * @remarks app_id must not be freed. This will be free with notification_free.
+ * @since_tizen 2.4
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/notification
+ * @param[in] noti Notification handle
+ * @param[out] permission_type permission type
+ * @param[out] app_id target application id
+ * @return #NOTIFICATION_ERROR_NONE if success, other value if failure
+ * @retval #NOTIFICATION_ERROR_NONE Success
+ * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #NOTIFICATION_ERROR_PERMISSION_DENIED The application does not have the privilege to call this method
+ * @see #notification_set_permission
+ * @see #notification_permission_type_e
+ * @see #notification_h
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+ int noti_err = NOTIFICATION_ERROR_NONE;
+ notification_permission_type_e permission_type;
+ const char *app_id = NULL;
+
+ ...
+
+ noti_err = notification_get_permission(noti, &permission_type, &app_id);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+}
+ * @endcode
+ */
+int notification_get_permission(notification_h handle, notification_permission_type_e *permission_type, const char **app_id);
+
+
+/**
* @}
*/