Class Database

Synopsis

#include <bta/gatt/database.h>

class Database

Description

No description yet.

Methods

Clear
Deserialize
IsEmpty
Serialize
Services
ToString

Source

Lines 97-120 in bta/gatt/database.h.

class Database {
 public:
  /* Return true if there are no services in this database. */
  bool IsEmpty() const { return services.empty(); }

  /* Clear the GATT database. This method forces relocation to ensure no extra
   * space is used unnecesarly */
  void Clear() { std::vector<Service>().swap(services); }

  /* Return list of services available in this database */
  const std::vector<Service>& Services() const { return services; }

  std::string ToString() const;

  std::vector<gatt::StoredAttribute> Serialize() const;

  static Database Deserialize(const std::vector<gatt::StoredAttribute>& nv_attr,
                              bool* success);

  friend class DatabaseBuilder;

 private:
  std::vector<Service> services;
};





Add Discussion as Guest

Log in to DocsForge