Home | History | Annotate | Download | only in audio
      1 /*
      2  *
      3  *  BlueZ - Bluetooth protocol stack for Linux
      4  *
      5  *  Copyright (C) 2006-2010  Nokia Corporation
      6  *  Copyright (C) 2004-2010  Marcel Holtmann <marcel (at) holtmann.org>
      7  *
      8  *
      9  *  This program is free software; you can redistribute it and/or modify
     10  *  it under the terms of the GNU General Public License as published by
     11  *  the Free Software Foundation; either version 2 of the License, or
     12  *  (at your option) any later version.
     13  *
     14  *  This program is distributed in the hope that it will be useful,
     15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
     16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     17  *  GNU General Public License for more details.
     18  *
     19  *  You should have received a copy of the GNU General Public License
     20  *  along with this program; if not, write to the Free Software
     21  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     22  *
     23  */
     24 
     25 #define AUDIO_SINK_INTERFACE "org.bluez.AudioSink"
     26 
     27 typedef enum {
     28 	SINK_STATE_DISCONNECTED,
     29 	SINK_STATE_CONNECTING,
     30 	SINK_STATE_CONNECTED,
     31 	SINK_STATE_PLAYING,
     32 } sink_state_t;
     33 
     34 typedef void (*sink_state_cb) (struct audio_device *dev,
     35 				sink_state_t old_state,
     36 				sink_state_t new_state,
     37 				void *user_data);
     38 
     39 unsigned int sink_add_state_cb(sink_state_cb cb, void *user_data);
     40 gboolean sink_remove_state_cb(unsigned int id);
     41 
     42 struct sink *sink_init(struct audio_device *dev);
     43 void sink_unregister(struct audio_device *dev);
     44 gboolean sink_is_active(struct audio_device *dev);
     45 avdtp_state_t sink_get_state(struct audio_device *dev);
     46 gboolean sink_new_stream(struct audio_device *dev, struct avdtp *session,
     47 				struct avdtp_stream *stream);
     48 gboolean sink_setup_stream(struct sink *sink, struct avdtp *session);
     49 gboolean sink_shutdown(struct sink *sink);
     50