From 01d29e5903fada201657cc56cd767754678addee Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 5 Oct 2010 16:16:03 +0300 Subject: 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). --- audio/avdtp.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'audio/avdtp.h') diff --git a/audio/avdtp.h b/audio/avdtp.h index bf10a2f90..91c3f5ca0 100644 --- a/audio/avdtp.h +++ b/audio/avdtp.h @@ -22,11 +22,6 @@ * */ -typedef enum { - AVDTP_ERROR_ERRNO, - AVDTP_ERROR_ERROR_CODE -} avdtp_error_type_t; - typedef enum { AVDTP_SESSION_STATE_DISCONNECTED, AVDTP_SESSION_STATE_CONNECTING, @@ -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); -- cgit v1.2.3