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

Commit 6ab99c27 authored by Michael Sun's avatar Michael Sun
Browse files

btaa: update hardware include file to be gd ready

Move Activity enum inside ActivityAttributionCallbacks class as this
include file will not cross boundary and be available for the btaa
module within the gd. Rename the Init() function, as btaa within gd
will be modularized, hence the stack will be responsible for the
initialization.

Tag: #feature
Bug: 172501038
Test: m
Change-Id: I371de5399abbfb0929baff0695ea1608e2341347
parent 821bc45a
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -22,22 +22,21 @@
namespace bluetooth {
namespace activity_attribution {

enum class Activity { UNKNOWN = 0, ADVERTISE, CONNECT, SCAN };

class ActivityAttributionCallbacks {
 public:
  enum class Activity { UNKNOWN = 0, ADVERTISE, CONNECT, SCAN };
  virtual ~ActivityAttributionCallbacks() = default;

  /** Callback when Blutooth woke up the system */
  virtual void OnWakeup(Activity activity, const RawAddress& address) = 0;
  virtual void OnWakeup(const Activity activity, const RawAddress& address) = 0;
};

class ActivityAttributionInterface {
 public:
  virtual ~ActivityAttributionInterface() = default;

  /** Register the Activity Attribution callbacks */
  virtual void Init(ActivityAttributionCallbacks* callbacks) = 0;
  /** Register JNI callbacks with the interface. */
  virtual void RegisterCallbacks(ActivityAttributionCallbacks* callbacks) = 0;

  /** Closes the interface. */
  virtual void Cleanup(void) = 0;