summaryrefslogtreecommitdiffstats
path: root/device/bluetooth/android/bluetooth_jni_registrar.cc
blob: 398b1427fe51236817c05fb572dbec1d5c691960 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "device/bluetooth/android/bluetooth_jni_registrar.h"

#include "base/android/jni_android.h"
#include "base/android/jni_registrar.h"
#include "base/macros.h"
#include "device/bluetooth/android/wrappers.h"
#include "device/bluetooth/bluetooth_adapter_android.h"
#include "device/bluetooth/bluetooth_device_android.h"
#include "device/bluetooth/bluetooth_remote_gatt_characteristic_android.h"
#include "device/bluetooth/bluetooth_remote_gatt_descriptor_android.h"
#include "device/bluetooth/bluetooth_remote_gatt_service_android.h"

namespace device {
namespace android {
namespace {

const base::android::RegistrationMethod kRegisteredMethods[] = {
    {"BluetoothAdapterAndroid", device::BluetoothAdapterAndroid::RegisterJNI},
    {"BluetoothDeviceAndroid", device::BluetoothDeviceAndroid::RegisterJNI},
    {"BluetoothRemoteGattCharacteristicAndroid",
     device::BluetoothRemoteGattCharacteristicAndroid::RegisterJNI},
    {"BluetoothRemoteGattDescriptorAndroid",
     device::BluetoothRemoteGattDescriptorAndroid::RegisterJNI},
    {"BluetoothRemoteGattServiceAndroid",
     device::BluetoothRemoteGattServiceAndroid::RegisterJNI},
    {"Wrappers", device::WrappersRegisterJNI},
};

}  // namespace

bool RegisterBluetoothJni(JNIEnv* env) {
  return RegisterNativeMethods(env, kRegisteredMethods,
                               arraysize(kRegisteredMethods));
}

}  // namespace android
}  // namespace device