/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
/**
* This API provides functions for creating and inserting and updating notification.
*
*/
-
-/**
+
+/**
* @internal
* @defgroup NOTIFICATION_LIST Notification List
* @ingroup NOTIFICATION_MODULE
* It provides functions for handling notification list.
*
*/
-
-/**
+
+/**
* @defgroup NOTIFICATION_STATUS Notification Status
* @ingroup NOTIFICATION_MODULE
* @brief APIs displaying plain text message on the indicator area
* Notification status APIs
*
*/
-
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_H__
}
* @endcode
*/
-int notification_set_image(notification_h noti,
- notification_image_type_e type,
- const char *image_path);
+int notification_set_image(notification_h noti, notification_image_type_e type,
+ const char *image_path);
/**
* @brief Gets the absolute path of an image file.
#include <notification.h>
...
{
- char *image_path = NULL;
- int noti_err = NOTIFICATION_ERROR_NONE;
-
- noti_err = notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, &image_path);
- if(noti_err != NOTIFICATION_ERROR_NONE) {
+ char *image_path = NULL;
+ int noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, &image_path);
+ if (noti_err != NOTIFICATION_ERROR_NONE) {
return;
- }
-}
+ }
+ }
* @endcode
*/
-int notification_get_image(notification_h noti,
- notification_image_type_e type,
- char **image_path);
+int notification_get_image(notification_h noti, notification_image_type_e type,
+ char **image_path);
/**
* @brief Sets a timestamp.
{
notification_h noti = NULL;
int noti_err = NOTIFICATION_ERROR_NONE;
-
+
noti = notification_create(NOTIFICATION_TYPE_NOTI);
- if(noti == NULL) {
+ if (noti == NULL) {
return;
}
-
+
noti_err = notification_set_time(noti, time(NULL));
- if(noti_err != NOTIFICATION_ERROR_NONE) {
- notification_free(noti);
- return;
+ if (noti_err != NOTIFICATION_ERROR_NONE) {
+ notification_free(noti);
+ return;
}
}
* @endcode
*/
-int notification_set_time(notification_h noti,
- time_t input_time);
+int notification_set_time(notification_h noti, time_t input_time);
/**
* @brief Gets a timestamp.
...
{
time_t ret_time;
- int noti_err = NOTIFICATION_ERROR_NONE;
-
- noti_err = notification_get_time(noti, &ret_time);
- if(noti_err != NOTIFICATION_ERROR_NONE) {
+ int noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_get_time(noti, &ret_time);
+ if (noti_err != NOTIFICATION_ERROR_NONE) {
return;
- }
-}
+ }
+ }
* @endcode
*/
-int notification_get_time(notification_h noti,
- time_t * ret_time);
+int notification_get_time(notification_h noti, time_t *ret_time);
/**
* @brief Gets an insertion timestamp of the notification.
#include <notification.h>
...
{
- time_t ret_time;
- int noti_err = NOTIFICATION_ERROR_NONE;
-
- noti_err = notification_get_insert_time(noti, &ret_time);
- if(noti_err != NOTIFICATION_ERROR_NONE) {
- return;
- }
+ time_t ret_time;
+ int noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti_err = notification_get_insert_time(noti, &ret_time);
+ if(noti_err != NOTIFICATION_ERROR_NONE) {
+ return;
+ }
}
* @endcode
*/
-int notification_get_insert_time(notification_h noti,
- time_t * ret_time);
+int notification_get_insert_time(notification_h noti, time_t *ret_time);
/**
* @brief Sets the text to display on the notification view.
}
* @endcode
*/
-int notification_set_text(notification_h noti,
- notification_text_type_e type,
- const char *text,
- const char *key,
- int args_type, ...);
+int notification_set_text(notification_h noti, notification_text_type_e type,
+ const char *text, const char *key, int args_type, ...);
/**
* @brief Gets the text from the notification handle.
}
* @endcode
*/
-int notification_get_text(notification_h noti,
- notification_text_type_e type,
- char **text);
+int notification_get_text(notification_h noti, notification_text_type_e type,
+ char **text);
/**
* @brief Sets the timestamp to display on the notification view.
* @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
* @pre Notification handle should be created by notification_create().
*/
-int notification_set_time_to_text(notification_h noti, notification_text_type_e type,
- time_t time);
+int notification_set_time_to_text(notification_h noti,
+ notification_text_type_e type, time_t time);
/**
* @brief Gets the timestamp from the notification handle.
* @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
* @pre Notification handle should be created by notification_create().
*/
-int notification_get_time_from_text(notification_h noti, notification_text_type_e type,
- time_t *time);
+int notification_get_time_from_text(notification_h noti,
+ notification_text_type_e type, time_t *time);
/**
* @brief Sets the sound type for the notification.
* @endcode
*/
int notification_set_sound(notification_h noti,
- notification_sound_type_e type,
- const char *path);
+ notification_sound_type_e type, const char *path);
/**
* @brief Gets the sound type from the notification handle.
* @endcode
*/
int notification_get_sound(notification_h noti,
- notification_sound_type_e *type,
- const char **path);
+ notification_sound_type_e *type, const char **path);
/**
* @brief Sets the vibration type for the notification.
* @endcode
*/
int notification_set_vibration(notification_h noti,
- notification_vibration_type_e type,
- const char *path);
+ notification_vibration_type_e type, const char *path);
/**
* @brief Gets the vibrate type from the notification handle.
* @endcode
*/
int notification_get_vibration(notification_h noti,
- notification_vibration_type_e *type,
- const char **path);
+ notification_vibration_type_e *type, const char **path);
/**
* @brief Sets the LED displaying option.
}
* @endcode
*/
-int notification_set_led(notification_h noti,
- notification_led_op_e operation,
- int led_argb);
+int notification_set_led(notification_h noti, notification_led_op_e operation,
+ int led_argb);
/**
* @brief Gets the LED displaying option from the notification handle.
}
* @endcode
*/
-int notification_get_led(notification_h noti,
- notification_led_op_e *operation,
- int *led_argb);
+int notification_get_led(notification_h noti, notification_led_op_e *operation,
+ int *led_argb);
/**
* @brief Sets the time period of flashing the LED.
}
* @endcode
*/
-int notification_set_led_time_period(notification_h noti,
- int on_ms, int off_ms);
+int notification_set_led_time_period(notification_h noti, int on_ms,
+ int off_ms);
/**
* @brief Gets the time period of flashing the LED from the notification handle.
}
* @endcode
*/
-int notification_get_led_time_period(notification_h noti,
- int *on_ms, int *off_ms);
+int notification_get_led_time_period(notification_h noti, int *on_ms,
+ int *off_ms);
/**
* @brief Sets the launch option for a notification.
* @endcode
*/
int notification_set_launch_option(notification_h noti,
- notification_launch_option_type type, void *option);
+ notification_launch_option_type type, void *option);
/**
* @brief Gets the launch option from the notification handle.
* @endcode
*/
int notification_get_launch_option(notification_h noti,
- notification_launch_option_type type, void *option);
+ notification_launch_option_type type, void *option);
/**
* @brief Sets the handler for a specific event.
}
* @endcode
*/
-int notification_set_event_handler(notification_h noti, notification_event_type_e event_type, app_control_h event_handler);
+int notification_set_event_handler(notification_h noti,
+ notification_event_type_e event_type,
+ app_control_h event_handler);
/**
* @brief Gets the event handler of a specific event.
}
* @endcode
*/
-int notification_get_event_handler(notification_h noti, notification_event_type_e event_type, app_control_h *event_handler);
+int notification_get_event_handler(notification_h noti,
+ notification_event_type_e event_type,
+ app_control_h *event_handler);
/**
* @brief Sets the property of the notification.
}
* @endcode
*/
-int notification_set_property(notification_h noti,
- int flags);
+int notification_set_property(notification_h noti, int flags);
/**
* @brief Gets the property of the notification from the notification handle.
}
* @endcode
*/
-int notification_get_property(notification_h noti,
- int *flags);
+int notification_get_property(notification_h noti, int *flags);
/**
* @brief Sets applications to display the notification.
}
* @endcode
*/
-int notification_set_display_applist(notification_h noti,
- int applist);
+int notification_set_display_applist(notification_h noti, int applist);
/**
* @brief Gets the application list displaying the notification from the notification handle.
}
* @endcode
*/
-int notification_get_display_applist(notification_h noti,
- int *applist);
+int notification_get_display_applist(notification_h noti, int *applist);
/**
* @brief Sets the initial size for the ongoing type.
}
* @endcode
*/
-int notification_set_size(notification_h noti,
- double size);
+int notification_set_size(notification_h noti, double size);
/**
* @brief Gets the progress size.
}
* @endcode
*/
-int notification_get_size(notification_h noti,
- double *size);
+int notification_get_size(notification_h noti, double *size);
/**
* @brief Sets the initial progress for the ongoing type.
}
* @endcode
*/
-int notification_set_progress(notification_h noti,
- double percentage);
+int notification_set_progress(notification_h noti, double percentage);
/**
* @brief Gets the progress from the notification handle.
}
* @endcode
*/
-int notification_get_progress(notification_h noti,
- double *percentage);
+int notification_get_progress(notification_h noti, double *percentage);
/**
* @brief Sets the layout of the notification view.
* @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid input value
* @see #notification_ly_type_e
*/
-int notification_set_layout(notification_h noti,
- notification_ly_type_e layout);
+int notification_set_layout(notification_h noti, notification_ly_type_e layout);
/**
* @brief Gets the layout of the notification view from the notification handle.
}
* @endcode
*/
-int notification_get_type(notification_h noti,
- notification_type_e * type);
+int notification_get_type(notification_h noti, notification_type_e *type);
/**
* @brief Updates notification data.
* @details The updated notification will appear in the notification area.
#include <notification.h>
...
{
- notificaton_h noti = NULL;
+ notificaton_h noti = NULL;
int noti_err = NOTIFICATION_ERROR_NONE;
...
return;
}
-}
+ }
* @endcode
*/
int notification_delete(notification_h noti);
}
* @endcode
*/
-int notification_add_button(notification_h noti, notification_button_index_e button_index);
+int notification_add_button(notification_h noti,
+ notification_button_index_e button_index);
/**
* @brief Removes a button on the notification
}
* @endcode
*/
-int notification_remove_button(notification_h noti, notification_button_index_e button_index);
+int notification_remove_button(notification_h noti,
+ notification_button_index_e button_index);
/**
* @brief Sets the 'auto remove' option of the active notification
#ifdef __cplusplus
}
#endif
-#endif /* __NOTIFICATION_H__ */
+#endif /* __NOTIFICATION_H__ */
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_DB_H__
#define DBPATH tzplatform_mkpath(TZ_SYS_DB, ".notification.db")
#define NOTIFICATION_QUERY_MAX 4096
#define NOTIFICATION_EMPTY_STR ""
-#define NOTIFICATION_CHECK_STR(p) ((p)?(p):NOTIFICATION_EMPTY_STR)
+#define NOTIFICATION_CHECK_STR(p) ((p) ? (p) : NOTIFICATION_EMPTY_STR)
sqlite3 *notification_db_open(const char *dbfile);
-int notification_db_close(sqlite3 ** db);
-int notification_db_exec(sqlite3 * db, const char *query, int *num_changes);
-char *notification_db_column_text(sqlite3_stmt * stmt, int col);
-bundle *notification_db_column_bundle(sqlite3_stmt * stmt, int col);
+int notification_db_close(sqlite3 **db);
+int notification_db_exec(sqlite3 *db, const char *query, int *num_changes);
+char *notification_db_column_text(sqlite3_stmt *stmt, int col);
+bundle *notification_db_column_bundle(sqlite3_stmt *stmt, int col);
+
+#endif /* __NOTIFICATION_DB_H__ */
-#endif /* __NOTIFICATION_DB_H__ */
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_DEBUG_H__
#include <stdio.h>
#define NOTIFICATION_DBG(fmt , args...) \
- do{ \
- printf("[D][%s : %d] "fmt"\n", __func__,__LINE__,##args ); \
- } while(0)
+ do { \
+ printf("[D][%s : %d] "fmt"\n", __func__, __LINE__, ##args); \
+ } while (0)
#define NOTIFICATION_INFO(fmt , args...) \
- do{ \
- printf("[I][%s : %d] "fmt"\n", __func__,__LINE__,##args ); \
- } while(0)
+ do { \
+ printf("[I][%s : %d] "fmt"\n", __func__, __LINE__, ##args); \
+ } while (0)
#define NOTIFICATION_WARN(fmt , args...) \
- do{ \
- printf("[W][%s : %d] "fmt"\n", __func__,__LINE__,##args ); \
- } while(0)
+ do { \
+ printf("[W][%s : %d] "fmt"\n", __func__, __LINE__, ##args); \
+ } while (0)
#define NOTIFICATION_ERR(fmt , args...) \
- do{ \
- printf("[E][%s : %d] "fmt"\n", __func__,__LINE__,##args ); \
- } while(0)
+ do { \
+ printf("[E][%s : %d] "fmt"\n", __func__, __LINE__, ##args); \
+ } while (0)
#else /* _DLOG_H_ */
#define NOTIFICATION_DBG(fmt , args...) \
- do{ \
- SECURE_LOGD("[%s : %d] "fmt"\n",__func__,__LINE__,##args ); \
- } while(0)
+ do { \
+ SECURE_LOGD("[%s : %d] "fmt"\n", __func__, __LINE__, ##args); \
+ } while (0)
#define NOTIFICATION_INFO(fmt , args...) \
- do{ \
- SECURE_LOGI("[%s : %d] "fmt"\n",__func__,__LINE__,##args ); \
- } while(0)
+ do { \
+ SECURE_LOGI("[%s : %d] "fmt"\n", __func__, __LINE__, ##args); \
+ } while (0)
#define NOTIFICATION_WARN(fmt , args...) \
- do{ \
- SECURE_LOGW("[%s : %d] "fmt"\n",__func__,__LINE__,##args ); \
- } while(0)
+ do { \
+ SECURE_LOGW("[%s : %d] "fmt"\n", __func__, __LINE__, ##args); \
+ } while (0)
#define NOTIFICATION_ERR(fmt , args...) \
- do{ \
- SECURE_LOGE("[%s : %d] "fmt"\n",__func__,__LINE__,##args ); \
- } while(0)
+ do { \
+ SECURE_LOGE("[%s : %d] "fmt"\n", __func__, __LINE__, ##args); \
+ } while (0)
#endif /* _DLOG_H_ */
-#endif /* __NOTIFICATION_DEBUG_H__ */
+#endif /* __NOTIFICATION_DEBUG_H__ */
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_ERROR_H__
NOTIFICATION_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */
NOTIFICATION_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
NOTIFICATION_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< out of memory */
- NOTIFICATION_ERROR_IO_ERROR= TIZEN_ERROR_IO_ERROR, /**< I/O error */
+ NOTIFICATION_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
NOTIFICATION_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
NOTIFICATION_ERROR_FROM_DB = TIZEN_ERROR_NOTIFICATION | 0x01, /**< Error from DB query */
NOTIFICATION_ERROR_ALREADY_EXIST_ID = TIZEN_ERROR_NOTIFICATION | 0x02, /**< Already exist private ID */
* @}
*/
-#endif /* __NOTIFICATION_ERROR_H__ */
+#endif /* __NOTIFICATION_ERROR_H__ */
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_GROUP_H__
#include <notification.h>
-NOTIFICATION_DEPRECATED_API int notification_group_set_title(const char *pkgname,
- int group_id,
- const char *title,
- const char *loc_title,
- notification_count_display_type_e count_display);
-
-NOTIFICATION_DEPRECATED_API int notification_group_get_title(const char *pkgname,
- int group_id,
- char **ret_title,
- char **ret_loc_title,
- notification_count_display_type_e *count_display);
-
-NOTIFICATION_DEPRECATED_API int notification_group_set_content(const char *pkgname,
- int group_id,
- const char *content,
- const char *loc_content,
- notification_count_display_type_e count_display);
-
-NOTIFICATION_DEPRECATED_API int notification_group_get_content(const char *pkgname,
- int group_id,
- char **ret_content,
- char **ret_loc_content,
- notification_count_display_type_e *count_display);
-
-NOTIFICATION_DEPRECATED_API int notification_group_set_badge(const char *pkgname,
- int group_id, int count);
-
-NOTIFICATION_DEPRECATED_API int notification_group_get_badge(const char *pkgname,
- int group_id, int *count);
-
-#endif /* __NOTIFICATION_GROUP_H__ */
+NOTIFICATION_DEPRECATED_API int notification_group_set_title(
+ const char *pkgname, int group_id, const char *title,
+ const char *loc_title,
+ notification_count_display_type_e count_display);
+
+NOTIFICATION_DEPRECATED_API int notification_group_get_title(
+ const char *pkgname, int group_id, char **ret_title,
+ char **ret_loc_title,
+ notification_count_display_type_e *count_display);
+
+NOTIFICATION_DEPRECATED_API int notification_group_set_content(
+ const char *pkgname, int group_id, const char *content,
+ const char *loc_content,
+ notification_count_display_type_e count_display);
+
+NOTIFICATION_DEPRECATED_API int notification_group_get_content(
+ const char *pkgname, int group_id, char **ret_content,
+ char **ret_loc_content,
+ notification_count_display_type_e *count_display);
+
+NOTIFICATION_DEPRECATED_API int notification_group_set_badge(
+ const char *pkgname, int group_id, int count);
+
+NOTIFICATION_DEPRECATED_API int notification_group_get_badge(
+ const char *pkgname, int group_id, int *count);
+
+#endif /* __NOTIFICATION_GROUP_H__ */
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_INTERNAL_H__
*/
#define NOTIFICATION_DISPLAY_APP_HEADS_UP NOTIFICATION_DISPLAY_APP_ACTIVE /* To avoid build error */
-#define NOTIFICATION_ERROR (notification_error_quark ())
+#define NOTIFICATION_ERROR (notification_error_quark())
GQuark notification_error_quark(void);
/**
* @see notification_set_execute_option()
*
*/
-NOTIFICATION_DEPRECATED_API int notification_set_args(notification_h noti, bundle * args, bundle * group_args); /* Do not use this */
+NOTIFICATION_DEPRECATED_API int notification_set_args(notification_h noti, bundle *args, bundle *group_args); /* Do not use this */
/**
* @brief This function will be deprecated.
* @see notification_get_execute_option()
*
*/
-NOTIFICATION_DEPRECATED_API int notification_get_args(notification_h noti, bundle ** args, bundle ** group_args); /* Do not use this */
+NOTIFICATION_DEPRECATED_API int notification_get_args(notification_h noti, bundle **args, bundle **group_args); /* Do not use this */
/**
* @brief This function is deprecated.
{
int noti_err = NOTIFICATION_ERROR_NONE;
int group_id, priv_id;
-
+
noti_err = notification_get_id(noti, &group_id, &priv_id);
if(noti_err != NOTIFICATION_ERROR_NONE) {
return;
}
#endif
#endif
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_IPC_H__
#endif
GVariant *notification_ipc_make_gvariant_from_noti(notification_h noti);
-int notification_ipc_make_noti_from_gvariant(notification_h noti, GVariant *variant);
+int notification_ipc_make_noti_from_gvariant(notification_h noti,
+ GVariant *variant);
-GVariant *notification_ipc_make_gvariant_from_setting(struct notification_setting *noti_setting);
-int notification_ipc_make_setting_from_gvariant(struct notification_setting *noti_setting,
- GVariant *variant);
+GVariant *notification_ipc_make_gvariant_from_setting(
+ struct notification_setting *noti_setting);
+int notification_ipc_make_setting_from_gvariant(
+ struct notification_setting *noti_setting, GVariant *variant);
-GVariant *notification_ipc_make_gvariant_from_system_setting(struct notification_system_setting *noti_setting);
-int notification_ipc_make_system_setting_from_gvariant(struct notification_system_setting *noti_setting,
- GVariant *variant);
+GVariant *notification_ipc_make_gvariant_from_system_setting(
+ struct notification_system_setting *noti_setting);
+int notification_ipc_make_system_setting_from_gvariant(
+ struct notification_system_setting *noti_setting,
+ GVariant *variant);
int notification_dbus_init();
int notification_ipc_monitor_init(void);
int notification_ipc_monitor_fini(void);
int notification_ipc_is_master_ready(void);
-int notification_ipc_add_deffered_task(void (*deferred_task_cb)(void *data), void *user_data);
+int notification_ipc_add_deffered_task(void (*deferred_task_cb)(void *data),
+ void *user_data);
int notification_ipc_del_deffered_task(void (*deferred_task_cb)(void *data));
int notification_ipc_request_insert(notification_h noti, int *priv_id);
int notification_ipc_request_update(notification_h noti);
int notification_ipc_request_update_async(notification_h noti,
- void (*result_cb)(int priv_id, int result, void *data), void *user_data);
+ void (*result_cb)(int priv_id, int result, void *data),
+ void *user_data);
int notification_ipc_request_refresh(void);
-int notification_ipc_request_delete_multiple(notification_type_e type, char *pkgname);
-int notification_ipc_request_delete_single(notification_type_e type, char *pkgname, int priv_id);
+int notification_ipc_request_delete_multiple(notification_type_e type,
+ char *pkgname);
+int notification_ipc_request_delete_single(notification_type_e type,
+ char *pkgname, int priv_id);
int notification_ipc_update_setting(notification_setting_h setting);
-int notification_ipc_update_system_setting(notification_system_setting_h system_setting);
-int notification_ipc_request_load_noti_by_tag(notification_h noti, const char *pkgname, const char *tag);
-int notification_ipc_request_load_noti_grouping_list(notification_type_e type, int count,
+int notification_ipc_update_system_setting(
+ notification_system_setting_h system_setting);
+int notification_ipc_request_load_noti_by_tag(notification_h noti,
+ const char *pkgname, const char *tag);
+int notification_ipc_request_load_noti_grouping_list(notification_type_e type,
+ int count,
notification_list_h *list);
-int notification_ipc_request_get_setting_array(notification_setting_h *setting_array, int *count);
+int notification_ipc_request_get_setting_array(
+ notification_setting_h *setting_array, int *count);
int notification_ipc_request_get_setting_by_package_name(
- const char *package_name, notification_setting_h *setting);
-int notification_ipc_request_load_system_setting(notification_system_setting_h *setting);
-int notification_ipc_request_get_count(notification_type_e type, const char *pkgname, int group_id, int priv_id, int *count);
-int notification_ipc_request_load_noti_by_priv_id(notification_h noti, const char *pkgname, int priv_id);
-int notification_ipc_request_load_noti_detail_list(const char *pkgname, int group_id, int priv_id, int count, notification_list_h *list);
+ const char *package_name, notification_setting_h *setting);
+int notification_ipc_request_load_system_setting(
+ notification_system_setting_h *setting);
+int notification_ipc_request_get_count(notification_type_e type,
+ const char *pkgname, int group_id, int priv_id, int *count);
+int notification_ipc_request_load_noti_by_priv_id(notification_h noti,
+ const char *pkgname, int priv_id);
+int notification_ipc_request_load_noti_detail_list(const char *pkgname,
+ int group_id, int priv_id, int count,
+ notification_list_h *list);
#ifdef __cplusplus
}
#endif
-#endif
+#endif /* __NOTIFICATION_IPC_H__ */
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_LIST_H__
*/
int notification_get_list(notification_type_e type,
int count,
- notification_list_h * list);
+ notification_list_h *list);
/**
* @brief Returns the notification detail list handle of grouping data.
notification_h noti = NULL;
notification_list_h noti_list = NULL;
int noti_err = NOTIFICATION_ERROR_NONE;
-
+
...
-
+
noti_list = notification_list_remove(noti_list, noti);
}
* @endcode
notification_list_h notification_list_remove(notification_list_h list,
notification_h noti);
-/**
+/**
* @}
*/
#ifdef __cplusplus
}
#endif
-#endif /* __NOTIFICATION_LIST_H__ */
+#endif /* __NOTIFICATION_LIST_H__ */
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_NOTI_H__
int notification_noti_check_tag(notification_h noti);
-#endif /* __NOTIFICATION_NOTI_H__ */
+#endif /* __NOTIFICATION_NOTI_H__ */
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_ONGOING_H__
int notification_ongoing_update_content(const char *caller_pkgname,
int priv_id, const char *content);
-#endif /* __NOTIFICATION_ONGOING_H__ */
+#endif /* __NOTIFICATION_ONGOING_H__ */
+
/*
- * libnotification
- *
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Kyuho Jo <kyuho.jo@samsung.com>
+ * Copyright (c) 2015 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_ONGOING_FLAG_H__
*/
int notification_get_ongoing_flag(notification_h noti, bool *ongoing_flag);
-#endif /* __NOTIFICATION_ONGOING_H__ */
+#endif /* __NOTIFICATION_ONGOING_H__ */
+
/*
- * libnotification
- *
* Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_PERMISSION_H__
int notification_check_permission();
-#endif /* __NOTIFICATION_PERMISSION_H__ */
+#endif /* __NOTIFICATION_PERMISSION_H__ */
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_PRIVATE_H__
#define EXPORT_API __attribute__ ((visibility("default")))
#endif
-#define SAFE_STRDUP(s) \
- ({\
- char* _s = (char*)s;\
- (_s)? strdup(_s) : NULL;\
-})
-
-#define SAFE_FREE(s) \
- ({\
- if (s) {\
- free(s);\
- s = NULL;\
- }\
-})
+#define SAFE_STRDUP(s) ((s) ? strdup(s) : NULL)
+#define SAFE_FREE(s) \
+ do { \
+ if (s) { \
+ free(s); \
+ s = NULL; \
+ } \
+ } while (0)
#define NOTIFICATION_SETTING_DB_TABLE "notification_setting"
#define NOTIFICATION_SYSTEM_SETTING_DB_TABLE "notification_system_setting"
};
typedef enum notification_data_type {
- NOTIFICATION_DATA_TYPE_NOTI_TYPE = 1,
- NOTIFICATION_DATA_TYPE_LAYOUT,
- NOTIFICATION_DATA_TYPE_GROUP_ID,
- NOTIFICATION_DATA_TYPE_INTERNAL_GROUP_ID,
- NOTIFICATION_DATA_TYPE_PRIV_ID,
- NOTIFICATION_DATA_TYPE_CALLER_PKGNAME,
- NOTIFICATION_DATA_TYPE_LAUNCH_PKGNAME,
- NOTIFICATION_DATA_TYPE_ARGS,
- NOTIFICATION_DATA_TYPE_GROUP_ARGS,
- NOTIFICATION_DATA_TYPE_EXECUTE_OPTION,
- NOTIFICATION_DATA_TYPE_SERVICE_RESPONDING,
- NOTIFICATION_DATA_TYPE_SERVICE_SINGLE_LAUNCH,
- NOTIFICATION_DATA_TYPE_SERVICE_MULTI_LAUNCH,
- NOTIFICATION_DATA_TYPE_BUTTON1_EVENT,
- NOTIFICATION_DATA_TYPE_BUTTON2_EVENT,
- NOTIFICATION_DATA_TYPE_BUTTON3_EVENT,
- NOTIFICATION_DATA_TYPE_BUTTON4_EVENT,
- NOTIFICATION_DATA_TYPE_BUTTON5_EVENT,
- NOTIFICATION_DATA_TYPE_BUTTON6_EVENT,
- NOTIFICATION_DATA_TYPE_ICON_EVENT,
- NOTIFICATION_DATA_TYPE_THUMBNAIL_EVENT,
- NOTIFICATION_DATA_TYPE_DOMAIN,
- NOTIFICATION_DATA_TYPE_DIR,
- NOTIFICATION_DATA_TYPE_TEXT,
- NOTIFICATION_DATA_TYPE_KEY,
- NOTIFICATION_DATA_TYPE_FORMAT_ARGS,
- NOTIFICATION_DATA_TYPE_NUM_FORMAT_ARGS,
- NOTIFICATION_DATA_TYPE_IMAGE_PATH,
- NOTIFICATION_DATA_TYPE_SOUND_TYPE,
- NOTIFICATION_DATA_TYPE_SOUND_PATH,
- NOTIFICATION_DATA_TYPE_VIBRATION_TYPE,
- NOTIFICATION_DATA_TYPE_VIBRATION_PATH,
- NOTIFICATION_DATA_TYPE_LED_OPERATION,
- NOTIFICATION_DATA_TYPE_LED_ARGB,
- NOTIFICATION_DATA_TYPE_LED_ON_MS,
- NOTIFICATION_DATA_TYPE_LED_OFF_MS,
- NOTIFICATION_DATA_TYPE_TIME,
- NOTIFICATION_DATA_TYPE_INSERT_TIME,
- NOTIFICATION_DATA_TYPE_FLAGS_FOR_PROPERTY,
- NOTIFICATION_DATA_TYPE_DISPLAY_APPLIST,
- NOTIFICATION_DATA_TYPE_PROGRESS_SIZE,
- NOTIFICATION_DATA_TYPE_PROGRESS_PERCENTAGE,
- NOTIFICATION_DATA_TYPE_APP_ICON_PATH,
- NOTIFICATION_DATA_TYPE_APP_NAME,
- NOTIFICATION_DATA_TYPE_TEMP_TITLE,
- NOTIFICATION_DATA_TYPE_TEMP_CONTENT,
- NOTIFICATION_DATA_TYPE_TAG,
- NOTIFICATION_DATA_TYPE_ONGOING_FLAG,
- NOTIFICATION_DATA_TYPE_AUTO_REMOVE,
+ NOTIFICATION_DATA_TYPE_NOTI_TYPE = 1,
+ NOTIFICATION_DATA_TYPE_LAYOUT,
+ NOTIFICATION_DATA_TYPE_GROUP_ID,
+ NOTIFICATION_DATA_TYPE_INTERNAL_GROUP_ID,
+ NOTIFICATION_DATA_TYPE_PRIV_ID,
+ NOTIFICATION_DATA_TYPE_CALLER_PKGNAME,
+ NOTIFICATION_DATA_TYPE_LAUNCH_PKGNAME,
+ NOTIFICATION_DATA_TYPE_ARGS,
+ NOTIFICATION_DATA_TYPE_GROUP_ARGS,
+ NOTIFICATION_DATA_TYPE_EXECUTE_OPTION,
+ NOTIFICATION_DATA_TYPE_SERVICE_RESPONDING,
+ NOTIFICATION_DATA_TYPE_SERVICE_SINGLE_LAUNCH,
+ NOTIFICATION_DATA_TYPE_SERVICE_MULTI_LAUNCH,
+ NOTIFICATION_DATA_TYPE_BUTTON1_EVENT,
+ NOTIFICATION_DATA_TYPE_BUTTON2_EVENT,
+ NOTIFICATION_DATA_TYPE_BUTTON3_EVENT,
+ NOTIFICATION_DATA_TYPE_BUTTON4_EVENT,
+ NOTIFICATION_DATA_TYPE_BUTTON5_EVENT,
+ NOTIFICATION_DATA_TYPE_BUTTON6_EVENT,
+ NOTIFICATION_DATA_TYPE_ICON_EVENT,
+ NOTIFICATION_DATA_TYPE_THUMBNAIL_EVENT,
+ NOTIFICATION_DATA_TYPE_DOMAIN,
+ NOTIFICATION_DATA_TYPE_DIR,
+ NOTIFICATION_DATA_TYPE_TEXT,
+ NOTIFICATION_DATA_TYPE_KEY,
+ NOTIFICATION_DATA_TYPE_FORMAT_ARGS,
+ NOTIFICATION_DATA_TYPE_NUM_FORMAT_ARGS,
+ NOTIFICATION_DATA_TYPE_IMAGE_PATH,
+ NOTIFICATION_DATA_TYPE_SOUND_TYPE,
+ NOTIFICATION_DATA_TYPE_SOUND_PATH,
+ NOTIFICATION_DATA_TYPE_VIBRATION_TYPE,
+ NOTIFICATION_DATA_TYPE_VIBRATION_PATH,
+ NOTIFICATION_DATA_TYPE_LED_OPERATION,
+ NOTIFICATION_DATA_TYPE_LED_ARGB,
+ NOTIFICATION_DATA_TYPE_LED_ON_MS,
+ NOTIFICATION_DATA_TYPE_LED_OFF_MS,
+ NOTIFICATION_DATA_TYPE_TIME,
+ NOTIFICATION_DATA_TYPE_INSERT_TIME,
+ NOTIFICATION_DATA_TYPE_FLAGS_FOR_PROPERTY,
+ NOTIFICATION_DATA_TYPE_DISPLAY_APPLIST,
+ NOTIFICATION_DATA_TYPE_PROGRESS_SIZE,
+ NOTIFICATION_DATA_TYPE_PROGRESS_PERCENTAGE,
+ NOTIFICATION_DATA_TYPE_APP_ICON_PATH,
+ NOTIFICATION_DATA_TYPE_APP_NAME,
+ NOTIFICATION_DATA_TYPE_TEMP_TITLE,
+ NOTIFICATION_DATA_TYPE_TEMP_CONTENT,
+ NOTIFICATION_DATA_TYPE_TAG,
+ NOTIFICATION_DATA_TYPE_ONGOING_FLAG,
+ NOTIFICATION_DATA_TYPE_AUTO_REMOVE,
} notification_data_type_e;
void notification_call_changed_cb(notification_op *op_list, int op_num);
char *notification_get_pkgname_by_pid(void);
-#endif /* __NOTIFICATION_PRIVATE_H__ */
+#endif /* __NOTIFICATION_PRIVATE_H__ */
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_SETTING_H__
extern "C" {
#endif
-typedef struct notification_setting* notification_setting_h;
+typedef struct notification_setting *notification_setting_h;
int notification_setting_get_setting(notification_setting_h *setting);
#ifdef __cplusplus
}
#endif
-#endif /* __NOTIFICATION_SETTING_H__ */
+#endif /* __NOTIFICATION_SETTING_H__ */
+
/*
- * libnotification
- *
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Kyho Jo <kyuho.jo@samsung.com>
+ * Copyright (c) 2015 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_SETTING_INTERNAL_H__
int notification_setting_delete_package(const char *package_id);
/* System setting */
-typedef struct notification_system_setting* notification_system_setting_h;
+typedef struct notification_system_setting *notification_system_setting_h;
int notification_system_setting_load_system_setting(notification_system_setting_h *system_setting);
int notification_system_setting_update_system_setting(notification_system_setting_h system_setting);
}
#endif
#endif /* __NOTIFICATION_SETTING_INTERNAL_H__ */
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_SETTING_SERVICE_H__
#ifdef __cplusplus
}
#endif
-#endif /* __NOTIFICATION_SETTING_SERVICE_H__ */
+#endif /* __NOTIFICATION_SETTING_SERVICE_H__ */
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_STATUS_DEF_H__
}
#endif /* __cplusplus */
#endif /* __NOTIFICATION_STATUS_DEF_H__ */
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_STATUS_INTERNAL_DEF_H__
}
#endif /* __cplusplus */
#endif /* __NOTIFICATION_STATUS_INTERNAL_DEF_H__ */
+
/*
- * libnotification
- *
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Kyuho Jo <kyuho.jo@samsung.com>
+ * Copyright (c) 2015 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_TEXT_DOMAIN_H__
}
#endif /* __cplusplus */
#endif /* __NOTIFICATION_TEXT_DOMAIN_H__ */
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#ifndef __NOTIFICATION_TYPE_H__
#endif
#ifndef NOTIFICATION_DEPRECATED_API
-#if 0//__GNUC__
+#if 0 /* __GNUC__ */
#define NOTIFICATION_DEPRECATED_API __attribute__((deprecated))
#else
#define NOTIFICATION_DEPRECATED_API
*/
typedef enum _notification_ly_type {
NOTIFICATION_LY_NONE = 0,
- /**< Default */
+ /**< Default */
NOTIFICATION_LY_NOTI_EVENT_SINGLE,
- /**< Layout for notification. Used to inform single event*/
+ /**< Layout for notification. Used to inform single event*/
NOTIFICATION_LY_NOTI_EVENT_MULTIPLE,
- /**< Layout for notification. Used to inform multiple event*/
+ /**< Layout for notification. Used to inform multiple event*/
NOTIFICATION_LY_NOTI_THUMBNAIL,
- /**< Layout for notification. Used to display images*/
+ /**< Layout for notification. Used to display images*/
NOTIFICATION_LY_ONGOING_EVENT,
- /**< Layout for ongoing notification. Used to display text message.
- * notifications with NOTIFICATION_LY_ONGOING_EVENT can not be protected from removing by user since tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif */
+ /**< Layout for ongoing notification. Used to display text message.
+ * notifications with NOTIFICATION_LY_ONGOING_EVENT can not be protected from removing by user since tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif */
NOTIFICATION_LY_ONGOING_PROGRESS,
- /**< Layout for ongoing notification. Used to display progress*/
+ /**< Layout for ongoing notification. Used to display progress*/
NOTIFICATION_LY_MAX,
- /**< TBD */
+ /**< TBD */
} notification_ly_type_e;
/**
*/
typedef enum _notification_launch_option_type {
NOTIFICATION_LAUNCH_OPTION_APP_CONTROL = 1,
- /**< launching with app control */
+ /**< launching with app control */
} notification_launch_option_type;
/**
*/
typedef enum _notification_vibration_type {
NOTIFICATION_VIBRATION_TYPE_NONE = -1,
- /**< Default value. No vibration */
+ /**< Default value. No vibration */
NOTIFICATION_VIBRATION_TYPE_DEFAULT = 0,/**< Default vibrate pattern */
NOTIFICATION_VIBRATION_TYPE_USER_DATA,
- /**< User vibration data */
+ /**< User vibration data */
NOTIFICATION_VIBRATION_TYPE_MAX,
} notification_vibration_type_e;
* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
*/
typedef enum notification_permission_type {
- NOTIFICATION_PERMISSION_TYPE_NONE = 0,
- NOTIFICATION_PERMISSION_TYPE_DELETE = 1,
- NOTIFICATION_PERMISSION_TYPE_UPDATE = 2,
+ NOTIFICATION_PERMISSION_TYPE_NONE = 0,
+ NOTIFICATION_PERMISSION_TYPE_DELETE = 1,
+ NOTIFICATION_PERMISSION_TYPE_UPDATE = 2,
} notification_permission_type_e;
/**
#ifdef __cplusplus
}
#endif
-#endif /* __NOTIFICATION_TYPE_H__ */
+#endif /* __NOTIFICATION_TYPE_H__ */
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#include <stdio.h>
return NOTIFICATION_ERROR_NONE;
}
-EXPORT_API int notification_set_time(notification_h noti,
- time_t input_time)
+EXPORT_API int notification_set_time(notification_h noti, time_t input_time)
{
/* Check noti is valid data */
if (noti == NULL)
return NOTIFICATION_ERROR_NONE;
}
-EXPORT_API int notification_get_time(notification_h noti,
- time_t * ret_time)
+EXPORT_API int notification_get_time(notification_h noti, time_t *ret_time)
{
/* Check noti and time is valid data */
if (noti == NULL || ret_time == NULL)
}
EXPORT_API int notification_get_insert_time(notification_h noti,
- time_t * ret_time)
+ time_t *ret_time)
{
/* Check noti and ret_time is valid data */
if (noti == NULL || ret_time == NULL)
}
EXPORT_API int notification_set_text(notification_h noti,
- notification_text_type_e type,
- const char *text,
- const char *key,
- int args_type, ...)
+ notification_text_type_e type, const char *text,
+ const char *key, int args_type, ...)
{
bundle *b = NULL;
char buf_key[32] = { 0, };
return NULL;
}
- ret = notification_ipc_request_load_noti_by_tag(noti, caller_pkgname, (char*)tag);
+ ret = notification_ipc_request_load_noti_by_tag(noti, caller_pkgname, (char *)tag);
free(caller_pkgname);
set_last_result(ret);
void notification_call_posted_toast_cb(const char *message)
{
if (posted_toast_message_cb != NULL)
- posted_toast_message_cb((void*)message);
+ posted_toast_message_cb((void *)message);
}
EXPORT_API int notification_set_ongoing_flag(notification_h noti, bool ongoing_flag)
return NOTIFICATION_ERROR_NONE;
}
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#include <errno.h>
#include <notification_debug.h>
#include <notification_db.h>
-sqlite3 * notification_db_open(const char *dbfile)
+sqlite3 *notification_db_open(const char *dbfile)
{
int ret = 0;
sqlite3 *db = 0;
return db;
}
-int notification_db_close(sqlite3 ** db)
+int notification_db_close(sqlite3 **db)
{
int ret = 0;
return NOTIFICATION_ERROR_NONE;
}
-int notification_db_exec(sqlite3 * db, const char *query, int *num_changes)
+int notification_db_exec(sqlite3 *db, const char *query, int *num_changes)
{
int ret = 0;
sqlite3_stmt *stmt = NULL;
return bundle_decode(col_bundle, strlen((char *)col_bundle));
}
+
/*
- * libnotification
- *
* Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#include <gio/gio.h>
#include "notification_error.h"
-static const GDBusErrorEntry dbus_error_entries[] =
-{
+static const GDBusErrorEntry dbus_error_entries[] = {
{NOTIFICATION_ERROR_INVALID_PARAMETER, "org.freedesktop.Notification.Error.INVALID_PARAMETER"},
{NOTIFICATION_ERROR_OUT_OF_MEMORY, "org.freedesktop.Notification.Error.OUT_OF_MEMORY"},
{NOTIFICATION_ERROR_IO_ERROR, "org.freedesktop.Notification.Error.IO_ERROR"},
{NOTIFICATION_ERROR_INVALID_OPERATION, "org.freedesktop.Notification.Error.INVALID_OPERATION"},
};
-EXPORT_API GQuark notification_error_quark (void)
+EXPORT_API GQuark notification_error_quark(void)
{
static volatile gsize quark_volatile = 0;
- g_dbus_error_register_error_domain ("notification-error-quark",
+ g_dbus_error_register_error_domain("notification-error-quark",
&quark_volatile,
dbus_error_entries,
G_N_ELEMENTS(dbus_error_entries));
- return (GQuark) quark_volatile;
+ return (GQuark)quark_volatile;
}
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#include <stdio.h>
#include <notification_db.h>
static int _notification_group_check_data_inserted(const char *pkgname,
- int group_id, sqlite3 * db)
+ int group_id, sqlite3 *db)
{
sqlite3_stmt *stmt = NULL;
char query[NOTIFICATION_QUERY_MAX] = { 0, };
return NOTIFICATION_ERROR_NONE;
}
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#include <stdio.h>
return NOTIFICATION_ERROR_NONE;
}
-EXPORT_API int notification_set_args(notification_h noti,
- bundle * args,
- bundle * group_args)
+EXPORT_API int notification_set_args(notification_h noti, bundle *args,
+ bundle *group_args)
{
if (noti == NULL || args == NULL)
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
EXPORT_API int notification_get_args(notification_h noti,
- bundle ** args,
- bundle ** group_args)
+ bundle **args,
+ bundle **group_args)
{
if (noti == NULL || args == NULL)
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
EXPORT_API int notification_get_grouping_list(notification_type_e type, int count,
- notification_list_h * list)
+ notification_list_h *list)
{
notification_list_h get_list = NULL;
int ret = 0;
switch (type) {
case NOTIFICATION_OP_DATA_TYPE:
- *((int*)data) = noti_op->type;
+ *((int *)data) = noti_op->type;
break;
case NOTIFICATION_OP_DATA_PRIV_ID:
- *((int*)data) = noti_op->priv_id;
+ *((int *)data) = noti_op->priv_id;
break;
case NOTIFICATION_OP_DATA_NOTI:
*((notification_h *)data) = noti_op->noti;
break;
case NOTIFICATION_OP_DATA_EXTRA_INFO_1:
- *((int*)data) = noti_op->extra_info_1;
+ *((int *)data) = noti_op->extra_info_1;
break;
case NOTIFICATION_OP_DATA_EXTRA_INFO_2:
- *((int*)data) = noti_op->extra_info_2;
+ *((int *)data) = noti_op->extra_info_2;
break;
default:
return NOTIFICATION_ERROR_INVALID_PARAMETER;
{
return notification_ipc_is_master_ready();
}
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#include <stdio.h>
static int _ipc_monitor_deregister(void);
static void _do_deffered_task(void);
-static void _print_noti(notification_h noti) {
+static void _print_noti(notification_h noti)
+{
char *pkgname = NULL;
char *text = NULL;
char *content = NULL;
notification_get_tag(noti, &tag);
notification_get_vibration(noti, &vib_type, NULL);
- NOTIFICATION_DBG("client print_noti pkgname = %s ", pkgname );
- NOTIFICATION_DBG("client print_noti title = %s ", text );
- NOTIFICATION_DBG("client print_noti content = %s ", content );
- NOTIFICATION_DBG("client print_noti tag = %s ", tag );
+ NOTIFICATION_DBG("client print_noti pkgname = %s ", pkgname);
+ NOTIFICATION_DBG("client print_noti title = %s ", text);
+ NOTIFICATION_DBG("client print_noti content = %s ", content);
+ NOTIFICATION_DBG("client print_noti tag = %s ", tag);
NOTIFICATION_DBG("client print_noti priv_id = %d ", noti->priv_id);
NOTIFICATION_DBG("client print_noti vibration_path = %s ", noti->vibration_path);
NOTIFICATION_DBG("client print_noti vibration_type = %d ", vib_type);
}
}
- if(result)
+ if (result)
g_variant_unref(result);
return is_master_started;
*priv_id = id;
}
- if(reply)
+ if (reply)
g_object_unref(reply);
NOTIFICATION_DBG("notification_ipc_request_insert done [priv_id : %d, result: %d]", id, result);
g_variant_get(reply_body, "(i)", &priv_id);
}
- if(reply)
+ if (reply)
g_object_unref(reply);
NOTIFICATION_DBG("notification_ipc_request_update done [result: %d, priv_id :%d]", result, priv_id);
body = g_variant_new("(i)", NOTIFICATION_OP_REFRESH);
result = _send_sync_noti(body, &reply, "refresh_noti");
- if(reply)
+ if (reply)
g_object_unref(reply);
NOTIFICATION_ERR("notification_ipc_request_refresh done [result: %d]", result);
g_variant_get(reply_body, "(i)", &id);
}
- if(reply)
+ if (reply)
g_object_unref(reply);
NOTIFICATION_ERR("notification_ipc_request_delete_single done [result: %d]", result);
NOTIFICATION_ERR("num deleted:%d", num_deleted);
}
- if(reply)
+ if (reply)
g_object_unref(reply);
return result;
}
- if(reply)
+ if (reply)
g_object_unref(reply);
NOTIFICATION_DBG("notification_ipc_request_load_noti_by_tag done [result: %d]", result);
_print_noti(noti);
}
- if(reply)
+ if (reply)
g_object_unref(reply);
NOTIFICATION_DBG("notification_ipc_request_load_noti_by_priv_id done [result: %d]", result);
NOTIFICATION_DBG("noti count [%d]", re_count);
}
- if(reply)
+ if (reply)
g_object_unref(reply);
NOTIFICATION_DBG("notification_ipc_request_get_count done [result: %d]", result);
g_variant_iter_free(iter);
}
- if(reply)
+ if (reply)
g_object_unref(reply);
NOTIFICATION_DBG("notification_ipc_request_load_noti_grouping_list done [result: %d]", result);
g_variant_iter_free(iter);
}
- if(reply)
+ if (reply)
g_object_unref(reply);
NOTIFICATION_DBG("notification_ipc_request_load_noti_detail_list done [result: %d]", result);
g_variant_iter_free(iter);
}
- if(reply)
+ if (reply)
g_object_unref(reply);
NOTIFICATION_DBG("notification_ipc_request_get_setting_array done [result: %d]", result);
g_variant_unref(setting_body);
}
- if(reply)
+ if (reply)
g_object_unref(reply);
NOTIFICATION_DBG("notification_ipc_request_get_setting_by_package_name done [result: %d]", result);
g_variant_unref(setting_body);
}
- if(reply)
+ if (reply)
g_object_unref(reply);
NOTIFICATION_DBG("notification_ipc_request_load_system_setting done [result: %d]", result);
result = _send_sync_noti(body, &reply, "update_noti_setting");
- if(reply)
+ if (reply)
g_object_unref(reply);
NOTIFICATION_DBG("notification_ipc_update_setting done [result: %d]", result);
return body;
}
-static gboolean _variant_to_int_dict(GHashTable **dict, GVariant *variant) {
-
+static gboolean _variant_to_int_dict(GHashTable **dict, GVariant *variant)
+{
GVariantIter iter;
int key;
int *hash_key;
result = _send_sync_noti(NULL, &reply, "noti_service_register");
- if(reply)
+ if (reply)
g_object_unref(reply);
NOTIFICATION_ERR("_send_service_register done = %s, result = %d", _bus_name, result);
{
return _ipc_monitor_deregister();
}
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#include <stdlib.h>
return NOTIFICATION_ERROR_NONE;
}
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#include <stdio.h>
}
}
-static int _notification_noti_bind_query_text(sqlite3_stmt * stmt, const char *name,
+static int _notification_noti_bind_query_text(sqlite3_stmt *stmt, const char *name,
const char *str)
{
int ret = 0;
return NOTIFICATION_ERROR_NONE;
}
-static int _notification_noti_bind_query_double(sqlite3_stmt * stmt, const char *name,
+static int _notification_noti_bind_query_double(sqlite3_stmt *stmt, const char *name,
double val)
{
int ret = 0;
return NOTIFICATION_ERROR_NONE;
}
-static int _notification_noti_check_priv_id(notification_h noti, sqlite3 * db)
+static int _notification_noti_check_priv_id(notification_h noti, sqlite3 *db)
{
int result = 0;
int ret = NOTIFICATION_ERROR_NONE;
static int _notification_noti_get_internal_group_id_by_priv_id(const char *pkgname,
int priv_id,
- sqlite3 * db)
+ sqlite3 *db)
{
char *query = NULL;
sqlite3_stmt *stmt = NULL;
/* Decode bundle to insert DB */
if (noti->args)
- bundle_encode(noti->args, (bundle_raw **) & args, &b_encode_len);
+ bundle_encode(noti->args, (bundle_raw **)&args, &b_encode_len);
if (noti->group_args)
- bundle_encode(noti->group_args, (bundle_raw **) & group_args,
+ bundle_encode(noti->group_args, (bundle_raw **)&group_args,
&b_encode_len);
if (noti->b_execute_option)
bundle_encode(noti->b_execute_option,
- (bundle_raw **) & b_execute_option, &b_encode_len);
+ (bundle_raw **)&b_execute_option, &b_encode_len);
if (noti->b_service_responding)
bundle_encode(noti->b_service_responding,
- (bundle_raw **) & b_service_responding, &b_encode_len);
+ (bundle_raw **)&b_service_responding, &b_encode_len);
if (noti->b_service_single_launch)
bundle_encode(noti->b_service_single_launch,
- (bundle_raw **) & b_service_single_launch, &b_encode_len);
+ (bundle_raw **)&b_service_single_launch, &b_encode_len);
if (noti->b_service_multi_launch)
bundle_encode(noti->b_service_multi_launch,
- (bundle_raw **) & b_service_multi_launch, &b_encode_len);
+ (bundle_raw **)&b_service_multi_launch, &b_encode_len);
for (i = 0; i < NOTIFICATION_EVENT_TYPE_MAX; i++) {
if (noti->b_event_handler[i])
bundle_encode(noti->b_event_handler[i],
- (bundle_raw **) & b_event_handler[i], &b_encode_len);
+ (bundle_raw **)&b_event_handler[i], &b_encode_len);
}
if (noti->b_text)
- bundle_encode(noti->b_text, (bundle_raw **) & b_text, &b_encode_len);
+ bundle_encode(noti->b_text, (bundle_raw **)&b_text, &b_encode_len);
if (noti->b_key)
- bundle_encode(noti->b_key, (bundle_raw **) & b_key, &b_encode_len);
+ bundle_encode(noti->b_key, (bundle_raw **)&b_key, &b_encode_len);
if (noti->b_format_args)
bundle_encode(noti->b_format_args,
- (bundle_raw **) & b_format_args, &b_encode_len);
+ (bundle_raw **)&b_format_args, &b_encode_len);
if (noti->b_image_path)
bundle_encode(noti->b_image_path,
- (bundle_raw **) & b_image_path, &b_encode_len);
+ (bundle_raw **)&b_image_path, &b_encode_len);
/* Check only simmode property is enable */
if (noti->flags_for_property & NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE)
/* Decode bundle to update DB */
if (noti->args)
- bundle_encode(noti->args, (bundle_raw **) & args, &b_encode_len);
+ bundle_encode(noti->args, (bundle_raw **)&args, &b_encode_len);
if (noti->group_args)
- bundle_encode(noti->group_args, (bundle_raw **) & group_args,
+ bundle_encode(noti->group_args, (bundle_raw **)&group_args,
&b_encode_len);
if (noti->b_execute_option)
bundle_encode(noti->b_execute_option,
- (bundle_raw **) & b_execute_option, &b_encode_len);
+ (bundle_raw **)&b_execute_option, &b_encode_len);
if (noti->b_service_responding)
bundle_encode(noti->b_service_responding,
- (bundle_raw **) & b_service_responding, &b_encode_len);
+ (bundle_raw **)&b_service_responding, &b_encode_len);
if (noti->b_service_single_launch)
bundle_encode(noti->b_service_single_launch,
- (bundle_raw **) & b_service_single_launch, &b_encode_len);
+ (bundle_raw **)&b_service_single_launch, &b_encode_len);
if (noti->b_service_multi_launch)
bundle_encode(noti->b_service_multi_launch,
- (bundle_raw **) & b_service_multi_launch, &b_encode_len);
+ (bundle_raw **)&b_service_multi_launch, &b_encode_len);
for (i = 0; i < NOTIFICATION_EVENT_TYPE_MAX; i++) {
if (noti->b_event_handler[i])
bundle_encode(noti->b_event_handler[i],
- (bundle_raw **) & b_event_handler[i], &b_encode_len);
+ (bundle_raw **)&b_event_handler[i], &b_encode_len);
}
if (noti->b_text)
- bundle_encode(noti->b_text, (bundle_raw **) & b_text, &b_encode_len);
+ bundle_encode(noti->b_text, (bundle_raw **)&b_text, &b_encode_len);
if (noti->b_key)
- bundle_encode(noti->b_key, (bundle_raw **) & b_key, &b_encode_len);
+ bundle_encode(noti->b_key, (bundle_raw **)&b_key, &b_encode_len);
if (noti->b_format_args)
bundle_encode(noti->b_format_args,
- (bundle_raw **) & b_format_args, &b_encode_len);
+ (bundle_raw **)&b_format_args, &b_encode_len);
if (noti->b_image_path)
bundle_encode(noti->b_image_path,
- (bundle_raw **) & b_image_path, &b_encode_len);
+ (bundle_raw **)&b_image_path, &b_encode_len);
/* Check only simmode property is enable */
if (noti->flags_for_property & NOTIFICATION_PROP_DISPLAY_ONLY_SIMMODE)
return NOTIFICATION_ERROR_NONE;
}
-static void _notification_noti_populate_from_stmt(sqlite3_stmt * stmt, notification_h noti)
+static void _notification_noti_populate_from_stmt(sqlite3_stmt *stmt, notification_h noti)
{
int col = 0;
int i = 0;
noti->temp_content = NULL;
}
-static notification_h _notification_noti_get_item(sqlite3_stmt * stmt)
+static notification_h _notification_noti_get_item(sqlite3_stmt *stmt)
{
notification_h noti = NULL;
return TAG_TYPE_INVALID;
}
-static int _notification_noti_update_priv_id(sqlite3 * db, int rowid)
+static int _notification_noti_update_priv_id(sqlite3 *db, int rowid)
{
int ret = NOTIFICATION_ERROR_NONE;
char *query = NULL;
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
- if (_is_allowed_to_notify((const char*)noti->caller_pkgname) == false) {
+ if (_is_allowed_to_notify((const char *)noti->caller_pkgname) == false) {
NOTIFICATION_DBG("[%s] is not allowed to notify", noti->caller_pkgname);
return NOTIFICATION_ERROR_PERMISSION_DENIED;
}
if (!db)
return get_last_result();
- if (_is_allowed_to_notify((const char*)noti->caller_pkgname) == false) {
+ if (_is_allowed_to_notify((const char *)noti->caller_pkgname) == false) {
NOTIFICATION_DBG("[%s] is not allowed to notify", noti->caller_pkgname);
return NOTIFICATION_ERROR_PERMISSION_DENIED;
}
return ret;
}
+
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#include <stdio.h>
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#include <stdio.h>
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#include <stdio.h>
/*
- * libnotification
- *
* Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#include <errno.h>
row_count = 1;
- if (!(result_setting_array = (struct notification_setting*)malloc(sizeof(struct notification_setting) * row_count))) {
+ if (!(result_setting_array = (struct notification_setting *)malloc(sizeof(struct notification_setting) * row_count))) {
NOTIFICATION_ERR("malloc failed...");
err = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
col_index = column_count;
_get_table_field_data_string(query_result, &(result_setting_array[i].package_name), 1, col_index++);
- _get_table_field_data_int(query_result, (int*)&(result_setting_array[i].allow_to_notify), col_index++);
- _get_table_field_data_int(query_result, (int*)&(result_setting_array[i].do_not_disturb_except), col_index++);
+ _get_table_field_data_int(query_result, (int *)&(result_setting_array[i].allow_to_notify), col_index++);
+ _get_table_field_data_int(query_result, (int *)&(result_setting_array[i].do_not_disturb_except), col_index++);
_get_table_field_data_int(query_result, &(result_setting_array[i].visibility_class), col_index++);
*setting = result_setting_array;
}
NOTIFICATION_DBG("row_count [%d] column_count [%d]", row_count, column_count);
- if (!(result_setting_array = (struct notification_setting*)malloc(sizeof(struct notification_setting) * row_count))) {
+ if (!(result_setting_array = (struct notification_setting *)malloc(sizeof(struct notification_setting) * row_count))) {
NOTIFICATION_ERR("malloc failed...");
err = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
for (i = 0; i < row_count; i++) {
_get_table_field_data_string(query_result, &(result_setting_array[i].package_name), 1, col_index++);
- _get_table_field_data_int(query_result, (int*)&(result_setting_array[i].allow_to_notify), col_index++);
- _get_table_field_data_int(query_result, (int*)&(result_setting_array[i].do_not_disturb_except), col_index++);
+ _get_table_field_data_int(query_result, (int *)&(result_setting_array[i].allow_to_notify), col_index++);
+ _get_table_field_data_int(query_result, (int *)&(result_setting_array[i].do_not_disturb_except), col_index++);
_get_table_field_data_int(query_result, &(result_setting_array[i].visibility_class), col_index++);
}
row_count = 1;
- if (!(result_system_setting = (struct notification_system_setting*)malloc(sizeof(struct notification_system_setting)))) {
+ if (!(result_system_setting = (struct notification_system_setting *)malloc(sizeof(struct notification_system_setting)))) {
NOTIFICATION_ERR("malloc failed...");
err = NOTIFICATION_ERROR_OUT_OF_MEMORY;
goto out;
col_index = column_count;
- _get_table_field_data_int(query_result, (int*)&(result_system_setting->do_not_disturb), col_index++);
+ _get_table_field_data_int(query_result, (int *)&(result_system_setting->do_not_disturb), col_index++);
_get_table_field_data_int(query_result, &(result_system_setting->visibility_class), col_index++);
*system_setting = result_system_setting;
return err;
}
-
-
-
/*
- * libnotification
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Seungtaek Chung <seungtaek.chung@samsung.com>, Mi-Ju Lee <miju52.lee@samsung.com>, Xi Zhichan <zhichan.xi@samsung.com>
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
#include <sys/types.h>
/*
- * Test application for notification API
- *
- * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Kyuho Jo <kyuho.jo@samsung.com>
+ * Copyright (c) 2015 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
*/
-
-
/* common header */
#include <stdio.h>
#include <stdlib.h>
noti_err = notification_set_image(noti_handle, NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR, image_path);
/*
noti_err = notification_set_text(noti_handle, NOTIFICATION_TEXT_TYPE_TITLE, "I'm Title", "TITLE", NOTIFICATION_VARIABLE_TYPE_NONE);
- noti_err = notification_set_text(noti_handle, NOTIFICATION_TEXT_TYPE_CONTENT, "I'm Content", "This is very loooooooooooooooooooooooooooooooooooooooooong message", NOTIFICATION_VARIABLE_TYPE_NONE);
+ noti_err = notification_set_text(noti_handle, NOTIFICATION_TEXT_TYPE_CONTENT, "I'm Content", "This is very long message", NOTIFICATION_VARIABLE_TYPE_NONE);
*/
noti_err = notification_set_display_applist(noti_handle, NOTIFICATION_DISPLAY_APP_TICKER | NOTIFICATION_DISPLAY_APP_INDICATOR);