Union tBTA_AG_DATA

Synopsis

#include <bta/ag/bta_ag_int.h>

union tBTA_AG_DATA

Description

No description yet.

Methods

IsEmptyCheck if this union is empty by comparing it to the kEmpty constant
operator==Check if two tBTA_AG_DATA are equal in memory

Source

Lines 154-179 in bta/ag/bta_ag_int.h.

union tBTA_AG_DATA {
  tBTA_AG_API_REGISTER api_register;
  tBTA_AG_API_OPEN api_open;
  tBTA_AG_API_RESULT api_result;
  tBTA_AG_API_SETCODEC api_setcodec;
  tBTA_AG_DISC_RESULT disc_result;
  tBTA_AG_RFC rfc;
  static const tBTA_AG_DATA kEmpty;

  /**
   * Check if two tBTA_AG_DATA are equal in memory
   *
   * @param rhs other tBTA_AG_DATA
   * @return true if both unions are equal in memory
   */
  bool operator==(const tBTA_AG_DATA& rhs) const {
    return (std::memcmp(this, &rhs, sizeof(tBTA_AG_DATA)) == 0);
  }

  /**
   * Check if this union is empty by comparing it to the kEmpty constant
   *
   * @return true if this union is empty
   */
  bool IsEmpty() const { return *this == kEmpty; }
};





Add Discussion as Guest

Log in to DocsForge