blob: 0bb15d40dc81a563fdf66a6edbde645b70e466ca [file] [log] [blame]
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -07001/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_INCLUDE_BT_MCE_H
18#define ANDROID_INCLUDE_BT_MCE_H
19
20__BEGIN_DECLS
21
22/** MAS instance description */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070023typedef struct {
24 int id;
25 int scn;
26 int msg_types;
27 char* p_name;
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070028} btmce_mas_instance_t;
29
30/** callback for get_remote_mas_instances */
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070031typedef void (*btmce_remote_mas_instances_callback)(
32 bt_status_t status, RawAddress* bd_addr, int num_instances,
33 btmce_mas_instance_t* instances);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070034
35typedef struct {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070036 /** set to sizeof(btmce_callbacks_t) */
37 size_t size;
38 btmce_remote_mas_instances_callback remote_mas_instances_cb;
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070039} btmce_callbacks_t;
40
41typedef struct {
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070042 /** set to size of this struct */
43 size_t size;
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070044
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070045 /** register BT MCE callbacks */
46 bt_status_t (*init)(btmce_callbacks_t* callbacks);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070047
Jakub Pawlowski3a3b82c2017-10-18 20:49:54 -070048 /** search for MAS instances on remote device */
49 bt_status_t (*get_remote_mas_instances)(RawAddress* bd_addr);
Jakub Pawlowskif2f207a2017-09-23 14:47:20 -070050} btmce_interface_t;
51
52__END_DECLS
53
54#endif /* ANDROID_INCLUDE_BT_MCE_H */