You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
736 B

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __NET_SSDP_HEADER__
  2. #define __NET_SSDP_HEADER__
  3. #include <pthread.h>
  4. #include "socket_misk.h"
  5. #define SSDP_QUERY_TTL 60000 /* Query MAX Time To Live 60 seconds */
  6. typedef enum {
  7. SSDP_INIT,
  8. SSDP_BUSY,
  9. SSDP_FAIL,
  10. SSDP_READY
  11. } _SSDP_STATUS;
  12. class _net_SSDP{
  13. private:
  14. _SSDP_STATUS m_nStatus;
  15. /* Query Function */
  16. pthread_t m_pthread;
  17. static void *t_procedure( void *handle );
  18. public:
  19. _net_SSDP();
  20. ~_net_SSDP();
  21. bool seachServce( char *URL );
  22. bool seachServce( const char *URL );
  23. _SSDP_STATUS getStatus();
  24. bool getServiceURL( char *URL );
  25. bool getServiceURL( const char *URL );
  26. };
  27. #endif