2 * Copyright (c) 2011 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 __CAPI_TELEPHONY_PRIVATE_H__
18 #define __CAPI_TELEPHONY_PRIVATE_H__
22 #include <system_info.h>
23 #include "telephony_common.h"
24 #include "telephony_call.h"
26 #define TELEPHONY_FEATURE "http://tizen.org/feature/network.telephony"
31 #define LOG_TAG "CAPI_TELEPHONY"
33 #define CHECK_INPUT_PARAMETER(arg) \
35 LOGE("INVALID_PARAMETER"); \
36 return TELEPHONY_ERROR_INVALID_PARAMETER; \
39 #define CHECK_TELEPHONY_SUPPORTED(feature_name) { \
40 bool telephony_supported = FALSE; \
41 if (!system_info_get_platform_bool(feature_name, &telephony_supported)) { \
42 if (telephony_supported == FALSE) { \
43 LOGE("telephony feature is disabled"); \
44 return TELEPHONY_ERROR_NOT_SUPPORTED; \
47 LOGE("Error - Feature getting from System Info"); \
48 return TELEPHONY_ERROR_OPERATION_FAILED; \
53 * @brief Definition for the max length of call number
56 #define TELEPHONY_CALL_NUMBER_LEN_MAX 82
60 struct tapi_handle *tapi_h;
64 * Need to define the struct same as tapi_handle of libslp-tapi
65 * because we are request dbus directly using dbus_connection, path
68 gpointer dbus_connection;
75 GHashTable *cache_property;
76 guint prop_callback_evt_id;
80 * @brief The structure type for the call information.
84 unsigned int id; /**< The handle of the call */
85 char number[TELEPHONY_CALL_NUMBER_LEN_MAX + 1]; /**< Calling number */
86 telephony_call_type_e type; /**< Type of call (voice, video, emergency) */
87 telephony_call_status_e status; /**< Call Status */
88 telephony_call_direction_e direction; /**< Call direction (MO, MT) */
89 bool conference_status; /**< true: Conference call, false: Single call */
90 } telephony_call_info_s;
92 #endif /* __CAPI_TELEPHONY_PRIVATE_H__ */