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 391 enum UpnpOpenFileMode
620 #define UpnpActionRequest_get_ErrCode(x) ((x)->ErrCode) 621 #define UpnpActionRequest_get_Socket(x) ((x)->Socket) 622 #define UpnpActionRequest_get_ErrStr_cstr(x) ((x)->ErrStr) 623 #define UpnpActionRequest_get_ActionName_cstr(x) ((x)->ActionName) 624 #define UpnpActionRequest_get_DevUDN_cstr(x) ((x)->DevUDN) 625 #define UpnpActionRequest_get_ServiceID_cstr(x) ((x)->ServiceID) 626 #define UpnpActionRequest_get_ActionRequest(x) ((x)->ActionRequest) 627 #define UpnpActionRequest_get_ActionResult(x) ((x)->ActionResult) 647 #define UpnpActionComplete_get_ErrCode(x) ((x)->ErrCode) 648 #define UpnpActionComplete_get_CtrlUrl_cstr(x) (UpnpString_get_String((x)->CtrlUrl)) 649 #define UpnpActionComplete_get_ActionRequest(x) ((x)->ActionRequest) 650 #define UpnpActionComplete_get_ActionResult(x) ((x)->ActionResult) 673 char StateVarName[NAME_SIZE];
685 #define UpnpStateVarRequest_get_ErrCode(x) ((x)->ErrCode) 686 #define UpnpStateVarRequest_get_Socket(x) ((x)->Socket) 687 #define UpnpStateVarRequest_get_ErrStr_cstr(x) ((x)->ErrStr) 688 #define UpnpStateVarRequest_get_DevUDN_cstr(x) ((x)->DevUDN) 689 #define UpnpStateVarRequest_get_ServiceID_cstr(x) ((x)->ServiceID) 690 #define UpnpStateVarRequest_get_StateVarName_cstr(x) ((x)->StateVarName) 704 char StateVarName[NAME_SIZE];
712 #define UpnpStateVarComplete_get_ErrCode(x) ((x)->ErrCode) 713 #define UpnpStateVarComplete_get_CtrlUrl_cstr(x) (UpnpString_get_String((x)->CtrlUrl)) 714 #define UpnpStateVarComplete_get_StateVarName_cstr(x) ((x)->StateVarName) 733 #define UpnpEvent_get_SID_cstr(x) ((x)->Sid) 734 #define UpnpEvent_get_EventKey(x) ((x)->EventKey) 735 #define UpnpEvent_get_ChangedVariables(x) ((x)->ChangedVariables) 753 char DeviceId[LINE_SIZE];
756 char DeviceType[LINE_SIZE];
759 char ServiceType[LINE_SIZE];
762 char ServiceVer[LINE_SIZE];
765 char Location[LINE_SIZE];
771 char Date[LINE_SIZE];
777 struct sockaddr_storage DestAddr;
782 #define UpnpDiscovery_get_ErrCode(x) ((x)->ErrCode) 783 #define UpnpDiscovery_get_Expires(x) ((x)->Expires) 784 #define UpnpDiscovery_get_DeviceID_cstr(x) ((x)->DeviceId) 785 #define UpnpDiscovery_get_DeviceType_cstr(x) ((x)->DeviceType) 786 #define UpnpDiscovery_get_ServiceType_cstr(x) ((x)->ServiceType) 787 #define UpnpDiscovery_get_ServiceVer_cstr(x) ((x)->ServiceVer) 788 #define UpnpDiscovery_get_Location_cstr(x) ((x)->Location) 789 #define UpnpDiscovery_get_Os_cstr(x) ((x)->Os) 790 #define UpnpDiscovery_get_Date_cstr(x) ((x)->Date) 791 #define UpnpDiscovery_get_Ext_cstr(x) ((x)->Ext) 819 #define UpnpEventSubscribe_get_SID_cstr(x) ((x)->Sid) 820 #define UpnpEventSubscribe_get_ErrCode(x) ((x)->ErrCode) 821 #define UpnpEventSubscribe_get_PublisherUrl_cstr(x) (UpnpString_get_String((x)->PublisherUrl)) 822 #define UpnpEventSubscribe_get_TimeOut(x) ((x)->TimeOut) 841 #define UpnpSubscriptionRequest_get_ServiceId_cstr(x) ((x)->ServiceId) 842 #define UpnpSubscriptionRequest_get_UDN_cstr(x) ((x)->UDN) 843 #define UpnpSubscriptionRequest_get_SID_cstr(x) ((x)->Sid) 887 #define UpnpFileInfo_get_FileLength(x) ((x)->file_length) 888 #define UpnpFileInfo_get_LastModified(x) ((x)->last_modified) 889 #define UpnpFileInfo_get_IsDirectory(x) ((x)->is_directory) 890 #define UpnpFileInfo_get_IsReadable(x) ((x)->is_readable) 919 Upnp_EventType EventType,
976 unsigned short DestPort);
1010 #ifdef UPNP_ENABLE_IPV6 1018 unsigned short DestPort);
1066 #ifdef UPNP_ENABLE_IPV6 1093 #ifdef UPNP_ENABLE_IPV6 1096 EXPORT_SPEC char *UpnpGetServerUlaGuaIp6Address(
void);
1137 const char *DescUrl,
1215 Upnp_DescType descriptionType,
1218 const char* description,
1271 const char *DescUrl,
1321 const char *DescUrl,
1333 const char *LowerDescUrl);
1382 int RegistrationState);
1441 size_t contentLength);
1462 size_t contentLength);
1513 const char *TTarget_constarget_const,
1515 const void *Cookie_const);
1574 int RegistrationState);
1621 const char *ActionURL,
1623 const char *VarName,
1650 const char *ActionURL,
1652 const char *VarName,
1657 const void *Cookie);
1686 const char *ActionURL,
1688 const char *ServiceType,
1724 const char *ActionURL,
1726 const char *ServiceType,
1763 const char *ActionURL,
1765 const char *ServiceType,
1775 const void *Cookie);
1802 const char *ActionURL,
1804 const char *ServiceType,
1817 const void *Cookie);
1868 const char **VarName,
1870 const char **NewVal,
1941 const char **VarName,
1943 const char **NewVal,
2076 const void *Cookie);
2096 int MaxSubscriptions);
2117 int MaxSubscriptionTimeOut);
2152 const char *PublisherUrl,
2212 const char *PublisherUrl,
2219 const void *Cookie);
2311 const void *Cookie);
2441 const char *proxy_str,
2607 const char *contentType,
2729 const char *rootDir);
2741 const char *filename,
2760 const char *filename,
2763 enum UpnpOpenFileMode Mode);
2780 UpnpWebFileHandle fileHnd,
2801 UpnpWebFileHandle fileHnd,
2822 UpnpWebFileHandle fileHnd,
2848 UpnpWebFileHandle fileHnd);
2922 const char *dirName);
2933 const char *dirName);
int UpnpDownloadXmlDoc(const char *url, IXML_Document **xmlDoc)
Downloads an XML document specified in a URL.
Definition: upnpapi.c:3189
char * ServiceId
Definition: upnp.h:830
int UpnpClient_Handle
Returned when a control point application registers with UpnpRegisterClient.
Definition: upnp.h:404
IXML_Document * ActionResult
Definition: upnp.h:641
int UpnpRegisterRootDevice3(const char *DescUrl, Upnp_FunPtr Callback, const void *Cookie, UpnpDevice_Handle *Hnd, int AddressFamily)
Registers a device application for a specific address family with the UPnP library.
Definition: upnpapi.c:1099
char ActionName[(size_t) 256]
Definition: upnp.h:596
int UpnpRegisterRootDevice2(Upnp_DescType descriptionType, const char *description, size_t bufferLen, int config_baseURL, Upnp_FunPtr Fun, const void *Cookie, UpnpDevice_Handle *Hnd)
Registers a device application with the UPnP Library. Similar to UpnpRegisterRootDevice, except that it also allows the description document to be specified as a file or a memory buffer.
Definition: upnpapi.c:953
int UpnpRegisterRootDevice(const char *DescUrl, Upnp_FunPtr Callback, const void *Cookie, UpnpDevice_Handle *Hnd)
Registers a device application with the UPnP Library.
Definition: upnpapi.c:788
int UpnpAcceptSubscription(UpnpDevice_Handle Hnd, const char *DevID, const char *ServID, const char **VarName, const char **NewVal, int cVariables, const Upnp_SID SubsId)
Accepts a subscription request and sends out the current state of the eventable variables for a servi...
Definition: upnpapi.c:2455
int UpnpSetWebServerRootDir(const char *rootDir)
Sets the document root directory for the internal web server.
Upnp_DescType_e
Specifies the type of description in UpnpRegisterRootDevice2.
Definition: upnp.h:567
The { UpnpVirtualDirCallbacks} structure contains the pointers to file-related callback functions a d...
Definition: upnp.h:2865
IXML_Document * ActionRequest
Definition: upnp.h:605
int UpnpOpenHttpPost(const char *url, void **handle, const char *contentType, int contentLength, int timeout)
Makes an HTTP POST request message, opens a connection to the server and sends the POST request to th...
Definition: upnpapi.c:3073
char DevUDN[(size_t) 256]
Definition: upnp.h:599
int UpnpSendActionExAsync(UpnpClient_Handle Hnd, const char *ActionURL, const char *ServiceType, const char *DevUDN, IXML_Document *Header, IXML_Document *Action, Upnp_FunPtr Fun, const void *Cookie)
Sends a message to change a state variable in a service, generating a callback when the operation is ...
Definition: upnpapi.c:2826
int ErrCode
Definition: upnp.h:807
int UpnpVirtualDir_set_GetInfoCallback(VDCallback_GetInfo callback)
Sets the get_info callback function to be used to access a virtual directory.
Definition: upnpapi.c:4263
void UpnpRemoveAllVirtualDirs(void)
Removes all virtual directory mappings.
Definition: upnpapi.c:4173
int UpnpGetServiceVarStatusAsync(UpnpClient_Handle Hnd, const char *ActionURL, const char *VarName, Upnp_FunPtr Fun, const void *Cookie)
Queries the state of a variable of a service, generating a callback when the operation is complete...
Definition: upnpapi.c:2948
int UpnpRenewSubscription(UpnpClient_Handle Hnd, int *TimeOut, const Upnp_SID SubsId)
Renews a subscription that is about to expire.
Definition: upnpapi.c:2226
IXML_Document * ActionRequest
Definition: upnp.h:638
int UpnpCloseHttpPost(void *handle, int *httpStatus, int timeout)
Sends and receives any pending data, closes the connection with the server, and frees memory allocate...
Definition: upnpapi.c:3095
int is_readable
Definition: upnp.h:872
Upnp_SType_e
Represents the different types of searches that can be performed using the SDK for UPnP Devices API...
Definition: upnp.h:544
int UpnpSetVirtualDirCallbacks(struct UpnpVirtualDirCallbacks *callbacks)
Sets the callback functions to be used to access a virtual directory.
Definition: upnpapi.c:4241
time_t last_modified
Definition: upnp.h:864
UpnpString object declaration.
int UpnpOpenHttpGetProxy(const char *url, const char *proxy_str, void **handle, char **contentType, int *contentLength, int *httpStatus, int timeout)
Gets a file specified in a URL through the specified proxy.
Definition: upnpapi.c:3117
int UpnpSendAdvertisementLowPower(UpnpDevice_Handle Hnd, int Exp, int PowerState, int SleepPeriod, int RegistrationState)
Sends out the discovery announcements for all devices and services for a device.
Definition: upnpapi.c:1696
int Socket
Definition: upnp.h:661
int UpnpAcceptSubscriptionExt(UpnpDevice_Handle Hnd, const char *DevID, const char *ServID, IXML_Document *PropSet, Upnp_SID SubsId)
Similar to UpnpAcceptSubscription() except that it takes a DOM document for the variables to event ra...
Definition: upnpapi.c:2534
unsigned short UpnpGetServerPort(void)
Returns the internal server IPv4 UPnP listening port.
Definition: upnpapi.c:694
int UpnpUnSubscribeAsync(UpnpClient_Handle Hnd, Upnp_SID SubsId, Upnp_FunPtr Fun, const void *Cookie)
Removes a subscription of a control point from a service previously subscribed to using UpnpSubscribe...
Definition: upnpapi.c:2158
int UpnpSetMaxSubscriptions(UpnpDevice_Handle Hnd, int MaxSubscriptions)
Sets the maximum number of subscriptions accepted per service.
Definition: upnpapi.c:1865
struct Extra_Headers * extra_headers
Definition: upnp.h:882
int UpnpRemoveVirtualDir(const char *dirName)
Removes a virtual directory mapping made with UpnpAddVirtualDir.
Definition: upnpapi.c:4124
int UpnpSubscribe(UpnpClient_Handle Hnd, const char *PublisherUrl, int *TimeOut, Upnp_SID SubsId)
Registers a control point to receive event notifications from another device.
Definition: upnpapi.c:2039
int UpnpUnRegisterRootDeviceLowPower(UpnpDevice_Handle Hnd, int PowerState, int SleepPeriod, int RegistrationState)
Unregisters a root device registered with UpnpRegisterRootDevice, UpnpRegisterRootDevice2, UpnpRegisterRootDevice3 or UpnpRegisterRootDevice4.
Definition: upnpapi.c:1284
int UpnpCloseHttpGet(void *handle)
Closes the connection and frees memory that was allocated for the handle parameter.
Definition: upnpapi.c:3154
int UpnpRegisterRootDevice4(const char *DescUrl, Upnp_FunPtr Callback, const void *Cookie, UpnpDevice_Handle *Hnd, int AddressFamily, const char *LowerDescUrl)
Registers a device application for a specific address family with the UPnP library. This function can also be used to specify a dedicated description URL to be returned for legacy CPs.
Definition: upnpapi.c:1115
char * UDN
Definition: upnp.h:833
int UpnpReadHttpGet(void *handle, char *buf, size_t *size, int timeout)
Gets specified number of bytes from a file specified in a URL.
Definition: upnpapi.c:3160
int UpnpUnSubscribe(UpnpClient_Handle Hnd, const Upnp_SID SubsId)
Removes the subscription of a control point from a service previously subscribed to using UpnpSubscri...
Definition: upnpapi.c:2110
int UpnpVirtualDir_set_CloseCallback(VDCallback_Close callback)
Sets the close callback function to be used to access a virtual directory.
Definition: upnpapi.c:4328
int UpnpSetContentLength(UpnpClient_Handle Hnd, size_t contentLength)
Definition: upnpapi.c:4340
int TimeOut
Definition: upnp.h:813
int UpnpVirtualDir_set_OpenCallback(VDCallback_Open callback)
Sets the open callback function to be used to access a virtual directory.
Definition: upnpapi.c:4276
int UpnpOpenHttpGetEx(const char *url, void **handle, char **contentType, int *contentLength, int *httpStatus, int lowRange, int highRange, int timeout)
Gets specified number of bytes from a file specified in the URL.
Definition: upnpapi.c:3132
int UpnpInit2(const char *IfName, unsigned short DestPort)
Initializes the Linux SDK for UPnP Devices (IPv4 or IPv6).
int ErrCode
Definition: upnp.h:658
int UpnpUnRegisterRootDevice(UpnpDevice_Handle Hnd)
Unregisters a root device registered with UpnpRegisterRootDevice, UpnpRegisterRootDevice2, UpnpRegisterRootDevice3 or UpnpRegisterRootDevice4.
Definition: upnpapi.c:1277
DOMString content_type
Definition: upnp.h:877
int UpnpSendAdvertisement(UpnpDevice_Handle Hnd, int Exp)
Sends out the discovery announcements for all devices and services for a device.
Definition: upnpapi.c:1689
int ErrCode
Definition: upnp.h:747
int Expires
Definition: upnp.h:750
int(* VDCallback_GetInfo)(const char *filename, struct File_Info *info)
Get-info callback function prototype.
Definition: upnp.h:2739
char ServiceID[(size_t) 256]
Definition: upnp.h:602
Upnp_EventType_e
The reason code for an event callback.
Definition: upnp.h:423
int UpnpVirtualDir_set_SeekCallback(VDCallback_Seek callback)
Sets the seek callback function to be used to access a virtual directory.
Definition: upnpapi.c:4315
int UpnpIsWebserverEnabled(void)
Returns TRUE if the webserver is enabled, or FALSE if it is not.
Definition: upnpapi.c:4232
int UpnpVirtualDir_set_ReadCallback(VDCallback_Read callback)
Sets the read callback function to be used to access a virtual directory.
Definition: upnpapi.c:4289
int UpnpSendAction(UpnpClient_Handle Hnd, const char *ActionURL, const char *ServiceType, const char *DevUDN, IXML_Document *Action, IXML_Document **RespNode)
Sends a message to change a state variable in a service.
Definition: upnpapi.c:2619
Provides a platform independent way to include TCP/IP types and functions.
int UpnpDownloadUrlItem(const char *url, char **outBuf, char *contentType)
Downloads a file specified in a URL.
Definition: upnpapi.c:3172
struct sockaddr_storage CtrlPtIPAddr
Definition: upnp.h:611
Upnp_SID Sid
Definition: upnp.h:836
UpnpString * CtrlUrl
Definition: upnp.h:635
Upnp_SID Sid
Definition: upnp.h:721
int UpnpInit(const char *HostIP, unsigned short DestPort)
Initializes the Linux SDK for UPnP Devices (IPv4 only).
Definition: upnpapi.c:448
int UpnpWriteHttpPost(void *handle, char *buf, size_t *size, int timeout)
Sends a request to a server to copy the contents of a buffer to the URI specified in the UpnpOpenHttp...
Definition: upnpapi.c:3085
UpnpString * PublisherUrl
Definition: upnp.h:810
IXML_Document * SoapHeader
Definition: upnp.h:615
int ErrCode
Definition: upnp.h:587
int UpnpCancelHttpGet(void *handle)
Set the cancel flag of the handle parameter.
Definition: upnpapi.c:3148
int is_directory
Definition: upnp.h:868
Upnp_SID Sid
Definition: upnp.h:804
int UpnpDevice_Handle
Returned when a device application registers with UpnpRegisterRootDevice, UpnpRegisterRootDevice2, UpnpRegisterRootDevice3 or UpnpRegisterRootDevice4.
Definition: upnp.h:414
int UpnpNotify(UpnpDevice_Handle, const char *DevID, const char *ServID, const char **VarName, const char **NewVal, int cVariables)
Sends out an event change notification to all control points subscribed to a particular service...
Definition: upnpapi.c:2354
int(* Upnp_FunPtr)(Upnp_EventType EventType, void *Event, void *Cookie)
Definition: upnp.h:917
DOMString CurrentVal
Definition: upnp.h:680
DOMString CurrentVal
Definition: upnp.h:707
int UpnpOpenHttpGet(const char *url, void **handle, char **contentType, int *contentLength, int *httpStatus, int timeout)
Gets a file specified in a URL.
Definition: upnpapi.c:3104
IXML_Document * ActionResult
Definition: upnp.h:608
int UpnpSetMaxSubscriptionTimeOut(UpnpDevice_Handle Hnd, int MaxSubscriptionTimeOut)
Sets the maximum time-out accepted for a subscription request or renewal.
Definition: upnpapi.c:1902
unsigned short UpnpGetServerPort6(void)
Returns the internal server IPv6 UPnP listening port.
int UpnpHttpGetProgress(void *handle, size_t *length, size_t *total)
Retrieve progress information of a http-get transfer.
Definition: upnpapi.c:3166
int UpnpSendActionEx(UpnpClient_Handle Hnd, const char *ActionURL, const char *ServiceType, const char *DevUDN, IXML_Document *Header, IXML_Document *Action, IXML_Document **RespNode)
Sends a message to change a state variable in a service.
Definition: upnpapi.c:2675
int ErrCode
Definition: upnp.h:632
int UpnpNotifyExt(UpnpDevice_Handle, const char *DevID, const char *ServID, IXML_Document *PropSet)
Similar to UpnpNotify except that it takes a DOM document for the event rather than an array of strin...
Definition: upnpapi.c:2408
UpnpWebFileHandle(* VDCallback_Open)(const char *filename, enum UpnpOpenFileMode Mode)
Open callback function prototype.
Definition: upnp.h:2758
int ErrCode
Definition: upnp.h:698
int UpnpVirtualDir_set_WriteCallback(VDCallback_Write callback)
Sets the write callback function to be used to access a virtual directory.
Definition: upnpapi.c:4302
int(* VDCallback_Close)(UpnpWebFileHandle fileHnd)
Close callback function prototype.
Definition: upnp.h:2846
#define DOMString
The type of DOM strings.
Definition: ixml.h:59
int(* VDCallback_Write)(UpnpWebFileHandle fileHnd, char *buf, size_t buflen)
Write callback function prototype.
Definition: upnp.h:2799
char * UpnpGetServerIpAddress(void)
Returns the local IPv4 listening ip address.
Definition: upnpapi.c:712
char * UpnpGetServerIp6Address(void)
Returns the local IPv6 listening ip address.
Definition: upnpapi.c:720
void * UpnpWebFileHandle
The type of handle returned by the web server for open requests.
Definition: upnp.h:2734
off_t file_length
Definition: upnp.h:860
int(* VDCallback_Read)(UpnpWebFileHandle fileHnd, char *buf, size_t buflen)
Read callback function prototype.
Definition: upnp.h:2778
int UpnpUnRegisterClient(UpnpClient_Handle Hnd)
Unregisters a control point application, unsubscribing all active subscriptions.
Definition: upnpapi.c:1407
Data structure representing the DOM Document.
Definition: ixml.h:187
int UpnpSendActionAsync(UpnpClient_Handle Hnd, const char *ActionURL, const char *ServiceType, const char *DevUDN, IXML_Document *Action, Upnp_FunPtr Fun, const void *Cookie)
Sends a message to change a state variable in a service, generating a callback when the operation is ...
Definition: upnpapi.c:2731
int UpnpSubscribeAsync(UpnpClient_Handle Hnd, const char *PublisherUrl, int TimeOut, Upnp_FunPtr Fun, const void *Cookie)
Performs the same operation as UpnpSubscribe, but returns immediately and calls the registered callba...
Definition: upnpapi.c:1965
struct s_UpnpString UpnpString
Type of the string objects inside libupnp.
Definition: UpnpString.h:38
char Upnp_SID[44]
Holds the subscription identifier for a subscription between a client and a device.
Definition: upnp.h:534
int UpnpFinish(void)
Terminates the Linux SDK for UPnP Devices.
Definition: upnpapi.c:613
int UpnpRenewSubscriptionAsync(UpnpClient_Handle Hnd, int TimeOut, Upnp_SID SubsId, Upnp_FunPtr Fun, const void *Cookie)
Renews a subscription that is about to expire, generating a callback when the operation is complete...
Definition: upnpapi.c:2282
int(* VDCallback_Seek)(UpnpWebFileHandle fileHnd, off_t offset, int origin)
Seek callback function prototype.
Definition: upnp.h:2820
UpnpString * CtrlUrl
Definition: upnp.h:701
int UpnpSearchAsync(UpnpClient_Handle Hnd, int Mx, const char *TTarget_constarget_const, const void *Cookie_const)
Searches for devices matching the given search target.
Definition: upnpapi.c:1808
int EventKey
Definition: upnp.h:724
int UpnpSetMaxContentLength(size_t contentLength)
Sets the maximum content-length that the SDK will process on an incoming SOAP requests or responses...
Definition: upnpapi.c:4371
int UpnpEnableWebserver(int enable)
Enables or disables the webserver.
Definition: upnpapi.c:4195
#define EXPORT_SPEC
Export functions on WIN32 DLLs.
Definition: UpnpGlobal.h:81
int Socket
Definition: upnp.h:590
IXML_Document * ChangedVariables
Definition: upnp.h:727
Defines constants that for some reason are not defined on some systems.
int UpnpRegisterClient(Upnp_FunPtr Callback, const void *Cookie, UpnpClient_Handle *Hnd)
Registers a control point application with the UPnP Library.
Definition: upnpapi.c:1359
int UpnpAddVirtualDir(const char *dirName)
Adds a virtual directory mapping.
Definition: upnpapi.c:4061
int UpnpGetServiceVarStatus(UpnpClient_Handle Hnd, const char *ActionURL, const char *VarName, DOMString *StVarVal)
Queries the state of a state variable of a service on another device.
Definition: upnpapi.c:3017
char ErrStr[(size_t) 180]
Definition: upnp.h:593