2 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
23 #include "api/notification_ex_app_control_action.h"
24 #include "api/notification_ex_button.h"
25 #include "api/notification_ex_chat_message.h"
26 #include "api/notification_ex_checkbox.h"
27 #include "api/notification_ex_entry.h"
28 #include "api/notification_ex_event_info.h"
29 #include "api/notification_ex_group.h"
30 #include "api/notification_ex_image.h"
31 #include "api/notification_ex_input_selector.h"
32 #include "api/notification_ex_item.h"
33 #include "api/notification_ex_manager.h"
34 #include "api/notification_ex_progress.h"
35 #include "api/notification_ex_reporter.h"
36 #include "api/notification_ex_text.h"
37 #include "api/notification_ex_time.h"
38 #include "api/notification_ex_visibility_action.h"
39 #include "notification-ex/reporter.h"
40 #include "notification-ex/app_control_action.h"
41 #include "notification-ex/button_item.h"
42 #include "notification-ex/chat_message_item.h"
43 #include "notification-ex/checkbox_item.h"
44 #include "notification-ex/entry_item.h"
45 #include "notification-ex/group_item.h"
50 #define LOG_TAG "NOTIFICATION_EX"
55 #define EXPORT_API __attribute__((visibility("default")))
58 using namespace notification::item;
60 extern "C" EXPORT_API int noti_ex_action_app_control_create(
61 noti_ex_action_h *handle, app_control_h app_control,
63 if (handle == nullptr || app_control == nullptr) {
64 LOGE("Invalid parameter");
65 return NOTI_EX_ERROR_INVALID_PARAMETER;
68 auto* p = new (std::nothrow) AppControlAction(app_control, extra);
70 LOGE("Out-of-memory");
71 return NOTI_EX_ERROR_OUT_OF_MEMORY;
76 return NOTI_EX_ERROR_NONE;
79 extern "C" EXPORT_API int noti_ex_action_app_control_set(
80 noti_ex_action_h handle, app_control_h app_control) {
81 if (handle == nullptr || app_control == nullptr) {
82 LOGE("Invalid parameter");
83 return NOTI_EX_ERROR_INVALID_PARAMETER;
86 AppControlAction* p = static_cast<AppControlAction*>(handle);
87 p->SetAppControl(app_control);
89 return NOTI_EX_ERROR_NONE;
92 extern "C" EXPORT_API int noti_ex_action_app_control_get(
93 noti_ex_action_h handle, app_control_h *app_control) {
94 if (handle == nullptr || app_control == nullptr) {
95 LOGE("Invalid parameter");
96 return NOTI_EX_ERROR_INVALID_PARAMETER;
99 AppControlAction* p = static_cast<AppControlAction*>(handle);
100 *app_control = p->GetAppControl();
102 return NOTI_EX_ERROR_NONE;
105 extern "C" EXPORT_API int noti_ex_item_button_create(noti_ex_item_h *handle,
106 const char *id, const char *title) {
109 if (handle == nullptr || title == nullptr) {
110 LOGE("Invalid parameter");
111 return NOTI_EX_ERROR_INVALID_PARAMETER;
115 p = new (std::nothrow) ButtonItem(id, title);
117 p = new (std::nothrow) ButtonItem(title);
120 LOGE("Out-of-memory");
121 return NOTI_EX_ERROR_OUT_OF_MEMORY;
126 return NOTI_EX_ERROR_NONE;
129 extern "C" EXPORT_API int noti_ex_item_button_get_title(noti_ex_item_h handle,
131 if (handle == nullptr || title == nullptr) {
132 LOGE("Invalid parameter");
133 return NOTI_EX_ERROR_INVALID_PARAMETER;
136 ButtonItem* p = static_cast<ButtonItem*>(handle);
137 if (!p->GetTitle().empty()) {
138 *title = strdup(p->GetTitle().c_str());
139 if (*title == nullptr) {
140 LOGE("Out-of-memory");
141 return NOTI_EX_ERROR_OUT_OF_MEMORY;
145 return NOTI_EX_ERROR_NONE;
148 extern "C" EXPORT_API int noti_ex_item_chat_message_create(
149 noti_ex_item_h *handle, const char *id, noti_ex_item_h name,
150 noti_ex_item_h text, noti_ex_item_h image, noti_ex_item_h time,
151 noti_ex_item_chat_message_type_e message_type) {
156 if (handle == nullptr || message_type < NOTI_EX_ITEM_CHAT_MESSAGE_TYPE_USER
157 || message_type > NOTI_EX_ITEM_CHAT_MESSAGE_TYPE_SENDER) {
158 LOGE("Invalid parameter");
159 return NOTI_EX_ERROR_INVALID_PARAMETER;
162 p = new (std::nothrow) ChatMessageItem(id,
163 static_cast<TextItem*>(name),
164 static_cast<TextItem*>(text),
165 static_cast<ImageItem*>(image),
166 static_cast<TimeItem*>(time),
167 static_cast<ChatMessageItem::Type>((int)message_type));
169 LOGE("Out-of-memory");
170 return NOTI_EX_ERROR_OUT_OF_MEMORY;
175 return NOTI_EX_ERROR_NONE;
177 return NOTI_EX_ERROR_NONE;
181 extern "C" EXPORT_API int noti_ex_item_chat_message_get_name(
182 noti_ex_item_h handle, noti_ex_item_h *name) {
183 if (handle == nullptr || name == nullptr) {
184 LOGE("Invalid parameter");
185 return NOTI_EX_ERROR_INVALID_PARAMETER;
188 ChatMessageItem* p = static_cast<ChatMessageItem*>(handle);
189 *name = &(p->GetNameItem());
191 return NOTI_EX_ERROR_NONE;
194 extern "C" EXPORT_API int noti_ex_item_chat_message_get_text(
195 noti_ex_item_h handle, noti_ex_item_h *text) {
196 if (handle == nullptr || text == nullptr) {
197 LOGE("Invalid parameter");
198 return NOTI_EX_ERROR_INVALID_PARAMETER;
201 ChatMessageItem* p = static_cast<ChatMessageItem*>(handle);
202 *text = &(p->GetTextItem());
204 return NOTI_EX_ERROR_NONE;
207 extern "C" EXPORT_API int noti_ex_item_chat_message_get_image(
208 noti_ex_item_h handle, noti_ex_item_h *image) {
209 if (handle == nullptr || image == nullptr) {
210 LOGE("Invalid parameter");
211 return NOTI_EX_ERROR_INVALID_PARAMETER;
214 ChatMessageItem* p = static_cast<ChatMessageItem*>(handle);
215 *image = &(p->GetImageItem());
217 return NOTI_EX_ERROR_NONE;
220 extern "C" EXPORT_API int noti_ex_item_chat_message_get_time(
221 noti_ex_item_h handle, noti_ex_item_h *time) {
222 if (handle == nullptr || time == nullptr) {
223 LOGE("Invalid parameter");
224 return NOTI_EX_ERROR_INVALID_PARAMETER;
227 ChatMessageItem* p = static_cast<ChatMessageItem*>(handle);
228 *time = &(p->GetTimeItem());
230 return NOTI_EX_ERROR_NONE;
233 extern "C" EXPORT_API int noti_ex_item_chat_message_get_message_type(
234 noti_ex_item_h handle, noti_ex_item_chat_message_type_e *message_type) {
235 if (handle == nullptr || message_type == nullptr) {
236 LOGE("Invalid parameter");
237 return NOTI_EX_ERROR_INVALID_PARAMETER;
241 //ChatMessageItem* p = static_cast<ChatMessageItem*>(handle);
242 //*message_type = p->GetMessageType();
244 return NOTI_EX_ERROR_NONE;
247 extern "C" EXPORT_API int noti_ex_item_checkbox_create(noti_ex_item_h *handle,
248 const char *id, const char *title, bool checked) {
251 if (handle == nullptr || title == nullptr) {
252 LOGE("Invalid parameter");
253 return NOTI_EX_ERROR_INVALID_PARAMETER;
256 p = new (std::nothrow) CheckBoxItem(id, title, checked);
258 LOGE("Out-of-memory");
259 return NOTI_EX_ERROR_OUT_OF_MEMORY;
264 return NOTI_EX_ERROR_NONE;
267 extern "C" EXPORT_API int noti_ex_item_checkbox_get_title(noti_ex_item_h handle,
269 if (handle == nullptr || title == nullptr) {
270 LOGE("Invalid parameter");
271 return NOTI_EX_ERROR_INVALID_PARAMETER;
274 CheckBoxItem* p = static_cast<CheckBoxItem*>(handle);
275 if (!p->GetTitle().empty()) {
276 *title = strdup(p->GetTitle().c_str());
277 if (*title == nullptr) {
278 LOGE("Out-of-memory");
279 return NOTI_EX_ERROR_OUT_OF_MEMORY;
283 return NOTI_EX_ERROR_NONE;
286 extern "C" EXPORT_API int noti_ex_item_checkbox_is_checked(noti_ex_item_h handle,
288 if (handle == nullptr || checked == nullptr) {
289 LOGE("Invalid parameter");
290 return NOTI_EX_ERROR_INVALID_PARAMETER;
293 CheckBoxItem* p = static_cast<CheckBoxItem*>(handle);
294 *checked = p->IsChecked();
296 return NOTI_EX_ERROR_NONE;
299 extern "C" EXPORT_API int noti_ex_item_entry_create(noti_ex_item_h *handle,
303 if (handle == nullptr) {
304 LOGE("Invalid parameter");
305 return NOTI_EX_ERROR_INVALID_PARAMETER;
308 p = new (std::nothrow) EntryItem(id);
310 LOGE("Out-of-memory");
311 return NOTI_EX_ERROR_OUT_OF_MEMORY;
316 return NOTI_EX_ERROR_NONE;
319 extern "C" EXPORT_API int noti_ex_item_entry_get_text(noti_ex_item_h handle,
321 if (handle == nullptr || text == nullptr) {
322 LOGE("Invalid parameter");
323 return NOTI_EX_ERROR_INVALID_PARAMETER;
326 EntryItem* p = static_cast<EntryItem*>(handle);
327 if (!p->GetText().empty()) {
328 *text = strdup(p->GetText().c_str());
329 if (*text == nullptr) {
330 LOGE("Out-of-memory");
331 return NOTI_EX_ERROR_OUT_OF_MEMORY;
335 return NOTI_EX_ERROR_NONE;
338 extern "C" EXPORT_API int noti_ex_item_entry_set_text(noti_ex_item_h handle,
340 if (handle == nullptr || text == nullptr) {
341 LOGE("Invalid parameter");
342 return NOTI_EX_ERROR_INVALID_PARAMETER;
345 EntryItem* p = static_cast<EntryItem*>(handle);
346 p->SetText(std::string(text));
348 return NOTI_EX_ERROR_NONE;
351 extern "C" EXPORT_API int noti_ex_event_info_create(noti_ex_event_info_h *handle,
352 noti_ex_event_info_type_e type, const char *owner,
353 const char *channel, const char *item_id) {
354 return NOTI_EX_ERROR_NONE;
357 extern "C" EXPORT_API int noti_ex_event_info_destroy(
358 noti_ex_event_info_h handle) {
359 return NOTI_EX_ERROR_NONE;
362 extern "C" EXPORT_API int noti_ex_event_info_get_event_type(
363 noti_ex_event_info_h handle, noti_ex_event_info_type_e *event_type) {
364 return NOTI_EX_ERROR_NONE;
367 extern "C" EXPORT_API int noti_ex_event_info_get_owner(
368 noti_ex_event_info_h handle, char **owner) {
369 return NOTI_EX_ERROR_NONE;
372 extern "C" EXPORT_API int noti_ex_event_info_get_channel(
373 noti_ex_event_info_h handle, char **channel) {
374 return NOTI_EX_ERROR_NONE;
377 extern "C" EXPORT_API int noti_ex_event_info_get_item_id(
378 noti_ex_event_info_h handle, char **item_id) {
379 return NOTI_EX_ERROR_NONE;
382 extern "C" EXPORT_API int noti_ex_event_info_get_request_id(
383 noti_ex_event_info_h handle, int *req_id) {
384 return NOTI_EX_ERROR_NONE;
387 extern "C" EXPORT_API int noti_ex_item_group_create(noti_ex_item_h *handle,
391 if (handle == nullptr) {
392 LOGE("Invalid parameter");
393 return NOTI_EX_ERROR_INVALID_PARAMETER;
397 p = new (std::nothrow) GroupItem(id);
399 p = new (std::nothrow) GroupItem();
402 LOGE("Out-of-memory");
403 return NOTI_EX_ERROR_OUT_OF_MEMORY;
408 return NOTI_EX_ERROR_NONE;
411 extern "C" EXPORT_API int noti_ex_item_group_set_direction(noti_ex_item_h handle,
413 if (handle == nullptr) {
414 LOGE("Invalid parameter");
415 return NOTI_EX_ERROR_INVALID_PARAMETER;
418 GroupItem* p = static_cast<GroupItem*>(handle);
419 p->SetDirection(vertical);
421 return NOTI_EX_ERROR_NONE;
424 extern "C" EXPORT_API int noti_ex_item_group_is_vertical(noti_ex_item_h handle,
426 if (handle == nullptr) {
427 LOGE("Invalid parameter");
428 return NOTI_EX_ERROR_INVALID_PARAMETER;
431 GroupItem* p = static_cast<GroupItem*>(handle);
432 *vertical = p->IsVertical();
434 return NOTI_EX_ERROR_NONE;
437 extern "C" EXPORT_API int noti_ex_item_group_get_app_label(noti_ex_item_h handle,
439 if (handle == nullptr) {
440 LOGE("Invalid parameter");
441 return NOTI_EX_ERROR_INVALID_PARAMETER;
444 GroupItem* p = static_cast<GroupItem*>(handle);
445 if (!p->GetAppLabel().empty()) {
446 *label = strdup(p->GetAppLabel().c_str());
447 if (*label == nullptr) {
448 LOGE("Out-of-memory");
449 return NOTI_EX_ERROR_OUT_OF_MEMORY;
453 return NOTI_EX_ERROR_NONE;
456 extern "C" EXPORT_API int noti_ex_item_group_add_child(noti_ex_item_h handle,
457 noti_ex_item_h child) {
458 if (handle == nullptr || child == nullptr) {
459 LOGE("Invalid parameter");
460 return NOTI_EX_ERROR_INVALID_PARAMETER;
464 //GroupItem* p = static_cast<GroupItem*>(handle);
465 //p->AddChild(static_cast<AbstractItem*>(child));
467 return NOTI_EX_ERROR_NONE;
470 extern "C" EXPORT_API int noti_ex_item_group_remove_child(noti_ex_item_h handle,
471 const char *item_id) {
472 if (handle == nullptr || item_id == nullptr) {
473 LOGE("Invalid parameter");
474 return NOTI_EX_ERROR_INVALID_PARAMETER;
477 GroupItem* p = static_cast<GroupItem*>(handle);
478 p->RemoveChild(std::string(item_id));
480 return NOTI_EX_ERROR_NONE;
483 extern "C" EXPORT_API int noti_ex_item_group_foreach(
484 noti_ex_item_group_foreach_cb callback, void *data) {
488 extern "C" EXPORT_API int noti_ex_item_image_create(noti_ex_item_h *handle,
489 const char *id, const char *image_path) {
492 if (handle == nullptr || image_path == nullptr) {
493 LOGE("Invalid parameter");
494 return NOTI_EX_ERROR_INVALID_PARAMETER;
498 p = new (std::nothrow) ImageItem(id, image_path);
500 p = new (std::nothrow) ImageItem(image_path);
503 LOGE("Out-of-memory");
504 return NOTI_EX_ERROR_OUT_OF_MEMORY;
509 return NOTI_EX_ERROR_NONE;
512 extern "C" EXPORT_API int noti_ex_item_image_get_image_path(
513 noti_ex_item_h handle, char **image_path) {
514 if (handle == nullptr || image_path == nullptr) {
515 LOGE("Invalid parameter");
516 return NOTI_EX_ERROR_INVALID_PARAMETER;
519 ImageItem* p = static_cast<ImageItem*>(handle);
520 if (!p->GetImagePath().empty()) {
521 *image_path = strdup(p->GetImagePath().c_str());
522 if (*image_path == nullptr) {
523 LOGE("Out-of-memory");
524 return NOTI_EX_ERROR_OUT_OF_MEMORY;
528 return NOTI_EX_ERROR_NONE;
531 extern "C" EXPORT_API int noti_ex_item_input_selector_create(
532 noti_ex_item_h *handle, const char *id) {
536 extern "C" EXPORT_API int noti_ex_item_input_selector_get_contents(
537 noti_ex_item_h handle, char ***list, int *count) {
541 extern "C" EXPORT_API int noti_ex_item_input_selector_set_contents(
542 noti_ex_item_h handle, const char **contents, int count) {
546 extern "C" EXPORT_API int noti_ex_color_create(noti_ex_color_h *handle,
547 unsigned char a, unsigned char r, unsigned char g, unsigned char b) {
551 extern "C" EXPORT_API int noti_ex_color_destroy(noti_ex_color_h handle) {
555 extern "C" EXPORT_API int noti_ex_color_get_alpha(noti_ex_color_h handle,
556 unsigned char *val) {
560 extern "C" EXPORT_API int noti_ex_color_get_red(noti_ex_color_h handle,
561 unsigned char *val) {
565 extern "C" EXPORT_API int noti_ex_color_get_green(noti_ex_color_h handle,
566 unsigned char *val) {
570 extern "C" EXPORT_API int noti_ex_color_get_blue(noti_ex_color_h handle,
571 unsigned char *val) {
575 extern "C" EXPORT_API int noti_ex_padding_create(noti_ex_padding_h *handle,
576 int left, int top, int right, int bottom) {
580 extern "C" EXPORT_API int noti_ex_padding_destroy(noti_ex_padding_h handle) {
584 extern "C" EXPORT_API int noti_ex_padding_get_left(noti_ex_padding_h handle,
589 extern "C" EXPORT_API int noti_ex_padding_get_top(noti_ex_padding_h handle,
594 extern "C" EXPORT_API int noti_ex_padding_get_right(noti_ex_padding_h handle,
599 extern "C" EXPORT_API int noti_ex_padding_get_bottom(noti_ex_padding_h handle,
604 extern "C" EXPORT_API int noti_ex_geometry_create(noti_ex_geometry_h *handle,
605 int x, int y, int w, int h) {
609 extern "C" EXPORT_API int noti_ex_geometry_destroy(noti_ex_geometry_h handle) {
613 extern "C" EXPORT_API int noti_ex_geometry_get_x(noti_ex_geometry_h handle,
618 extern "C" EXPORT_API int noti_ex_geometry_get_y(noti_ex_geometry_h handle,
623 extern "C" EXPORT_API int noti_ex_geometry_get_width(noti_ex_geometry_h handle,
628 extern "C" EXPORT_API int noti_ex_geometry_get_height(noti_ex_geometry_h handle,
633 extern "C" EXPORT_API int noti_ex_style_create(noti_ex_style_h *handle,
634 noti_ex_color_h color,
635 noti_ex_padding_h padding,
636 noti_ex_geometry_h geometry) {
640 extern "C" EXPORT_API int noti_ex_style_destroy(noti_ex_style_h handle) {
644 extern "C" EXPORT_API int noti_ex_style_get_padding(noti_ex_style_h handle,
645 const noti_ex_padding_h *padding) {
649 extern "C" EXPORT_API int noti_ex_style_get_color(noti_ex_style_h handle,
650 const noti_ex_color_h *color) {
654 extern "C" EXPORT_API int noti_ex_style_get_geometry(noti_ex_style_h handle,
655 const noti_ex_geometry_h *geometry) {
659 extern "C" EXPORT_API int noti_ex_led_info_create(noti_ex_led_info_h *handle,
660 noti_ex_color_h color) {
664 extern "C" EXPORT_API int noti_ex_led_info_destroy(noti_ex_led_info_h handle) {
668 extern "C" EXPORT_API int noti_ex_led_info_set_on_period(
669 noti_ex_led_info_h handle, int ms) {
673 extern "C" EXPORT_API int noti_ex_led_info_get_on_period(
674 noti_ex_led_info_h handle, int *ms) {
678 extern "C" EXPORT_API int noti_ex_led_info_set_off_period(
679 noti_ex_led_info_h handle, int ms) {
683 extern "C" EXPORT_API int noti_ex_led_info_get_off_period(
684 noti_ex_led_info_h handle, int *ms) {
688 extern "C" EXPORT_API int noti_ex_led_info_get_color(
689 noti_ex_led_info_h handle, noti_ex_color_h *color) {
693 extern "C" EXPORT_API int noti_ex_action_destroy(noti_ex_action_h handle) {
697 extern "C" EXPORT_API int noti_ex_action_get_type(noti_ex_action_h handle,
702 extern "C" EXPORT_API int noti_ex_action_is_local(noti_ex_action_h handle,
707 extern "C" EXPORT_API int noti_ex_action_execute(noti_ex_action_h handle,
708 noti_ex_item_h item) {
712 extern "C" EXPORT_API int noti_ex_action_get_extra(noti_ex_action_h handle,
717 extern "C" EXPORT_API int noti_ex_item_info_get_hide_time(
718 noti_ex_item_info_h handle, int *hide_time) {
722 extern "C" EXPORT_API int noti_ex_item_info_set_hide_time(
723 noti_ex_item_info_h handle, int hide_time) {
727 extern "C" EXPORT_API int noti_ex_item_info_get_delete_time(
728 noti_ex_item_info_h handle, int *delete_time) {
732 extern "C" EXPORT_API int noti_ex_item_info_set_delete_time(
733 noti_ex_item_info_h handle, int delete_time) {
737 extern "C" EXPORT_API int noti_ex_item_info_get_time(
738 noti_ex_item_info_h handle, time_t *time) {
742 extern "C" EXPORT_API int noti_ex_item_destroy(noti_ex_item_h handle) {
746 extern "C" EXPORT_API int noti_ex_item_find_by_id(noti_ex_item_h handle,
747 const char *id, const noti_ex_item_h *item) {
751 extern "C" EXPORT_API int noti_ex_item_get_type(noti_ex_item_h handle,
756 extern "C" EXPORT_API int noti_ex_item_get_shared_path(noti_ex_item_h handle,
757 char ***path, int *count) {
761 extern "C" EXPORT_API int noti_ex_item_get_id(noti_ex_item_h handle,
766 extern "C" EXPORT_API int noti_ex_item_set_id(noti_ex_item_h handle,
771 extern "C" EXPORT_API int noti_ex_item_get_action(noti_ex_item_h handle,
772 noti_ex_action_h *action) {
776 extern "C" EXPORT_API int noti_ex_item_set_action(noti_ex_item_h handle,
777 noti_ex_action_h action) {
781 extern "C" EXPORT_API int noti_ex_item_get_style(noti_ex_item_h handle,
782 noti_ex_style_h *style) {
786 extern "C" EXPORT_API int noti_ex_item_set_style(noti_ex_item_h handle,
787 noti_ex_style_h style) {
791 extern "C" EXPORT_API int noti_ex_item_set_visible(noti_ex_item_h handle,
796 extern "C" EXPORT_API int noti_ex_item_get_visible(noti_ex_item_h handle,
801 extern "C" EXPORT_API int noti_ex_item_set_enable(noti_ex_item_h handle,
806 extern "C" EXPORT_API int noti_ex_item_get_enable(noti_ex_item_h handle,
811 extern "C" EXPORT_API int noti_ex_item_add_receiver(noti_ex_item_h handle,
812 const char *receiver_group) {
816 extern "C" EXPORT_API int noti_ex_item_remove_receiver(noti_ex_item_h handle,
817 const char *receiver_group) {
821 extern "C" EXPORT_API int noti_ex_item_get_receiver_list(noti_ex_item_h handle,
822 char ***list, int *count) {
826 extern "C" EXPORT_API int noti_ex_item_set_policy(noti_ex_item_h handle,
831 extern "C" EXPORT_API int noti_ex_item_get_policy(noti_ex_item_h handle,
836 extern "C" EXPORT_API int noti_ex_item_get_channel(noti_ex_item_h handle,
841 extern "C" EXPORT_API int noti_ex_item_set_channel(noti_ex_item_h handle,
842 const char *channel) {
846 extern "C" EXPORT_API int noti_ex_item_set_led_info(noti_ex_item_h handle,
847 noti_ex_led_info_h led) {
851 extern "C" EXPORT_API int noti_ex_item_get_led_info(noti_ex_item_h handle,
852 noti_ex_led_info_h *led) {
856 extern "C" EXPORT_API int noti_ex_item_set_sound_path(noti_ex_item_h handle,
861 extern "C" EXPORT_API int noti_ex_item_set_vibration_path(noti_ex_item_h handle,
866 extern "C" EXPORT_API int noti_ex_item_get_sound_path(noti_ex_item_h handle,
871 extern "C" EXPORT_API int noti_ex_item_get_vibration_path(noti_ex_item_h handle,
876 extern "C" EXPORT_API int noti_ex_item_get_info(noti_ex_item_h handle,
877 noti_ex_item_info_h *info) {
881 extern "C" EXPORT_API int noti_ex_item_get_sender_app_id(noti_ex_item_h handle,
886 extern "C" EXPORT_API int noti_ex_item_set_sender_app_id(noti_ex_item_h handle,
891 extern "C" EXPORT_API int noti_ex_item_get_tag(noti_ex_item_h handle,
896 extern "C" EXPORT_API int noti_ex_item_set_tag(noti_ex_item_h handle,
901 extern "C" EXPORT_API int noti_ex_manager_create(noti_ex_manager_h *handle,
902 const char *receiver_group, noti_ex_manager_events_s ev, void *data) {
906 extern "C" EXPORT_API int noti_ex_manager_deatroy(noti_ex_manager_h handle) {
910 extern "C" EXPORT_API int noti_ex_manager_get(noti_ex_manager_h handle,
911 noti_ex_item_h *items, int *cnt) {
915 extern "C" EXPORT_API int noti_ex_manager_update(noti_ex_manager_h handle,
916 noti_ex_item_h noti) {
920 extern "C" EXPORT_API int noti_ex_manager_delete(noti_ex_manager_h handle,
921 noti_ex_item_h noti) {
925 extern "C" EXPORT_API int noti_ex_manager_delete_all(noti_ex_manager_h handle) {
929 extern "C" EXPORT_API int noti_ex_manager_hide(noti_ex_manager_h handle,
930 noti_ex_item_h noti) {
934 extern "C" EXPORT_API int noti_ex_manager_find_by_root_id(
935 noti_ex_manager_h handle, const char *id, noti_ex_item_h *item) {
939 extern "C" EXPORT_API int noti_ex_manager_send_event(noti_ex_manager_h handle,
940 noti_ex_event_info_h info, noti_ex_item_h noti) {
944 extern "C" EXPORT_API int noti_ex_manager_send_error(noti_ex_manager_h handle,
945 noti_ex_event_info_h info, noti_ex_error_e error) {
949 extern "C" EXPORT_API int noti_ex_manager_get_count(noti_ex_manager_h handle,
954 extern "C" EXPORT_API int noti_ex_item_progress_create(noti_ex_item_h *handle,
955 const char *id, float min, float current, float max) {
959 extern "C" EXPORT_API int noti_ex_item_progress_get_current(
960 noti_ex_item_h handle, float *current) {
964 extern "C" EXPORT_API int noti_ex_item_progress_set_current(
965 noti_ex_item_h handle, float current) {
969 extern "C" EXPORT_API int noti_ex_item_progress_get_min(noti_ex_item_h handle,
974 extern "C" EXPORT_API int noti_ex_item_progress_get_max(noti_ex_item_h handle,
979 extern "C" EXPORT_API int noti_ex_reporter_send_event(noti_ex_reporter_h handle,
980 noti_ex_event_info_h info, noti_ex_item_h noti) {
984 extern "C" EXPORT_API int noti_ex_reporter_send_error(noti_ex_reporter_h handle,
985 noti_ex_event_info_h info, noti_ex_error_e error) {
989 extern "C" EXPORT_API int noti_ex_reporter_post(noti_ex_reporter_h handle,
990 noti_ex_item_h noti) {
994 extern "C" EXPORT_API int noti_ex_reporter_post_list(noti_ex_reporter_h handle,
995 noti_ex_item_h *notiList, int cnt) {
999 extern "C" EXPORT_API int noti_ex_reporter_update(noti_ex_reporter_h handle,
1000 noti_ex_item_h noti) {
1004 extern "C" EXPORT_API int noti_ex_reporter_delete(noti_ex_reporter_h handle,
1005 noti_ex_item_h noti) {
1009 extern "C" EXPORT_API int noti_ex_reporter_delete_all(
1010 noti_ex_reporter_h handle) {
1014 extern "C" EXPORT_API int noti_ex_reporter_find_by_root_id(
1015 noti_ex_reporter_h handle, const char *id, const noti_ex_item_h *item) {
1019 extern "C" EXPORT_API int noti_ex_item_text_create(noti_ex_item_h *handle,
1020 const char *id, const char *text, const char *hyper_link) {
1024 extern "C" EXPORT_API int noti_ex_item_text_set_contents(noti_ex_item_h handle,
1025 const char *contents) {
1029 extern "C" EXPORT_API int noti_ex_item_text_get_contents(noti_ex_item_h handle,
1034 extern "C" EXPORT_API int noti_ex_item_text_get_hyper_link(
1035 noti_ex_item_h handle, char **hyper_link) {
1039 extern "C" EXPORT_API int noti_ex_item_time_create(noti_ex_item_h *handle,
1040 const char *id, time_t time) {
1044 extern "C" EXPORT_API int noti_ex_item_time_get_time(noti_ex_item_h handle,
1049 extern "C" EXPORT_API int noti_ex_action_visibility_create(
1050 noti_ex_action_h *handle, const char *extra) {
1054 extern "C" EXPORT_API int noti_ex_action_visibility_set(noti_ex_action_h handle,
1055 const char *id, bool visible) {