Initial release of status lib(tagging)
[framework/appfw/status.git] / include / status-monitor.h
1 /*
2  *  libstatus
3  *
4  * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Youngjoo Park <yjoo93.park@samsung.com>,
7  *      Seungtaek Chung <seungtaek.chung@samsung.com>, Youngsub Ko <ys4610.ko@samsung.com>
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  */
22
23 #ifndef __STATUS_MONITOR_DEF_H__
24 #define __STATUS_MONITOR_DEF_H__
25
26 #include <status-type.h>
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31
32 /**
33  * @defgroup STATUS_MONITOR_LIBRARY notification status monitor Library
34  * @brief This notification status monitor library used to display simple plain message on indicator
35  */
36
37 /**
38  * @ingroup STATUS_MONITOR_LIBRARY
39  * @defgroup STATUS_MONITOR_TYPE notification status monitor type
40  * @brief notification status monitor side type
41  */
42
43 /**
44  * @addtogroup STATUS_MONITOR_TYPE
45  * @{
46  */
47
48  /**
49  * @brief Called when new message is posted
50  * @param[in] message The message posted
51  * @param[in] data user data
52  * @pre status_monitor_message_cb_set() used to register this callback
53  * @see status_monitor_message_cb_set()
54  */
55 typedef void (*status_message_cb)(const char *message, void *data);
56
57 /**
58 * @brief This callback type will be deprecated
59 */
60 typedef void (*status_background_state_cb)(const status_background_type_e type,
61                         status_background_state_e state, void *data);
62
63 /**
64  * @addtogroup STATUS_MONITOR_LIBRARY
65  * @{
66  */
67
68 /**
69 * @brief register callback for receiving message
70 * @param[in] callback The callback function
71 * @param[in] data user_data
72 */
73 int status_monitor_message_cb_set(status_message_cb callback, void *user_data);
74
75 /**
76 * @brief This function will be deprecated
77 */
78 int status_monitor_state_cb_set(const status_background_type_e type,
79                 status_background_state_cb callback, void *user_data);
80
81 /**
82 * @brief unregister callback for receiving message
83 * @param[in] callback The callback function
84 * @param[in] data user_data
85 */
86 int status_monitor_message_cb_unset(void);
87
88 /**
89 * @brief This function will be deprecated
90 */
91 int status_monitor_state_cb_unset(const status_background_type_e type);
92
93 /**
94 * @brief This function will be deprecated
95 */
96 int status_monitor_state_get(const status_background_type_e type,
97                 status_background_state_e *state);
98
99 #ifdef __cplusplus
100 }
101 #endif /* __cplusplus */
102 #endif /* __STATUS_MONITOR_DEF_H__ */
103