bt_mce.h revision 053cccfe14ed78dde8ee30f4fe79864c4f0c8137
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 */
23typedef struct
24{
25    int  id;
26    int  scn;
27    int  msg_types;
28    char *p_name;
29} btmce_mas_instance_t;
30
31/** callback for get_remote_mas_instances */
32typedef void (*btmce_remote_mas_instances_callback)(bt_status_t status, bt_bdaddr_t *bd_addr,
33                                                    int num_instances, btmce_mas_instance_t *instances);
34
35typedef 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
41typedef 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)(bt_bdaddr_t *bd_addr);
50} btmce_interface_t;
51
52__END_DECLS
53
54#endif /* ANDROID_INCLUDE_BT_MCE_H */
55