From 6763ebb3c231740c66a235f94d56e8d8cc213d90 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sat, 11 Aug 2007 11:05:24 +0000 Subject: Integrate A2DP work from Johan's and Luiz's GIT trees --- audio/headset.h | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'audio/headset.h') diff --git a/audio/headset.h b/audio/headset.h index d3fd86d9..530bdea8 100644 --- a/audio/headset.h +++ b/audio/headset.h @@ -20,12 +20,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * */ +#ifndef __AUDIO_HEADSET_H__ +#define __AUDIO_HEADSET_H__ + #include #include #include -#include "unix.h" +#include "ipc.h" #define AUDIO_HEADSET_INTERFACE "org.bluez.audio.Headset" @@ -40,11 +43,11 @@ typedef enum { } headset_event_t; typedef enum { - HEADSET_STATE_DISCONNECTED = STATE_DISCONNECTED, - HEADSET_STATE_CONNECT_IN_PROGRESS = STATE_CONNECTING, - HEADSET_STATE_CONNECTED = STATE_CONNECTED, - HEADSET_STATE_PLAY_IN_PROGRESS = STATE_STREAM_STARTING, - HEADSET_STATE_PLAYING = STATE_STREAMING, + HEADSET_STATE_DISCONNECTED, + HEADSET_STATE_CONNECT_IN_PROGRESS, + HEADSET_STATE_CONNECTED, + HEADSET_STATE_PLAY_IN_PROGRESS, + HEADSET_STATE_PLAYING } headset_state_t; typedef enum { @@ -55,13 +58,14 @@ typedef enum { struct headset; struct headset *headset_init(void *device, sdp_record_t *record, - uint16_t svc); + uint16_t svc); void headset_free(void *device); void headset_update(void *device, sdp_record_t *record, uint16_t svc); -int headset_get_config(void *device, int sock, struct ipc_packet *pkt); +int headset_get_config(void *device, int sock, struct ipc_packet *pkt, + int pkt_len, struct ipc_data_cfg **rsp); headset_type_t headset_get_type(void *device); void headset_set_type(void *device, headset_type_t type); @@ -73,3 +77,7 @@ headset_state_t headset_get_state(void *device); void headset_set_state(void *device, headset_state_t state); int headset_get_channel(void *device); + +gboolean headset_is_active(void *device); + +#endif -- cgit