2 * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
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.
17 #ifndef __NOTIFICATION_ONGOING_H__
18 #define __NOTIFICATION_ONGOING_H__
20 #include <notification.h>
24 #endif /* __cplusplus */
27 * @file notification_ongoing.h
31 ONGOING_TYPE_PROGRESS,
36 struct ongoing_info_s {
47 * @brief Called when a notification ongoing data is updated.
49 * @param[in] info The ongoing information handle
50 * @param[in] data The user data
51 * @pre notification_ongoing_update_cb_set() used to register this callback.
52 * @see notification_ongoing_update_cb_set()
54 typedef void (*notification_ongoing_update_cb)(struct ongoing_info_s *info, void *data);
58 * @brief Registers a callback to receive the ongoing progress, size ,content.
60 * @param[in] callback The callback function
61 * @param[in] data The user_data
62 * @return #NOTIFICATION_ERROR_NONE if success, other value if failure
63 * @retval #NOTIFICATION_ERROR_NONE Success
64 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
65 * @retval #NOTIFICATION_ERROR_FROM_DBUS Error from DBus
67 int notification_ongoing_update_cb_set(notification_ongoing_update_cb callback, void *user_data);
71 * @brief Unregisters a callback to receive.
73 * @retval #NOTIFICATION_ERROR_NONE Success
75 int notification_ongoing_update_cb_unset(void);
78 * @brief Updates progress.
79 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
80 * @param[in] caller_app_id
83 * @return #NOTIFICATION_ERROR_NONE on success,
84 * otherwise any other value on failure
85 * @retval #NOTIFICATION_ERROR_NONE Success
86 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
87 * @retval #NOTIFICATION_ERROR_FROM_DBUS Error from DBus
89 int notification_ongoing_update_progress(const char *caller_app_id,
90 int priv_id, double progress);
93 * @brief Updates size.
94 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
95 * @param[in] caller_app_id
98 * @return #NOTIFICATION_ERROR_NONE on success,
99 * otherwise any other value on failure
100 * @retval #NOTIFICATION_ERROR_NONE Success
101 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
102 * @retval #NOTIFICATION_ERROR_FROM_DBUS Error from DBus
104 int notification_ongoing_update_size(const char *caller_app_id,
105 int priv_id, double size);
108 * @brief Updates content.
109 * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
110 * @param[in] caller_app_id
113 * @return #NOTIFICATION_ERROR_NONE on success,
114 * otherwise any other value on failure
115 * @retval #NOTIFICATION_ERROR_NONE Success
116 * @retval #NOTIFICATION_ERROR_INVALID_PARAMETER Invalid parameter
117 * @retval #NOTIFICATION_ERROR_FROM_DBUS Error from DBus
119 int notification_ongoing_update_content(const char *caller_app_id,
120 int priv_id, const char *content);
128 #endif /* __cplusplus */
129 #endif /* __NOTIFICATION_ONGOING_H__ */