4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Ja-young Gu <jygu@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
21 #ifndef _TAPI_COMMON_H_
22 #define _TAPI_COMMON_H_
25 * @addtogroup TAPI_COMMON
29 * @brief TAPI Common Interface
35 #include <tapi_type.h>
36 #include <tapi_event.h>
43 * @brief Fetches the list of available CPs
45 * @par Sync (or) Async:
50 * @return #List of available CPs on SUCCESS and NULL on FAILURE.
52 char** tel_get_cp_name_list(void);
55 * @brief Acquires a TAPI Handle for specified CP name
57 * @par Sync (or) Async:
60 * @param[in] cp_name CP Name against which TAPI handle is required \n
61 * NULL CP Name will return TapiHandle bound to the first CP in the list of available CPs
63 * @return #TapiHandle on SUCCESS and NULL on FAILURE.
65 TapiHandle* tel_init(const char *cp_name);
68 * @brief De-initializes the TAPI Handle
70 * @par Sync (or) Async:
73 * @param[in] handle #TapiHandle obtained from tel_init()
75 * @return #TapiResult_t
77 int tel_deinit(TapiHandle *handle);
80 * @brief Registers Notification CallBack for events on DBus interface
82 * @par Sync (or) Async:
85 * @param[in] handle #TapiHandle obtained from tel_init()
87 * @param[in] noti_id Notification Id for which callback has to be registered
89 * @param[in] callback #tapi_notification_cb Notification callback which will be invoked on event
91 * @param user_data User Data
93 * @return #TapiResult_t
95 int tel_register_noti_event(TapiHandle *handle, const char *noti_id,
96 tapi_notification_cb callback, void *user_data);
99 * @brief De-Registers Notification CallBack for events on DBus interface
101 * @par Sync (or) Async:
104 * @param[in] handle #TapiHandle obtained from tel_init()
106 * @param[in] noti_id Notification Id for which callback has to be de-registered
108 * @return #TapiResult_t
110 int tel_deregister_noti_event(TapiHandle *handle, const char *noti_id);
113 * @brief Gets the property value in integer format for given property
115 * @par Sync (or) Async:
118 * @param[in] handle #TapiHandle obtained from tel_init()
120 * @param[in] property Property which is to be retrieved from Dbus
122 * @param[out] result Property value in integer format
124 * @return #TapiResult_t
126 int tel_get_property_int(TapiHandle *handle, const char *property, int *result);
129 * @brief Gets the property value in string format for given property
131 * @par Sync (or) Async:
134 * @param[in] handle #TapiHandle obtained from tel_init()
136 * @param[in] property Property which is to be retrieved from Dbus
138 * @param[out] result Property value in string format
140 * @return #TapiResult_t
142 int tel_get_property_string(TapiHandle *handle, const char *property, char **result);
150 #endif /* _TAPI_COMMON_H_ */