45 #include "upnpconfig.h"
56 #ifdef UPNP_USE_MSVCPP
57 #include <sys/types.h>
59 #elif (defined(BSD) && BSD >= 199306)
65 #define LINE_SIZE (size_t)180
66 #define NAME_SIZE (size_t)256
67 #define MNFT_NAME_SIZE 64
68 #define MODL_NAME_SIZE 32
69 #define SERL_NUMR_SIZE 64
70 #define MODL_DESC_SIZE 64
71 #define UPNP_INFINITE -1
72 #define UPNP_USING_CHUNKED -3
73 #define UPNP_UNTIL_CLOSE -4
94 #define UPNP_E_SUCCESS 0
99 #define UPNP_E_INVALID_HANDLE -100
107 #define UPNP_E_INVALID_PARAM -101
114 #define UPNP_E_OUTOF_HANDLE -102
116 #define UPNP_E_OUTOF_CONTEXT -103
123 #define UPNP_E_OUTOF_MEMORY -104
131 #define UPNP_E_INIT -105
133 #define UPNP_E_BUFFER_TOO_SMALL -106
140 #define UPNP_E_INVALID_DESC -107
149 #define UPNP_E_INVALID_URL -108
151 #define UPNP_E_INVALID_SID -109
153 #define UPNP_E_INVALID_DEVICE -110
161 #define UPNP_E_INVALID_SERVICE -111
169 #define UPNP_E_BAD_RESPONSE -113
171 #define UPNP_E_BAD_REQUEST -114
179 #define UPNP_E_INVALID_ACTION -115
186 #define UPNP_E_FINISH -116
193 #define UPNP_E_INIT_FAILED -117
200 #define UPNP_E_URL_TOO_BIG -118
211 #define UPNP_E_BAD_HTTPMSG -119
219 #define UPNP_E_ALREADY_REGISTERED -120
225 #define UPNP_E_INVALID_INTERFACE -121
234 #define UPNP_E_NETWORK_ERROR -200
244 #define UPNP_E_SOCKET_WRITE -201
254 #define UPNP_E_SOCKET_READ -202
264 #define UPNP_E_SOCKET_BIND -203
274 #define UPNP_E_SOCKET_CONNECT -204
284 #define UPNP_E_OUTOF_SOCKET -205
292 #define UPNP_E_LISTEN -206
300 #define UPNP_E_TIMEDOUT -207
308 #define UPNP_E_SOCKET_ERROR -208
310 #define UPNP_E_FILE_WRITE_ERROR -209
316 #define UPNP_E_CANCELED -210
318 #define UPNP_E_EVENT_PROTOCOL -300
323 #define UPNP_E_SUBSCRIBE_UNACCEPTED -301
328 #define UPNP_E_UNSUBSCRIBE_UNACCEPTED -302
333 #define UPNP_E_NOTIFY_UNACCEPTED -303
341 #define UPNP_E_INVALID_ARGUMENT -501
347 #define UPNP_E_FILE_NOT_FOUND -502
352 #define UPNP_E_FILE_READ_ERROR -503
358 #define UPNP_E_EXT_NOT_XML -504
360 #define UPNP_E_NO_WEB_SERVER -505
361 #define UPNP_E_OUTOF_BOUNDS -506
367 #define UPNP_E_NOT_FOUND -507
373 #define UPNP_E_INTERNAL_ERROR -911
376 #define UPNP_SOAP_E_INVALID_ACTION 401
377 #define UPNP_SOAP_E_INVALID_ARGS 402
378 #define UPNP_SOAP_E_OUT_OF_SYNC 403
379 #define UPNP_SOAP_E_INVALID_VAR 404
380 #define UPNP_SOAP_E_ACTION_FAILED 501
384 #if UPNP_VERSION >= 10800
395 #include "ActionComplete.h"
396 #include "ActionRequest.h"
397 #include "Discovery.h"
399 #include "EventSubscribe.h"
400 #include "FileInfo.h"
401 #include "StateVarComplete.h"
402 #include "StateVarRequest.h"
403 #include "SubscriptionRequest.h"
412 enum UpnpOpenFileMode
603 #if UPNP_VERSION < 10800
856 Upnp_EventType EventType,
913 unsigned short DestPort);
947 #ifdef UPNP_ENABLE_IPV6
955 unsigned short DestPort);
1003 #ifdef UPNP_ENABLE_IPV6
1004 EXPORT_SPEC unsigned short UpnpGetServerPort6(
void);
1030 #ifdef UPNP_ENABLE_IPV6
1033 EXPORT_SPEC char *UpnpGetServerUlaGuaIp6Address(
void);
1074 const char *DescUrl,
1152 Upnp_DescType descriptionType,
1155 const char* description,
1208 const char *DescUrl,
1258 const char *DescUrl,
1270 const char *LowerDescUrl);
1319 int RegistrationState);
1378 size_t contentLength);
1399 size_t contentLength);
1450 const char *TTarget_constarget_const,
1452 const void *Cookie_const);
1503 int RegistrationState);
1550 const char *ActionURL,
1552 const char *VarName,
1579 const char *ActionURL,
1581 const char *VarName,
1586 const void *Cookie);
1615 const char *ActionURL,
1617 const char *ServiceType,
1653 const char *ActionURL,
1655 const char *ServiceType,
1692 const char *ActionURL,
1694 const char *ServiceType,
1704 const void *Cookie);
1731 const char *ActionURL,
1733 const char *ServiceType,
1746 const void *Cookie);
1797 const char **VarName,
1799 const char **NewVal,
1870 const char **VarName,
1872 const char **NewVal,
2005 const void *Cookie);
2025 int MaxSubscriptions);
2046 int MaxSubscriptionTimeOut);
2081 const char *PublisherUrl,
2141 const char *PublisherUrl,
2148 const void *Cookie);
2240 const void *Cookie);
2370 const char *proxy_str,
2536 const char *contentType,
2658 const char *rootDir);
2670 const char *filename,
2672 #if UPNP_VERSION < 10800
2694 const char *filename,
2697 enum UpnpOpenFileMode Mode);
2714 UpnpWebFileHandle fileHnd,
2735 UpnpWebFileHandle fileHnd,
2756 UpnpWebFileHandle fileHnd,
2782 UpnpWebFileHandle fileHnd);
2856 const char *dirName);
2867 const char *dirName);