nettime.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. *
  3. * oFono - Open Telephony stack for Linux
  4. *
  5. * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
  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_NETTIME_H
  22. #define __OFONO_NETTIME_H
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. struct ofono_network_time;
  27. struct ofono_nettime_context {
  28. struct ofono_nettime_driver *driver;
  29. struct ofono_modem *modem;
  30. void *data;
  31. };
  32. struct ofono_nettime_driver {
  33. const char *name;
  34. int (*probe)(struct ofono_nettime_context *context);
  35. void (*remove)(struct ofono_nettime_context *context);
  36. void (*info_received)(struct ofono_nettime_context *context,
  37. struct ofono_network_time *info);
  38. };
  39. int ofono_nettime_driver_register(const struct ofono_nettime_driver *driver);
  40. void ofono_nettime_driver_unregister(const struct ofono_nettime_driver *driver);
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif /* __OFONO_NETTIME_H */