sim-auth.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. *
  3. * oFono - Open Source Telephony
  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_SIM_AUTH_H
  22. #define __OFONO_SIM_AUTH_H
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. #include <ofono/types.h>
  27. struct ofono_sim_auth;
  28. typedef void (*ofono_sim_list_apps_cb_t)(const struct ofono_error *error,
  29. const unsigned char *dataobj,
  30. int len, void *data);
  31. struct ofono_sim_auth_driver {
  32. const char *name;
  33. int (*probe)(struct ofono_sim_auth *sa, unsigned int vendor,
  34. void *data);
  35. void (*remove)(struct ofono_sim_auth *sa);
  36. void (*list_apps)(struct ofono_sim_auth *sa,
  37. ofono_sim_list_apps_cb_t cb, void *data);
  38. };
  39. int ofono_sim_auth_driver_register(const struct ofono_sim_auth_driver *d);
  40. void ofono_sim_auth_driver_unregister(const struct ofono_sim_auth_driver *d);
  41. struct ofono_sim_auth *ofono_sim_auth_create(struct ofono_modem *modem,
  42. unsigned int vendor,
  43. const char *driver, void *data);
  44. void ofono_sim_auth_register(struct ofono_sim_auth *sa);
  45. void ofono_sim_auth_remove(struct ofono_sim_auth *sa);
  46. void ofono_sim_auth_set_data(struct ofono_sim_auth *sa, void *data);
  47. void *ofono_sim_auth_get_data(struct ofono_sim_auth *sa);
  48. #ifdef __cplusplus
  49. }
  50. #endif
  51. #endif /* __OFONO_SIM_AUTH_H */