summaryrefslogtreecommitdiffstats
path: root/audio/avdtp.h
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-09-28 13:46:55 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-09-28 13:46:55 +0000
commit847dad179fe16ec395373e4b55d46dcd400c623a (patch)
tree139f0bdc92e1d7ea3be3f787ace5a7064f8e29b3 /audio/avdtp.h
parent11275793e04e21cb7e26d6a7d289f98005a3c478 (diff)
Expose stream setup errors higher up in the call stack
Diffstat (limited to 'audio/avdtp.h')
-rw-r--r--audio/avdtp.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/audio/avdtp.h b/audio/avdtp.h
index e81bf496..6af47e57 100644
--- a/audio/avdtp.h
+++ b/audio/avdtp.h
@@ -21,11 +21,22 @@
*
*/
+typedef enum {
+ AVDTP_ERROR_ERRNO,
+ AVDTP_ERROR_ERROR_CODE
+} avdtp_error_type_t;
+
struct avdtp;
struct avdtp_stream;
struct avdtp_local_sep;
struct avdtp_remote_sep;
-struct avdtp_error;
+struct avdtp_error {
+ avdtp_error_type_t type;
+ union {
+ uint8_t error_code;
+ int posix_errno;
+ } err;
+};
/* SEP capability categories */
#define AVDTP_MEDIA_TRANSPORT 0x01
@@ -177,7 +188,7 @@ struct avdtp_sep_ind {
};
typedef void (*avdtp_discover_cb_t) (struct avdtp *session, GSList *seps,
- int err, void *user_data);
+ struct avdtp_error *err, void *user_data);
struct avdtp *avdtp_get(bdaddr_t *src, bdaddr_t *dst);
@@ -240,7 +251,9 @@ int avdtp_unregister_sep(struct avdtp_local_sep *sep);
avdtp_state_t avdtp_sep_get_state(struct avdtp_local_sep *sep);
+void avdtp_error_init(struct avdtp_error *err, uint8_t type, int id);
const char *avdtp_strerror(struct avdtp_error *err);
+int avdtp_error_code(struct avdtp_error *err);
void avdtp_get_peers(struct avdtp *session, bdaddr_t *src, bdaddr_t *dst);