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);
77 int notification_ongoing_update_progress(const char *caller_pkgname,
81 int notification_ongoing_update_size(const char *caller_pkgname,
82 int priv_id, double size);
84 int notification_ongoing_update_content(const char *caller_pkgname,
85 int priv_id, const char *content);
93 #endif /* __cplusplus */
94 #endif /* __NOTIFICATION_ONGOING_H__ */