blob: 39be6417e3270b9219bfeb94f54376f4f45790d1 [file] [log] [blame]
Asish Bhattacharya8e2277f2017-07-20 18:31:55 +05301/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef __CMI_API__
14#define __CMI_API__
15
16enum cmi_api_result {
17 CMI_API_FAILED = 1,
18 CMI_API_BUSY,
19 CMI_API_NO_MEMORY,
20 CMI_API_NOT_READY,
21};
22
23enum cmi_api_event {
24 CMI_API_MSG = 1,
25 CMI_API_OFFLINE,
26 CMI_API_ONLINE,
27 CMI_API_DEINITIALIZED,
28};
29
30struct cmi_api_notification {
31 enum cmi_api_event event;
32 enum cmi_api_result result;
33 void *message;
34};
35
36void *cmi_register(
37 void notification_callback
38 (const struct cmi_api_notification *parameter),
39 u32 service);
40enum cmi_api_result cmi_deregister(void *reg_handle);
41enum cmi_api_result cmi_send_msg(void *message);
42
43#endif /*__CMI_API__*/