Jakub Pawlowski | f2f207a | 2017-09-23 14:47:20 -0700 | [diff] [blame] | 1 | /* |
| 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 Pawlowski | 3a3b82c | 2017-10-18 20:49:54 -0700 | [diff] [blame] | 23 | typedef struct { |
| 24 | int id; |
| 25 | int scn; |
| 26 | int msg_types; |
| 27 | char* p_name; |
Jakub Pawlowski | f2f207a | 2017-09-23 14:47:20 -0700 | [diff] [blame] | 28 | } btmce_mas_instance_t; |
| 29 | |
| 30 | /** callback for get_remote_mas_instances */ |
Jakub Pawlowski | 3a3b82c | 2017-10-18 20:49:54 -0700 | [diff] [blame] | 31 | typedef void (*btmce_remote_mas_instances_callback)( |
| 32 | bt_status_t status, RawAddress* bd_addr, int num_instances, |
| 33 | btmce_mas_instance_t* instances); |
Jakub Pawlowski | f2f207a | 2017-09-23 14:47:20 -0700 | [diff] [blame] | 34 | |
| 35 | typedef struct { |
Jakub Pawlowski | 3a3b82c | 2017-10-18 20:49:54 -0700 | [diff] [blame] | 36 | /** set to sizeof(btmce_callbacks_t) */ |
| 37 | size_t size; |
| 38 | btmce_remote_mas_instances_callback remote_mas_instances_cb; |
Jakub Pawlowski | f2f207a | 2017-09-23 14:47:20 -0700 | [diff] [blame] | 39 | } btmce_callbacks_t; |
| 40 | |
| 41 | typedef struct { |
Jakub Pawlowski | 3a3b82c | 2017-10-18 20:49:54 -0700 | [diff] [blame] | 42 | /** set to size of this struct */ |
| 43 | size_t size; |
Jakub Pawlowski | f2f207a | 2017-09-23 14:47:20 -0700 | [diff] [blame] | 44 | |
Jakub Pawlowski | 3a3b82c | 2017-10-18 20:49:54 -0700 | [diff] [blame] | 45 | /** register BT MCE callbacks */ |
| 46 | bt_status_t (*init)(btmce_callbacks_t* callbacks); |
Jakub Pawlowski | f2f207a | 2017-09-23 14:47:20 -0700 | [diff] [blame] | 47 | |
Jakub Pawlowski | 3a3b82c | 2017-10-18 20:49:54 -0700 | [diff] [blame] | 48 | /** search for MAS instances on remote device */ |
| 49 | bt_status_t (*get_remote_mas_instances)(RawAddress* bd_addr); |
Jakub Pawlowski | f2f207a | 2017-09-23 14:47:20 -0700 | [diff] [blame] | 50 | } btmce_interface_t; |
| 51 | |
| 52 | __END_DECLS |
| 53 | |
| 54 | #endif /* ANDROID_INCLUDE_BT_MCE_H */ |