tizen 2.3 release
[framework/connectivity/bluez.git] / android / hal-ipc.h
1 /*
2  * Copyright (C) 2013 Intel Corporation
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
18 struct hal_ipc_handler {
19         void (*handler) (void *buf, uint16_t len);
20         bool var_len;
21         size_t data_len;
22 };
23
24 bool hal_ipc_init(void);
25 void hal_ipc_cleanup(void);
26
27 int hal_ipc_cmd(uint8_t service_id, uint8_t opcode, uint16_t len, void *param,
28                                         size_t *rsp_len, void *rsp, int *fd);
29
30 void hal_ipc_register(uint8_t service, const struct hal_ipc_handler *handlers,
31                                                                 uint8_t size);
32 void hal_ipc_unregister(uint8_t service);