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

Commit 4f378efb authored by Chris Manton's avatar Chris Manton
Browse files

Enum-ify stack::l2cap::tL2CAP_CFG_RESULT

Bug: 343805011
Test: m .
Flag: EXEMPT, Mechanical Refactor

Change-Id: I000213740f851617fe99d922c493cdb725ca992e
parent dbcd26d9
Loading
Loading
Loading
Loading
+7 −9
Original line number Diff line number Diff line
@@ -314,15 +314,13 @@ inline std::string l2cap_cid_fixed_text(const tL2CAP_CID_FIXED& cid) {

/* Define the L2CAP configuration result codes
*/
#define L2CAP_CFG_OK 0
#define L2CAP_CFG_UNACCEPTABLE_PARAMS 1
#define L2CAP_CFG_FAILED_NO_REASON 2
#define L2CAP_CFG_UNKNOWN_OPTIONS 3
#define L2CAP_CFG_PENDING 4

static_assert(L2CAP_CONN_OTHER_ERROR != L2CAP_CFG_FAILED_NO_REASON,
              "Different error code should be provided for Connect error and "
              "Config error");
typedef enum : uint16_t {
  L2CAP_CFG_OK = 0,
  L2CAP_CFG_UNACCEPTABLE_PARAMS = 1,
  L2CAP_CFG_FAILED_NO_REASON = 2,
  L2CAP_CFG_UNKNOWN_OPTIONS = 3,
  L2CAP_CFG_PENDING = 4,
} tL2CAP_CFG_RESULT;

/* Define the L2CAP configuration option types
*/