Merge branch 'tizen' into tizen_5.5
[platform/core/connectivity/bluetooth-frwk.git] / include / bluetooth-telephony-api.h
old mode 100644 (file)
new mode 100755 (executable)
index 50582d1..f0f7101
@@ -1,13 +1,11 @@
 /*
- * bluetooth-frwk
- *
- * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *              http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -22,8 +20,6 @@
 
 #include <stdint.h>
 #include <glib.h>
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
 #include <dlog.h>
 
 #ifdef __cplusplus
@@ -61,6 +57,8 @@ typedef void (*bt_telephony_func_ptr)(int, void *, void *);
                                ((int)BLUETOOTH_TELEPHONY_ERROR_NONE - 0x0D)
 #define BLUETOOTH_TELEPHONY_ERROR_OPERATION_NOT_AVAILABLE \
                                ((int)BLUETOOTH_TELEPHONY_ERROR_NONE - 0x0E)
+#define BLUETOOTH_TELEPHONY_ERROR_PERMISSION_DENIED \
+                                       ((int)BLUETOOTH_TELEPHONY_ERROR_NONE - 0x0F)
 
 #define BT_ADDRESS_STR_LEN 18
 #define BT_ADAPTER_PATH_LEN 50
@@ -115,7 +113,7 @@ typedef enum {
        CSD_CALL_STATUS_SWAP_INITIATED,
 } bt_telephony_call_status_t;
 
-#define BLUETOOTH_EVENT_TYPE_TELEPHONY_BASE    (unsigned int)(0x00100)
+#define BLUETOOTH_EVENT_TYPE_TELEPHONY_BASE    (unsigned int)(0x00500)
 
 typedef enum {
        BLUETOOTH_EVENT_TELEPHONY_ANSWER_CALL = BLUETOOTH_EVENT_TYPE_TELEPHONY_BASE,
@@ -134,6 +132,7 @@ typedef enum {
        BLUETOOTH_EVENT_TELEPHONY_SET_SPEAKER_GAIN,
        BLUETOOTH_EVENT_TELEPHONY_SET_MIC_GAIN,
        BLUETOOTH_EVENT_TELEPHONY_NREC_CHANGED,
+       BLUETOOTH_EVENT_TELEPHONY_VENDOR_AT_CMD,
 } bluetooth_telephony_event_type;
 
 typedef enum {
@@ -147,9 +146,33 @@ typedef enum {
        BLUETOOTH_CALL_STATE_ERROR,
 } bt_telephony_call_state_t;
 
+typedef enum {
+       BLUETOOTH_AGENT_ERROR_NONE,
+       BLUETOOTH_AGENT_ERROR_INTERNAL,
+       BLUETOOTH_AGENT_ERROR_NOT_AVAILABLE,
+       BLUETOOTH_AGENT_ERROR_NOT_CONNECTED,
+       BLUETOOTH_AGENT_ERROR_BUSY,
+       BLUETOOTH_AGENT_ERROR_INVALID_PARAM,
+       BLUETOOTH_AGENT_ERROR_ALREADY_EXSIST,
+       BLUETOOTH_AGENT_ERROR_ALREADY_CONNECTED,
+       BLUETOOTH_AGENT_ERROR_NO_MEMORY,
+       BLUETOOTH_AGENT_ERROR_I_O_ERROR,
+       BLUETOOTH_AGENT_ERROR_OPERATION_NOT_AVAILABLE,
+       BLUETOOTH_AGENT_ERROR_NO_CALL_LOGS,
+       BLUETOOTH_AGENT_ERROR_INVALID_MEMORY_INDEX,
+       BLUETOOTH_AGENT_ERROR_INVALID_CHLD_INDEX,
+       BLUETOOTH_AGENT_ERROR_BATTERY_STATUS,
+       BLUETOOTH_AGENT_ERROR_SIGNAL_STATUS,
+       BLUETOOTH_AGENT_ERROR_NOT_SUPPORTED,
+       BLUETOOTH_AGENT_ERROR_INVALID_NUMBER,
+       BLUETOOTH_AGENT_ERROR_APPLICATION,
+       BLUETOOTH_AGENT_ERROR_INVALID_DTMF,
+} bluetooth_telephony_agent_error_t;
+
 typedef struct {
        unsigned int call_id;
        bt_telephony_call_state_t call_status;
+       char *phone_number;
 } bt_telephony_call_status_info_t;
 
 /**
@@ -301,21 +324,38 @@ gboolean bluetooth_telephony_is_sco_connected(void);
  * @return     int     Zero on Success or reason for error if any.
  *
  */
- int bluetooth_telephony_is_nrec_enabled(gboolean *status);
+int bluetooth_telephony_is_nrec_enabled(gboolean *status);
+
+/**
+ * @brief      The function bluetooth_telephony_is_nrec_enabled  to check
+ *             for wide band speech status
+ *
+ * @return     int     Zero on Success or reason for error if any.
+ *
+ */
+int bluetooth_telephony_is_wbs_mode(gboolean *status);
+
+/**
+ * @brief This function send XSAT vendor specific AT command
+ *
+ * @return     int     Zero on Success or reason for error if any.
+ */
+int bluetooth_telephony_send_vendor_cmd(const char *cmd);
+
 
 /**
  * @brief This function sends request to enable voice recognition feature
  *
  * @return     int     Zero on Success or reason for error if any.
  */
- int bluetooth_telephony_start_voice_recognition(void);
+int bluetooth_telephony_start_voice_recognition(void);
 
 /**
  * @brief This function sends request to disable voice recognition feature
  *
  * @return     int     Zero on Success or reason for error if any.
  */
- int bluetooth_telephony_stop_voice_recognition(void);
+int bluetooth_telephony_stop_voice_recognition(void);
 
 
 /**
@@ -338,6 +378,25 @@ int bluetooth_telephony_get_headset_volume(unsigned int *speaker_gain);
  */
 int bluetooth_telephony_set_speaker_gain(unsigned short speaker_gain);
 
+/**
+ * @brief      The function bluetooth_telephony_is_connected is called to get
+ *     the connection state on AG.
+ *
+ * @param[in]  ag_connnected   Connection state.
+ * @return     int     Zero on Success or reason for error if any.
+ *
+ */
+int bluetooth_telephony_is_connected(gboolean *ag_connected);
+
+/**
+ * @brief      The function bluetooth_telephony_set_active_headset is called to select
+ *     the active headset device for AG role if more than one headset is connected.
+ *
+ * @param[in]  remote_addr     Remote Addr.
+ * @return     int     Zero on Success or reason for error if any.
+ *
+ */
+int bluetooth_telephony_set_active_headset(const char *remote_addr);
 
 #ifdef __cplusplus
 }