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

Commit 99ec1416 authored by Michael Sun's avatar Michael Sun Committed by Automerger Merge Worker
Browse files

btaa: new include files in bt stack for BTAA interface am: bebf3793

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1488138

Change-Id: Ibc0fa44554ebb37a97981ef11cc8f40afbe17301
parents bca0eeb0 bebf3793
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@
#define BT_PROFILE_AV_RC_CTRL_ID "avrcp_ctrl"
#define BT_PROFILE_HEARING_AID_ID "hearing_aid"
#define BT_KEYSTORE_ID "bluetooth_keystore"
#define BT_ACTIVITY_ATTRIBUTION_ID "activity_attribution"

/** Bluetooth Device Name */
typedef struct { uint8_t name[249]; } __attribute__((packed)) bt_bdname_t;
+49 −0
Original line number Diff line number Diff line
/*
 * Copyright 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef ANDROID_INCLUDE_BT_ACTIVITY_ATTRIBUTION_H
#define ANDROID_INCLUDE_BT_ACTIVITY_ATTRIBUTION_H

#include "raw_address.h"

namespace bluetooth {
namespace activity_attribution {

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

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

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

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

  /** Register the Activity Attribution callbacks */
  virtual void Init(ActivityAttributionCallbacks* callbacks) = 0;

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

}  // namespace activity_attribution
}  // namespace bluetooth

#endif /* ANDROID_INCLUDE_BT_ACTIVITY_ATTRIBUTION_H */