#include <dbus/dbus.h>
#include <stdint.h>
#include <unistd.h>
#include <sys/types.h>
#include <libplayback/playback-macros.h>
#include <libplayback/playback-types.h>
Go to the source code of this file.
Namespaces | |
namespace | PB |
Typedefs | |
typedef typedefPB_BEGIN_DECLS struct pb_playback_s | pb_playback_t |
pb_playback_t: | |
typedef struct pb_req_s | pb_req_t |
pb_req_t: | |
typedef void(* | PBStateRequest )(pb_playback_t *pb, enum pb_state_e req_state, pb_req_t *ext_req, void *data) |
PBStateRequest:. | |
typedef void(* | PBStateHint )(pb_playback_t *pb, const int allowed_state[], void *data) |
PBStateHint:. | |
typedef void(* | PBPrivacyCb )(int override, const char *error, void *data) |
PBOverrideCb:. | |
typedef void(* | PBMuteCb )(int mute, const char *error, void *data) |
PBMuteCb:. | |
typedef void(* | PBBluetoothCb )(enum pb_bt_override_status_e, const char *error, void *data) |
PBBluetoothCb:. | |
typedef void(* | PBStateReply )(pb_playback_t *pb, enum pb_state_e granted_state, const char *reason, pb_req_t *req, void *data) |
PBStateReply:. | |
Functions | |
pb_playback_t * | pb_playback_new_2 (DBusConnection *connection, enum pb_class_e pb_class, uint32_t flags, enum pb_state_e pb_state, PBStateRequest state_req_handler, void *data) |
pb_playback_new_2: | |
pb_playback_t * | pb_playback_new (DBusConnection *connection, enum pb_class_e pb_class, enum pb_state_e pb_state, PBStateRequest state_req_handler, void *data) |
pb_playback_new: | |
void | pb_playback_set_state_hint (pb_playback_t *pb, PBStateHint state_hint_handler, void *data) |
pb_req_t * | pb_playback_req_state (pb_playback_t *pb, enum pb_state_e pb_state, PBStateReply state_reply, void *data) |
pb_playback_req_state: | |
int | pb_get_privacy_override (DBusConnection *connection) |
pb_get_privacy_override: | |
int | pb_req_privacy_override (DBusConnection *connection, int override) |
pb_req_privacy_override: | |
int | pb_get_mute (DBusConnection *connection) |
pb_get_mute: | |
int | pb_req_mute (DBusConnection *connection, int mute) |
pb_req_mute: | |
int | pb_get_bluetooth_override (DBusConnection *connection) |
pb_get_bluetooth_override: | |
int | pb_req_bluetooth_override (DBusConnection *connection, int override) |
pb_req_bluetooth_override: | |
void | pb_set_privacy_override_cb (DBusConnection *connection, PBPrivacyCb privacy_cb, void *data) |
pb_set_privacy_override_cb: | |
void | pb_set_mute_cb (DBusConnection *connection, PBMuteCb mute_cb, void *data) |
pb_set_mute_cb: | |
void | pb_set_bluetooth_override_cb (DBusConnection *connection, PBBluetoothCb bluetooth_cb, void *data) |
pb_set_bluetooth_override_cb: | |
void | pb_playback_set_pid (pb_playback_t *pb, pid_t pid) |
pb_playback_set_pid: | |
void | pb_playback_set_stream (pb_playback_t *pb, char *stream) |
int | pb_playback_req_discarded (pb_playback_t *pb, pb_req_t *req, const char *reason) |
int | pb_playback_req_completed (pb_playback_t *pb, pb_req_t *req) |
void | pb_playback_destroy (pb_playback_t *pb) |
typedef typedefPB_BEGIN_DECLS struct pb_playback_s pb_playback_t |
pb_playback_t:
Opaque structure that acts as a RPC object for the playback management. (hide the D-Bus interface implementation, methods, signals, introspection...)
typedef struct pb_req_s pb_req_t |
pb_req_t:
A request handler (a private data that enable tracking of messages)
typedef void(* PBBluetoothCb)(enum pb_bt_override_status_e, const char *error, void *data) |
PBBluetoothCb:.
[out] | override | Boolean state of the bluetooth override |
[out] | error | Error string or NULL if no errors |
[out] | data | The pointer associated to the callback |
typedef void(* PBMuteCb)(int mute, const char *error, void *data) |
PBMuteCb:.
[out] | mute | Boolean state of the mute setting |
[out] | error | Error string or NULL if no errors |
[out] | data | The pointer associated to the callback |
typedef void(* PBPrivacyCb)(int override, const char *error, void *data) |
PBOverrideCb:.
[out] | override | Boolean state of the privacy override |
[out] | error | Error string or NULL if no errors |
[out] | data | The pointer associated to the callback |
typedef void(* PBStateHint)(pb_playback_t *pb, const int allowed_state[], void *data) |
PBStateHint:.
[out] | pb | the playback object |
[out] | allowed_state | an array of boolean (ie: allowed_state[PB_STATE_PLAY]) |
typedef void(* PBStateReply)(pb_playback_t *pb, enum pb_state_e granted_state, const char *reason, pb_req_t *req, void *data) |
PBStateReply:.
[out] | pb | the playback object |
[out] | granted_state | the state granted (or PB_STATE_NONE if denied) |
[out] | reason | the human readable string explanation if request failed |
[out] | req | request handler associated with the state_request() call |
[out] | data | the pointer associated with the callback (from pb_playback_request_state) |
typedef void(* PBStateRequest)(pb_playback_t *pb, enum pb_state_e req_state, pb_req_t *ext_req, void *data) |
PBStateRequest:.
[out] | pb | the playback object |
[out] | req_state | the requested state |
[out] | ext_req | the request from external source (usually the manager) |
[out] | data | the pointer associated to the callback (in pb_playback_new) |
int pb_get_bluetooth_override | ( | DBusConnection * | connection | ) |
pb_get_bluetooth_override:
[in] | connection | D-Bus Connection |
The bluetooth override is used when application wants to move the audio from a bluetooth sink to the master device.
int pb_get_mute | ( | DBusConnection * | connection | ) |
pb_get_mute:
[in] | connection | D-Bus Connection |
int pb_get_privacy_override | ( | DBusConnection * | connection | ) |
pb_get_privacy_override:
[in] | connection | D-Bus Connection |
void pb_playback_destroy | ( | pb_playback_t * | pb | ) |
pb_playback_t* pb_playback_new | ( | DBusConnection * | connection, | |
enum pb_class_e | pb_class, | |||
enum pb_state_e | pb_state, | |||
PBStateRequest | state_req_handler, | |||
void * | data | |||
) |
pb_playback_new:
[in] | connection | an initialized DBusConnection |
[in] | pb_class | the playback class (eg. PB_CLASS_VOIP) |
[in] | pb_state | the playback state (eg. PB_STATE_STOP) |
[in] | state_req_handler | Mandatory handler for state change requests |
[in] | data | Pointer associated with the handler |
pb_playback_t* pb_playback_new_2 | ( | DBusConnection * | connection, | |
enum pb_class_e | pb_class, | |||
uint32_t | flags, | |||
enum pb_state_e | pb_state, | |||
PBStateRequest | state_req_handler, | |||
void * | data | |||
) |
pb_playback_new_2:
[in] | connection | an initialized DBusConnection |
[in] | pb_class | the playback class (eg. PB_CLASS_VOIP) |
[in] | flags | Request domain (eg. audio, video, audio rec, video rec) |
[in] | pb_state | the playback state (eg. PB_STATE_STOP) |
[in] | state_req_handler | Mandatory handler for state change requests |
[in] | data | Pointer associated with the handler |
int pb_playback_req_completed | ( | pb_playback_t * | pb, | |
pb_req_t * | req | |||
) |
int pb_playback_req_discarded | ( | pb_playback_t * | pb, | |
pb_req_t * | req, | |||
const char * | reason | |||
) |
pb_req_t* pb_playback_req_state | ( | pb_playback_t * | pb, | |
enum pb_state_e | pb_state, | |||
PBStateReply | state_reply, | |||
void * | data | |||
) |
pb_playback_req_state:
[in] | pb | the playback object |
[in] | pb_state | the state the playback wants to be in |
[in] | granted_reply | the callback that get the answer |
[in] | data | user data associated with the callback |
void pb_playback_set_pid | ( | pb_playback_t * | pb, | |
pid_t | pid | |||
) |
pb_playback_set_pid:
[in] | pb | the playback object |
[in] | pid | Process id of the process that does the actual playing |
void pb_playback_set_state_hint | ( | pb_playback_t * | pb, | |
PBStateHint | state_hint_handler, | |||
void * | data | |||
) |
void pb_playback_set_stream | ( | pb_playback_t * | pb, | |
char * | stream | |||
) |
int pb_req_bluetooth_override | ( | DBusConnection * | connection, | |
int | override | |||
) |
pb_req_bluetooth_override:
[in] | connection | D-Bus Connection |
[in] | override | Desired bluetooth override status (0 if false, otherwise true) |
int pb_req_mute | ( | DBusConnection * | connection, | |
int | mute | |||
) |
pb_req_mute:
[in] | connection | D-Bus Connection |
[in] | override | Desired mute status (0 if false, otherwise true) |
int pb_req_privacy_override | ( | DBusConnection * | connection, | |
int | override | |||
) |
pb_req_privacy_override:
[in] | connection | D-Bus Connection |
[in] | override | Desired privacy override status (0 if false, otherwise true) |
void pb_set_bluetooth_override_cb | ( | DBusConnection * | connection, | |
PBBluetoothCb | bluetooth_cb, | |||
void * | data | |||
) |
pb_set_bluetooth_override_cb:
[in] | connection | d-bus connection |
[in] | bluetooth_cb | the callback for bluetooth override status messages |
[in] | data | user data for the callback |
void pb_set_mute_cb | ( | DBusConnection * | connection, | |
PBMuteCb | mute_cb, | |||
void * | data | |||
) |
pb_set_mute_cb:
[in] | connection | d-bus connection |
[in] | mute_cb | the callback for muting status messages |
[in] | data | user data for the callback |
void pb_set_privacy_override_cb | ( | DBusConnection * | connection, | |
PBPrivacyCb | privacy_cb, | |||
void * | data | |||
) |
pb_set_privacy_override_cb:
[in] | connection | d-bus connection |
[in] | privacy_cb | the callback for privacy override status messages |
[in] | data | user data for the callback |