Remove unused enum SsdpCmdType and unused typedef Event.

(cherry picked from commit cdf35baa34bfca25b141c64ebd6697195bd27322)
This commit is contained in:
Marcelo Roberto Jimenez 2010-12-19 22:53:08 -02:00
parent 408d65ecc8
commit 5ef17de780
4 changed files with 14 additions and 26 deletions

View File

@ -59,29 +59,19 @@
#include <netinet/ip_icmp.h> #include <netinet/ip_icmp.h>
#endif /* __APPLE__ */ #endif /* __APPLE__ */
#include <sys/time.h> #include <sys/time.h>
#include <arpa/inet.h>
#endif /* WIN32 */ #endif /* WIN32 */
/*! Enumeration to define all different types of ssdp searches */ /*! Enumeration to define all different types of ssdp searches */
typedef enum SsdpSearchType { typedef enum SsdpSearchType {
/*! Unknown search command. */
SSDP_SERROR = -1, SSDP_SERROR = -1,
SSDP_ALL,SSDP_ROOTDEVICE, SSDP_ALL,
SSDP_ROOTDEVICE,
SSDP_DEVICEUDN, SSDP_DEVICEUDN,
SSDP_DEVICETYPE, SSDP_DEVICETYPE,
SSDP_SERVICE SSDP_SERVICE
} SType; } SType;
/*! Enumeration to define all different type of ssdp messages */
typedef enum SsdpCmdType{
SSDP_ERROR=-1,
SSDP_OK,
SSDP_ALIVE,
SSDP_BYEBYE,
SSDP_SEARCH,
SSDP_NOTIFY,
SSDP_TIMEOUT
} Cmd;
#define BUFSIZE 2500 #define BUFSIZE 2500
#define SSDP_IP "239.255.255.250" #define SSDP_IP "239.255.255.250"
#define SSDP_IPV6_LINKLOCAL "FF02::C" #define SSDP_IPV6_LINKLOCAL "FF02::C"
@ -114,7 +104,6 @@ typedef enum SsdpCmdType{
/*! Structure to store the SSDP information */ /*! Structure to store the SSDP information */
typedef struct SsdpEventStruct { typedef struct SsdpEventStruct {
enum SsdpCmdType Cmd;
enum SsdpSearchType RequestType; enum SsdpSearchType RequestType;
int ErrCode; int ErrCode;
int MaxAge; int MaxAge;
@ -130,11 +119,9 @@ typedef struct SsdpEventStruct {
char Date[LINE_SIZE]; char Date[LINE_SIZE];
struct sockaddr *DestAddr; struct sockaddr *DestAddr;
void * Cookie; void * Cookie;
} Event; } SsdpEvent;
typedef void (* SsdpFunPtr)(Event *); typedef void (* SsdpFunPtr)(SsdpEvent *);
typedef Event SsdpEvent ;
typedef struct TData typedef struct TData
{ {
@ -175,7 +162,7 @@ typedef struct
extern SOCKET gSsdpReqSocket6; extern SOCKET gSsdpReqSocket6;
#endif /* UPNP_ENABLE_IPV6 */ #endif /* UPNP_ENABLE_IPV6 */
#endif /* INCLUDE_CLIENT_APIS */ #endif /* INCLUDE_CLIENT_APIS */
typedef int (*ParserFun)(char *, Event *); typedef int (*ParserFun)(char *, SsdpEvent *);
/*! /*!
* \name SSDP Server Functions * \name SSDP Server Functions

View File

@ -3,6 +3,10 @@
#define SSDP_RESULTDATA_H #define SSDP_RESULTDATA_H
/*! /*!
* \addtogroup SSDPlib
*
* @{
*
* \file * \file
* *
* \brief SSDPResultData object declararion. * \brief SSDPResultData object declararion.
@ -40,5 +44,7 @@
/*! */ /*! */
void SSDPResultData_Callback(const SSDPResultData *p); void SSDPResultData_Callback(const SSDPResultData *p);
/* @} SSDPlib */
#endif /* SSDP_RESULTDATA_H */ #endif /* SSDP_RESULTDATA_H */

View File

@ -121,9 +121,6 @@ void ssdp_handle_device_request(http_message_t *hmsg, struct sockaddr_storage *d
maxAge = dev_info->MaxAge; maxAge = dev_info->MaxAge;
HandleUnlock(); HandleUnlock();
UpnpPrintf(UPNP_PACKET, API, __FILE__, __LINE__,
"ssdp_handle_device_request with Cmd %d SEARCH\n",
event.Cmd);
UpnpPrintf(UPNP_PACKET, API, __FILE__, __LINE__, UpnpPrintf(UPNP_PACKET, API, __FILE__, __LINE__,
"MAX-AGE = %d\n", maxAge); "MAX-AGE = %d\n", maxAge);
UpnpPrintf(UPNP_PACKET, API, __FILE__, __LINE__, UpnpPrintf(UPNP_PACKET, API, __FILE__, __LINE__,

View File

@ -68,8 +68,6 @@
void RequestHandler(); void RequestHandler();
Event ErrotEvt;
enum Listener { enum Listener {
Idle, Idle,
Stopping, Stopping,