Merge branch 'tizen' into tizen_5.5
[platform/core/connectivity/bluetooth-frwk.git] / include / bluetooth-telephony-api.h
index b8e76f1..f0f7101 100755 (executable)
@@ -1,11 +1,5 @@
 /*
- * Bluetooth-telephony
- *
- * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:    Hocheol Seo <hocheol.seo@samsung.com>
- *             GirishAshok Joshi <girish.joshi@samsung.com>
- *             Chanyeol Park <chanyeol.park@samsung.com>
+ * 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.
@@ -26,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
@@ -154,6 +146,29 @@ 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;
@@ -309,7 +324,7 @@ 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
@@ -318,14 +333,14 @@ gboolean bluetooth_telephony_is_sco_connected(void);
  * @return     int     Zero on Success or reason for error if any.
  *
  */
- int bluetooth_telephony_is_wbs_mode(gboolean *status);
+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);
+int bluetooth_telephony_send_vendor_cmd(const char *cmd);
 
 
 /**
@@ -333,14 +348,14 @@ gboolean bluetooth_telephony_is_sco_connected(void);
  *
  * @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);
 
 
 /**
@@ -363,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
 }