• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 */
23 typedef struct {
24   int id;
25   int scn;
26   int msg_types;
27   char* p_name;
28 } btmce_mas_instance_t;
29 
30 /** callback for get_remote_mas_instances */
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);
34 
35 typedef struct {
36   /** set to sizeof(btmce_callbacks_t) */
37   size_t size;
38   btmce_remote_mas_instances_callback remote_mas_instances_cb;
39 } btmce_callbacks_t;
40 
41 typedef struct {
42   /** set to size of this struct */
43   size_t size;
44 
45   /** register BT MCE callbacks */
46   bt_status_t (*init)(btmce_callbacks_t* callbacks);
47 
48   /** search for MAS instances on remote device */
49   bt_status_t (*get_remote_mas_instances)(RawAddress* bd_addr);
50 } btmce_interface_t;
51 
52 __END_DECLS
53 
54 #endif /* ANDROID_INCLUDE_BT_MCE_H */
55