Add notification hide event type and get/set hide time API
[platform/core/api/notification.git] / include / notification_internal.h
index a12d443..e90cd7d 100644 (file)
@@ -36,6 +36,11 @@ typedef enum _notification_ongoing_value_type {
        NOTIFICATION_ONGOING_VALUE_TYPE_TIME,
 } notification_ongoing_value_type_e;
 
+typedef enum _notification_event_type_extension {
+       NOTIFICATION_EVENT_TYPE_HIDDEN_BY_USER = 100,
+       NOTIFICATION_EVENT_TYPE_HIDDEN_BY_TIMEOUT = 101,
+} notification_event_type_extension_e;
+
 /**
  * @addtogroup NOTIFICATION_INTERNAL
  * @{
@@ -916,7 +921,7 @@ int notification_set_ongoing_value_type(notification_h noti, notification_ongoin
 }
  * @endcode
  */
-EXPORT_API int nofication_get_ongoing_time(notification_h noti, int *current, int *duration);
+int nofication_get_ongoing_time(notification_h noti, int *current, int *duration);
 
 /**
  * @brief Sets the notification ongoing time when ongoint type value is set NOTIFICATION_ONGOING_VALUE_TYPE_TIME.
@@ -956,7 +961,76 @@ EXPORT_API int nofication_get_ongoing_time(notification_h noti, int *current, in
 }
  * @endcode
  */
-EXPORT_API int nofication_set_ongoing_time(notification_h noti, int current, int duration);
+int nofication_set_ongoing_time(notification_h noti, int current, int duration);
+
+/**
+ * @brief Gets the time that notification is hidden.
+ * @since_tizen 3.0
+ * @param[in] noti     The notification handle
+ * @param[out] timeout The timeout time
+ * @return #NOTIFICATION_ERROR_NONE on success,
+ *         otherwise any other value on failure
+ * @retval #NOTIFICATION_ERROR_NONE         Success
+ * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Notification handle should be created by notification_create().
+ * @see #notification_event_type_extension_e
+ * @par Sample code:
+ * @code
+#include <notification.h>
+...
+{
+       notification_h noti = NULL;
+       int noti_err = NOTIFICATION_ERROR_NONE;
+       int timeout;
+
+       noti = notification_create(NOTIFICATION_TYPE_NOTI);
+       if (noti == NULL) {
+               return;
+       }
+
+       noti_err  = notification_get_hide_timeout(noti, &timeout)
+       if (noti_err != NOTIFICATION_ERROR_NONE) {
+               notification_free(noti);
+               return;
+       }
+}
+ * @endcode
+ */
+int nofication_get_hide_timeout(notification_h noti, int *timeout);
+
+/**
+ * @brief Sets the time that notification is hidden.
+ * @since_tizen 3.0
+ * @param[in] noti     The notification handle
+ * @param[in] timeout  The timeout time
+ * @return #NOTIFICATION_ERROR_NONE on success,
+ *         otherwise any other value on failure
+ * @retval #NOTIFICATION_ERROR_NONE         Success
+ * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @pre Notification handle should be created by notification_create().
+ * @see #notification_event_type_extension_e
+ * @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_hide_timeout(noti, 10)
+       if (noti_err != NOTIFICATION_ERROR_NONE) {
+               notification_free(noti);
+               return;
+       }
+}
+ * @endcode
+ */
+int nofication_set_hide_timeout(notification_h noti, int timeout);
 
 /**
  * @brief This function translate localized texts