Asish Bhattacharya | 8e2277f | 2017-07-20 18:31:55 +0530 | [diff] [blame] | 1 | /* 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 | |
| 16 | enum cmi_api_result { |
| 17 | CMI_API_FAILED = 1, |
| 18 | CMI_API_BUSY, |
| 19 | CMI_API_NO_MEMORY, |
| 20 | CMI_API_NOT_READY, |
| 21 | }; |
| 22 | |
| 23 | enum cmi_api_event { |
| 24 | CMI_API_MSG = 1, |
| 25 | CMI_API_OFFLINE, |
| 26 | CMI_API_ONLINE, |
| 27 | CMI_API_DEINITIALIZED, |
| 28 | }; |
| 29 | |
| 30 | struct cmi_api_notification { |
| 31 | enum cmi_api_event event; |
| 32 | enum cmi_api_result result; |
| 33 | void *message; |
| 34 | }; |
| 35 | |
| 36 | void *cmi_register( |
| 37 | void notification_callback |
| 38 | (const struct cmi_api_notification *parameter), |
| 39 | u32 service); |
| 40 | enum cmi_api_result cmi_deregister(void *reg_handle); |
| 41 | enum cmi_api_result cmi_send_msg(void *message); |
| 42 | |
| 43 | #endif /*__CMI_API__*/ |