diff options
author | Luiz Augusto von Dentz <luiz.dentz-von@nokia.com> | 2010-10-05 16:16:03 +0300 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz-von@nokia.com> | 2010-10-11 12:27:01 +0300 |
commit | 01d29e5903fada201657cc56cd767754678addee (patch) | |
tree | 6b3b70c1fb443dafec170cbdc0dbc240ac4e3f34 /audio/avdtp.h | |
parent | c6ed0d5e0622d563a8b8782d0d72fbc04d39ff49 (diff) |
Make use of avdtp category when setting errors
In order to forward and create avdtp error properly for setconf command
we need to have the category, to fix this avdtp_error_t now carries the
category as define in avdtp and a new category is used for errno
(AVDTP_ERRNO).
Diffstat (limited to 'audio/avdtp.h')
-rw-r--r-- | audio/avdtp.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/audio/avdtp.h b/audio/avdtp.h index bf10a2f90..91c3f5ca0 100644 --- a/audio/avdtp.h +++ b/audio/avdtp.h @@ -23,11 +23,6 @@ */ typedef enum { - AVDTP_ERROR_ERRNO, - AVDTP_ERROR_ERROR_CODE -} avdtp_error_type_t; - -typedef enum { AVDTP_SESSION_STATE_DISCONNECTED, AVDTP_SESSION_STATE_CONNECTING, AVDTP_SESSION_STATE_CONNECTED @@ -38,7 +33,7 @@ struct avdtp_stream; struct avdtp_local_sep; struct avdtp_remote_sep; struct avdtp_error { - avdtp_error_type_t type; + uint8_t category; union { uint8_t error_code; int posix_errno; @@ -54,6 +49,7 @@ struct avdtp_error { #define AVDTP_MULTIPLEXING 0x06 #define AVDTP_MEDIA_CODEC 0x07 #define AVDTP_DELAY_REPORTING 0x08 +#define AVDTP_ERRNO 0xff /* AVDTP error definitions */ #define AVDTP_BAD_HEADER_FORMAT 0x01 @@ -299,7 +295,7 @@ 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); -avdtp_error_type_t avdtp_error_type(struct avdtp_error *err); +uint8_t avdtp_error_category(struct avdtp_error *err); int avdtp_error_error_code(struct avdtp_error *err); int avdtp_error_posix_errno(struct avdtp_error *err); |