call-settings.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. *
  3. * oFono - Open Telephony stack for Linux
  4. *
  5. * Copyright (C) 2008-2011 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_CALL_SETTINGS_H
  22. #define __OFONO_CALL_SETTINGS_H
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. #include <ofono/types.h>
  27. struct ofono_call_settings;
  28. typedef void (*ofono_call_settings_status_cb_t)(const struct ofono_error *error,
  29. int status, void *data);
  30. typedef void (*ofono_call_settings_set_cb_t)(const struct ofono_error *error,
  31. void *data);
  32. typedef void (*ofono_call_settings_clir_cb_t)(const struct ofono_error *error,
  33. int override, int network, void *data);
  34. struct ofono_call_settings_driver {
  35. const char *name;
  36. int (*probe)(struct ofono_call_settings *cs, unsigned int vendor,
  37. void *data);
  38. void (*remove)(struct ofono_call_settings *cs);
  39. void (*clip_query)(struct ofono_call_settings *cs,
  40. ofono_call_settings_status_cb_t cb, void *data);
  41. void (*cnap_query)(struct ofono_call_settings *cs,
  42. ofono_call_settings_status_cb_t cb, void *data);
  43. void (*cdip_query)(struct ofono_call_settings *cs,
  44. ofono_call_settings_status_cb_t cb, void *data);
  45. void (*colp_query)(struct ofono_call_settings *cs,
  46. ofono_call_settings_status_cb_t cb, void *data);
  47. void (*clir_query)(struct ofono_call_settings *cs,
  48. ofono_call_settings_clir_cb_t cb, void *data);
  49. void (*colr_query)(struct ofono_call_settings *cs,
  50. ofono_call_settings_status_cb_t cb, void *data);
  51. void (*clir_set)(struct ofono_call_settings *cs, int mode,
  52. ofono_call_settings_set_cb_t cb, void *data);
  53. void (*cw_query)(struct ofono_call_settings *cs, int cls,
  54. ofono_call_settings_status_cb_t cb, void *data);
  55. void (*cw_set)(struct ofono_call_settings *cs, int mode, int cls,
  56. ofono_call_settings_set_cb_t cb, void *data);
  57. };
  58. int ofono_call_settings_driver_register(
  59. const struct ofono_call_settings_driver *d);
  60. void ofono_call_settings_driver_unregister(
  61. const struct ofono_call_settings_driver *d);
  62. struct ofono_call_settings *ofono_call_settings_create(
  63. struct ofono_modem *modem,
  64. unsigned int vendor,
  65. const char *driver, void *data);
  66. void ofono_call_settings_register(struct ofono_call_settings *cs);
  67. void ofono_call_settings_remove(struct ofono_call_settings *cs);
  68. void ofono_call_settings_set_data(struct ofono_call_settings *cs, void *data);
  69. void *ofono_call_settings_get_data(struct ofono_call_settings *cs);
  70. #ifdef __cplusplus
  71. }
  72. #endif
  73. #endif /* __OFONO_CALL_SETTINGS_H */