Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1fb3594a authored by Chris Manton's avatar Chris Manton
Browse files

enum-ify bta/av/bta_av_int::BTA_AV_ROLE_

Towards readable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I8461819d100f547f367314fbe9162d5397c0e847
parent 8d38c9ea
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -384,16 +384,19 @@ typedef struct {
      p_app_sink_data_cback; /* Sink application callback for media packets */
} tBTA_AV_SEP;

enum : uint8_t {
  /* initiator/acceptor role for adaption */
#define BTA_AV_ROLE_AD_INT 0x00 /* initiator */
#define BTA_AV_ROLE_AD_ACP 0x01 /* acceptor */
  BTA_AV_ROLE_AD_INT = 0x00, /* initiator */
  BTA_AV_ROLE_AD_ACP = 0x01, /* acceptor */

  /* initiator/acceptor signaling roles */
#define BTA_AV_ROLE_START_ACP 0x00
#define BTA_AV_ROLE_START_INT 0x10 /* do not change this value */
  BTA_AV_ROLE_START_ACP = 0x00,
  BTA_AV_ROLE_START_INT = 0x10, /* do not change this value */

#define BTA_AV_ROLE_SUSPEND 0x20     /* suspending on start */
#define BTA_AV_ROLE_SUSPEND_OPT 0x40 /* Suspend on Start option is set */
  BTA_AV_ROLE_SUSPEND = 0x20,     /* suspending on start */
  BTA_AV_ROLE_SUSPEND_OPT = 0x40, /* Suspend on Start option is set */
};
typedef uint8_t tBTA_AV_ROLE;

/* union of all event datatypes */
union tBTA_AV_DATA {