wcd_cmi_api.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #ifndef __CMI_API__
  13. #define __CMI_API__
  14. enum cmi_api_result {
  15. CMI_API_FAILED = 1,
  16. CMI_API_BUSY,
  17. CMI_API_NO_MEMORY,
  18. CMI_API_NOT_READY,
  19. };
  20. enum cmi_api_event {
  21. CMI_API_MSG = 1,
  22. CMI_API_OFFLINE,
  23. CMI_API_ONLINE,
  24. CMI_API_DEINITIALIZED,
  25. };
  26. struct cmi_api_notification {
  27. enum cmi_api_event event;
  28. enum cmi_api_result result;
  29. void *message;
  30. };
  31. void *cmi_register(
  32. void notification_callback
  33. (const struct cmi_api_notification *parameter),
  34. u32 service);
  35. enum cmi_api_result cmi_deregister(void *reg_handle);
  36. enum cmi_api_result cmi_send_msg(void *message);
  37. #endif /*__CMI_API__*/