*/
notification_h notification_list_get_data(notification_list_h list);
+
+/**
+ * @brief Gets a number of the notification list.
+ * @since_tizen 3.0
+ * @param[in] list Notification list handle
+ * @return A number of notification list handle on success, 0 on failure
+ * @exception #NOTIFICATION_ERROR_NONE Success
+ * @exception #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
+ * @see #notification_list_h
+ * @see #notification_h
+ * @par Sample code:
+ * @code
+include <notification.h>
+...
+{
+ int count = 0;
+ notification_list_h noti_list = NULL;
+ int noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_get_detail_list(pkgname, group_id, priv_id, -1, ¬i_list);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
+
+ count = notification_list_get_count(noti_list);
+}
+ * @endcode
+ */
+int notification_list_get_count(notification_list_h list);
+
/**
* @brief Appends notification data to the notification list.
* @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif
return cur_list->noti;
}
+EXPORT_API int notification_list_get_count(notification_list_h list)
+{
+ int count = 0;
+ notification_list_h cur_list = NULL;
+
+ if (list == NULL) {
+ NOTIFICATION_ERR("INVALID DATA : list == NULL");
+ set_last_result(NOTIFICATION_ERROR_INVALID_PARAMETER);
+ return 0;
+ }
+
+ cur_list = notification_list_get_head(list);
+
+ while (cur_list != NULL) {
+ count++;
+ cur_list = cur_list->next;
+ }
+
+ set_last_result(NOTIFICATION_ERROR_NONE);
+ return count;
+}
+
EXPORT_API notification_list_h notification_list_append(notification_list_h list,
notification_h noti)
{