private-network.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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_PRIVATE_NETWORK_H
  22. #define __OFONO_PRIVATE_NETWORK_H
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. struct ofono_private_network_settings {
  27. int fd;
  28. char *server_ip;
  29. char *peer_ip;
  30. char *primary_dns;
  31. char *secondary_dns;
  32. };
  33. typedef void (*ofono_private_network_cb_t)(
  34. const struct ofono_private_network_settings *settings,
  35. void *data);
  36. struct ofono_private_network_driver {
  37. char *name;
  38. int (*request)(ofono_private_network_cb_t cb, void *data);
  39. void (*release)(int uid);
  40. };
  41. int ofono_private_network_driver_register(
  42. const struct ofono_private_network_driver *d);
  43. void ofono_private_network_driver_unregister(
  44. const struct ofono_private_network_driver *d);
  45. #ifdef __cplusplus
  46. }
  47. #endif
  48. #endif /* __OFONO_PRIVATE_NETWORK_H */