minissdpc.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* $Id: minissdpc.h,v 1.6 2015/09/18 12:45:16 nanard Exp $ */
  2. /* Project: miniupnp
  3. * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
  4. * Author: Thomas Bernard
  5. * Copyright (c) 2005-2015 Thomas Bernard
  6. * This software is subjects to the conditions detailed
  7. * in the LICENCE file provided within this distribution */
  8. #ifndef MINISSDPC_H_INCLUDED
  9. #define MINISSDPC_H_INCLUDED
  10. #include "miniupnpc_declspec.h"
  11. #include "upnpdev.h"
  12. /* error codes : */
  13. #define MINISSDPC_SUCCESS (0)
  14. #define MINISSDPC_UNKNOWN_ERROR (-1)
  15. #define MINISSDPC_SOCKET_ERROR (-101)
  16. #define MINISSDPC_MEMORY_ERROR (-102)
  17. #define MINISSDPC_INVALID_INPUT (-103)
  18. #define MINISSDPC_INVALID_SERVER_REPLY (-104)
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. #if !(defined(_WIN32) || defined(__amigaos__) || defined(__amigaos4__))
  23. MINIUPNP_LIBSPEC struct UPNPDev *
  24. getDevicesFromMiniSSDPD(const char * devtype, const char * socketpath, int * error);
  25. MINIUPNP_LIBSPEC int
  26. connectToMiniSSDPD(const char * socketpath);
  27. MINIUPNP_LIBSPEC int
  28. disconnectFromMiniSSDPD(int fd);
  29. MINIUPNP_LIBSPEC int
  30. requestDevicesFromMiniSSDPD(int fd, const char * devtype);
  31. MINIUPNP_LIBSPEC struct UPNPDev *
  32. receiveDevicesFromMiniSSDPD(int fd, int * error);
  33. #endif /* !(defined(_WIN32) || defined(__amigaos__) || defined(__amigaos4__)) */
  34. MINIUPNP_LIBSPEC struct UPNPDev *
  35. ssdpDiscoverDevices(const char * const deviceTypes[],
  36. int delay, const char * multicastif,
  37. int localport,
  38. int ipv6, unsigned char ttl,
  39. int * error,
  40. int searchalltypes);
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif