⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 upnp.h

📁 开发upnp 时的底层库,可以运行,主要是实现了upnp的底层协议 !
💻 H
📖 第 1 页 / 共 5 页
字号:
//@}/** @name UPNP_E_UNSUBSCRIBE_UNACCAPTED [-302] *  {\tt UPNP_E_UNSUBSCRIBE_UNACCEPTED} signifies that an unsubscribe *  request was rejected from the remote side. *///@{#define UPNP_E_UNSUBSCRIBE_UNACCEPTED -302//@}/** @name UPNP_E_NOTIFY_UNACCEPTED [-303] *  {\tt UPNP_E_NOTIFY_UNACCEPTED} signifies that the remote host did not *  accept the notify sent from the local device. *///@{#define UPNP_E_NOTIFY_UNACCEPTED      -303//@}/** @name UPNP_E_INVALID_ARGUMENT [-501] *  {\tt UPNP_E_INVALID_ARGUMENT} signifies that one or more of the parameters *  passed to a function is invalid.  Refer to the individual function *  descriptions for the acceptable ranges for parameters. *///@{#define UPNP_E_INVALID_ARGUMENT       -501//@}/** @name UPNP_E_FILE_NOT_FOUND [-502] *  {\tt UPNP_E_FILE_NOT_FOUND} signifies that the filename passed *  to one of the device registration functions was not found or was not *  accessible. *///@{#define UPNP_E_FILE_NOT_FOUND         -502//@}/** @name UPNP_E_FILE_READ_ERROR [-503] *  {\tt UPNP_E_FILE_READ_ERROR} signifies an error when reading a file. *///@{#define UPNP_E_FILE_READ_ERROR        -503//@}/** @name UPNP_E_EXT_NOT_XML [-504] *  {\tt UPNP_E_EXT_NOT_XML} signifies that the file name of the description *  document passed to {\bf UpnpRegisterRootDevice2} does not end in ".xml". *///@{#define UPNP_E_EXT_NOT_XML            -504//@}#define UPNP_E_NO_WEB_SERVER          -505#define UPNP_E_OUTOF_BOUNDS	      -506/** @name UPNP_E_NOT_FOUND [-507] *  {\tt UPNP_E_NOT_FOUND} signifies that the response to a SOAP request *  did not contain the required XML constructs.   *///@{#define UPNP_E_NOT_FOUND	      -507//@}/** @name UPNP_E_INTERNAL_ERROR [-911] *  {\tt UPNP_E_INTERNAL_ERROR} is the generic error code for internal *  conditions not covered by other error codes. *///@{#define UPNP_E_INTERNAL_ERROR         -911//@}// SOAP-related error codes#define UPNP_SOAP_E_INVALID_ACTION    401#define UPNP_SOAP_E_INVALID_ARGS      402#define UPNP_SOAP_E_OUT_OF_SYNC       403#define UPNP_SOAP_E_INVALID_VAR       404#define UPNP_SOAP_E_ACTION_FAILED     501//@}#ifndef OUT#define OUT#endif#ifndef IN#define IN#endif#ifndef INOUT#define INOUT#endifenum UpnpOpenFileMode{UPNP_READ, UPNP_WRITE};/// @name Constants, Structures, and Types//@{/** Returned when a control point application registers with {\bf *  UpnpRegisterClient}.  Client handles can only be used with  *  functions that operate with a client handle.  */typedef int  UpnpClient_Handle;/** Returned when a device application registers with {\bf *  UpnpRegisterRootDevice} or {\bf UpnpRegisterRootDevice2}.  Device handles  *  can only be used with functions that operate with a device handle.  */typedef int  UpnpDevice_Handle;/** @name UPnP_EventType    @memo The reason code for an event callback.    @doc The {\bf Event} parameter will be different depending on the         reason for the callback.  The descriptions for each event	 type describe the contents of the {\bf Event} parameter.  */enum Upnp_EventType_e {  //  // Control callbacks  //  /** Received by a device when a control point issues a control   *  request.  The {\bf Event} parameter contains a pointer to a {\bf   *  Upnp_Action_Request} structure containing the action.  The application   *  stores the results of the action in this structure. */  UPNP_CONTROL_ACTION_REQUEST,  /** A {\bf UpnpSendActionAsync} call completed. The {\bf Event}   *  parameter contains a pointer to a {\bf Upnp_Action_Complete} structure   *  with the results of the action.  */  UPNP_CONTROL_ACTION_COMPLETE,  /** Received by a device when a query for a single service variable   *  arrives.  The {\bf Event} parameter contains a pointer to a {\bf   *  Upnp_State_Var_Request} structure containing the name of the variable   *  and value.  */  UPNP_CONTROL_GET_VAR_REQUEST,  /** A {\bf UpnpGetServiceVarStatus} call completed. The {\bf Event}   *  parameter contains a pointer to a {\bf Upnp_State_Var_Complete} structure   *  containing the value for the variable.  */  UPNP_CONTROL_GET_VAR_COMPLETE,  //  // Discovery callbacks  //  /** Received by a control point when a new device or service is available.     *  The {\bf Event} parameter contains a pointer to a {\bf   *  Upnp_Discovery} structure with the information about the device   *  or service.  */  UPNP_DISCOVERY_ADVERTISEMENT_ALIVE,  /** Received by a control point when a device or service shuts down. The {\bf   *  Event} parameter contains a pointer to a {\bf Upnp_Discovery}   *  structure containing the information about the device or   *  service.  */  UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE,  /** Received by a control point when a matching device or service responds.   *  The {\bf Event} parameter contains a pointer to a {\bf   *  Upnp_Discovery} structure containing the information about   *  the reply to the search request.  */  UPNP_DISCOVERY_SEARCH_RESULT,  /** Received by a control point when the search timeout expires.  The   *  SDK generates no more callbacks for this search after this    *  event.  The {\bf Event} parameter is {\tt NULL}.  */  UPNP_DISCOVERY_SEARCH_TIMEOUT,  //  // Eventing callbacks  //  /** Received by a device when a subscription arrives.   *  The {\bf Event} parameter contains a pointer to a {\bf   *  Upnp_Subscription_Request} structure.  At this point, the   *  subscription has already been accepted.  {\bf UpnpAcceptSubscription}   *  needs to be called to confirm the subscription and transmit the   *  initial state table.  This can be done during this callback.  The SDK   *  generates no events for a subscription unless the device    *  application calls {\bf UpnpAcceptSubscription}.   */  UPNP_EVENT_SUBSCRIPTION_REQUEST,  /** Received by a control point when an event arrives.  The {\bf   *  Event} parameter contains a {\bf Upnp_Event} structure   *  with the information about the event.  */  UPNP_EVENT_RECEIVED,  /** A {\bf UpnpRenewSubscriptionAsync} call completed. The status of   *  the renewal is in the {\bf Event} parameter as a {\bf   *  Upnp_Event_Subscription} structure.  */  UPNP_EVENT_RENEWAL_COMPLETE,  /** A {\bf UpnpSubscribeAsync} call completed. The status of the   * subscription is in the {\bf Event} parameter as a {\bf   * Upnp_Event_Subscription} structure.  */  UPNP_EVENT_SUBSCRIBE_COMPLETE,  /** A {\bf UpnpUnSubscribeAsync} call completed. The status of the   *  subscription is in the {\bf Event} parameter as a {\bf   *  Upnp_Event_Subscribe} structure.  */  UPNP_EVENT_UNSUBSCRIBE_COMPLETE,  /** The auto-renewal of a client subscription failed.      *  The {\bf Event} parameter is a {\bf Upnp_Event_Subscribe} structure    *  with the error code set appropriately. The subscription is no longer    *  valid. */  UPNP_EVENT_AUTORENEWAL_FAILED,  /** A client subscription has expired. This will only occur    *  if auto-renewal of subscriptions is disabled.   *  The {\bf Event} parameter is a {\bf Upnp_Event_Subscribe}   *  structure. The subscription is no longer valid. */    UPNP_EVENT_SUBSCRIPTION_EXPIRED};typedef enum Upnp_EventType_e Upnp_EventType;/** The {\bf Upnp_SID} holds the subscription identifier for a subscription    between a client and a device.  The SID is a string representation of    a globally unique id (GUID) and should not be modified.  */    typedef char Upnp_SID[44];/** @name Upnp_SType    @memo Represents the different types of searches that          can be performed using the SDK for UPnP Devices API.    @doc  By specifying these different values to           {\bf UpnpSearchAsync}, the control point application	  can control the scope of the search from all devices	  to specific devices or services.  */enum Upnp_SType_e {  /** Search for all devices and services on the network. */  UPNP_S_ALL,      /** Search for all root devices on the network. */  UPNP_S_ROOT,     /** Search for a particular device type or a particular device      instance. */  UPNP_S_DEVICE,                          /** Search for a particular service type, possibly on a particular   *  device type or device instance.  */  UPNP_S_SERVICE                        };typedef enum Upnp_SType_e Upnp_SType;/** @name Upnp_DescType    @memo Specifies the type of description in           {\bf UpnpRegisterRootDevice2}.    @doc  These values control how {\bf UpnpRegisterRootDevice2}          interprets the {\bf description} parameter.   */enum Upnp_DescType_e { 	/** The description is the URL to the description document. */	UPNPREG_URL_DESC, 		/** The description is a file name on the local file system 	    containing the description of the device. */	UPNPREG_FILENAME_DESC,    	/** The description is a pointer to a character array containing 	    the XML description document. */	UPNPREG_BUF_DESC };typedef enum Upnp_DescType_e Upnp_DescType;/** Returned as part of a {\bf UPNP_CONTROL_ACTION_COMPLETE} callback.  */struct Upnp_Action_Request{  /** The result of the operation. */  int ErrCode;  /** The socket number of the connection to the requestor. */  int Socket;  /** The error string in case of error. */  char ErrStr[LINE_SIZE]; /** The Action Name. */  char ActionName[NAME_SIZE];  /** The unique device ID. */  char DevUDN[NAME_SIZE];  /** The service ID. */  char ServiceID[NAME_SIZE];  /** The DOM document describing the action. */  IXML_Document *ActionRequest;  /** The DOM document describing the result of the action. */  IXML_Document *ActionResult;  /** IP address of the control point requesting this action. */  struct in_addr CtrlPtIPAddr;  /** The DOM document containing the information from the      the SOAP header. */  IXML_Document *SoapHeader;};struct Upnp_Action_Complete{

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -