/*
- * 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,
#include <stdint.h>
#include <glib.h>
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
#include <dlog.h>
#ifdef __cplusplus
((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
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,
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 {
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;
/**
* @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);
/**
*/
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
}