siri.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. *
  3. * oFono - Open Source Telephony
  4. *
  5. * Copyright (C) 2008-2013 Intel Corporation. All rights reserved.
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  19. *
  20. */
  21. #ifndef __OFONO_SIRI_H
  22. #define __OFONO_SIRI_H
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. #include <ofono/types.h>
  27. struct ofono_siri;
  28. typedef void (*ofono_siri_cb_t)(const struct ofono_error *error,
  29. struct ofono_siri *siri);
  30. struct ofono_siri_driver {
  31. const char *name;
  32. int (*probe)(struct ofono_siri *siri, unsigned int vendor, void *data);
  33. void (*remove)(struct ofono_siri *siri);
  34. void (*set_eyes_free_mode) (struct ofono_siri *siri, ofono_siri_cb_t cb,
  35. unsigned int val);
  36. };
  37. void ofono_siri_set_status(struct ofono_siri *siri, int value);
  38. int ofono_siri_driver_register(const struct ofono_siri_driver *driver);
  39. void ofono_siri_driver_unregister(const struct ofono_siri_driver *driver);
  40. struct ofono_siri *ofono_siri_create(struct ofono_modem *modem,
  41. unsigned int vendor,
  42. const char *driver, void *data);
  43. void ofono_siri_register(struct ofono_siri *siri);
  44. void ofono_siri_remove(struct ofono_siri *siri);
  45. void ofono_siri_set_data(struct ofono_siri *siri, void *data);
  46. void *ofono_siri_get_data(struct ofono_siri *siri);
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #endif /* __OFONO_SIRI_H */