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

📄 upnp.h

📁 开发upnp 时的底层库,可以运行,主要是实现了upnp的底层协议 !
💻 H
📖 第 1 页 / 共 5 页
字号:
 *  search callbacks that do not match the original criteria of the search. *  Also, the application will receive multiple callbacks for each search. * *  @return [int] An integer representing one of the following: *    \begin{itemize} *      \item {\tt UPNP_E_SUCCESS}: The operation completed successfully. *      \item {\tt UPNP_E_INVALID_HANDLE}: The handle is not a valid control  *              point handle. *      \item {\tt UPNP_E_INVALID_PARAM}: {\bf Target} is {\tt NULL}. *    \end{itemize} */int UpnpSearchAsync(    IN UpnpClient_Handle Hnd, /** The handle of the client performing                                   the search. */    IN int Mx,                /** The time, in seconds, to wait for                                   responses. If the time is greater                                   than {\tt MAX_SEARCH_TIME} then the time is                                   set to {\tt MAX_SEARCH_TIME}. If the time is                                   less than {\tt MIN_SEARCH_TIME} then the                                   time is set to {\tt MIN_SEARCH_TIME}. */     IN const char *Target,    /** The search target as defined in the UPnP                                   Device Architecture v1.0 specification. */    IN const void *Cookie     /** The user data to pass when the callback                                   function is invoked. */    ); /** {\bf UpnpSendAdvertisement} sends out the discovery announcements for *  all devices and services for a device.  Each announcement is made with *  the same expiration time. * *  {\bf UpnpSendAdvertisement} is a synchronous call. * *  @return [int] An integer representing one of the following: *    \begin{itemize} *      \item {\tt UPNP_E_SUCCESS}: The operation completed successfully. *      \item {\tt UPNP_E_INVALID_HANDLE}: The handle is not a valid  *              device handle. *      \item {\tt UPNP_E_OUTOF_MEMORY}: There are insufficient resources to  *              send future advertisements. *    \end{itemize} */int UpnpSendAdvertisement(    IN UpnpDevice_Handle Hnd, /** The device handle for which to send out the                                   announcements. */    IN int Exp                /** The expiration age, in seconds, of                                   the announcements. */    );//@} // Discovery//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                                                    ////                            C O N T R O L                           ////                                                                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////@name Control//@{/** {\bf UpnpGetServiceVarStatus} queries the state of a state  *  variable of a service on another device.  This is a synchronous call. *  A positive return value indicates a SOAP error code, whereas a negative *  return code indicates an SDK error code. {\bf Note that the use of this  *  function is deprecated by the UPnP Forum}. * *  @return [int] An integer representing one of the following: *    \begin{itemize} *      \item {\tt UPNP_E_SUCCESS}: The operation completed successfully. *      \item {\tt UPNP_E_INVALID_HANDLE}: The handle is not a valid control  *              point handle. *      \item {\tt UPNP_E_INVALID_URL}: {\bf ActionUrl} is not a valid URL. *      \item {\tt UPNP_E_INVALID_DESC}: The XML document was not  *              found or it does not contain a valid XML description. *      \item {\tt UPNP_E_INVALID_PARAM}: {\bf StVarVal} is not a valid  *              pointer or {\bf VarName} or {\bf ActionUrl} is {\tt NULL}.  *      \item {\tt UPNP_E_OUTOF_MEMORY}: Insufficient resources exist to  *              complete this operation. *      \item {\tt UPNP_SOAP_E_INVALID_VAR}: The given variable is invalid  *              according to the device. *    \end{itemize} */int UpnpGetServiceVarStatus(    IN UpnpClient_Handle Hnd,     /** The handle of the control point. */    IN const char *ActionURL,     /** The URL of the service. */    IN const char *VarName,       /** The name of the variable to query. */    OUT DOMString *StVarVal       /** The pointer to store the value                                       for {\bf VarName}. The SDK                                       allocates this string and the caller                                       needs to free it using 				      {\bf ixmlFreeDOMString}. */    );/** {\bf UpnpGetServiceVarStatusAsync} queries the state of a variable of a  *  service, generating a callback when the operation is complete. {\bf Note  *  that the use of this function is deprecated by the UPnP Forum}. * *  @return [int] An integer representing one of the following: *    \begin{itemize} *      \item {\tt UPNP_E_SUCCESS}: The operation completed successfully. *      \item {\tt UPNP_E_INVALID_HANDLE}: The handle is not a valid control  *              point handle. *      \item {\tt UPNP_E_INVALID_URL}: The {\bf ActionUrl} is not a valid URL. *      \item {\tt UPNP_E_INVALID_PARAM}: {\bf VarName}, {\bf Fun} or  *              {\bf ActionUrl} is not a valid pointer. *      \item {\tt UPNP_E_OUTOF_MEMORY}: Insufficient resources exist to  *              complete this operation. *    \end{itemize} */int UpnpGetServiceVarStatusAsync(    IN UpnpClient_Handle Hnd, /** The handle of the control point. */    IN const char *ActionURL, /** The URL of the service. */    IN const char *VarName,   /** The name of the variable to query. */    IN Upnp_FunPtr Fun,       /** Pointer to a callback function to                                   be invoked when the operation is complete. */    IN const void *Cookie     /** Pointer to user data to pass to the                                   callback function when invoked. */    );/** {\bf UpnpSendAction} sends a message to change a state variable *  in a service.  This is a synchronous call that does not return until the  *  action is complete. *  *  Note that a positive return value indicates a SOAP-protocol error code. *  In this case,  the error description can be retrieved from {\bf RespNode}. *  A negative return value indicates an SDK error. * *  @return [int] An integer representing one of the following: *    \begin{itemize} *      \item {\tt UPNP_E_SUCCESS}: The operation completed successfully. *      \item {\tt UPNP_E_INVALID_HANDLE}: The handle is not a valid control  *              point handle. *      \item {\tt UPNP_E_INVALID_URL}: {\bf ActionUrl} is not a valid URL. *      \item {\tt UPNP_E_INVALID_ACTION}: This action is not valid. *      \item {\tt UPNP_E_INVALID_DEVICE}: {\bf DevUDN} is not a  *              valid device. *      \item {\tt UPNP_E_INVALID_PARAM}: {\bf ServiceType}, {\bf Action},  *              {\bf ActionUrl}, or  *              {\bf RespNode} is not a valid pointer. *      \item {\tt UPNP_E_OUTOF_MEMORY}: Insufficient resources exist to  *              complete this operation. *    \end{itemize} */int UpnpSendAction(    IN UpnpClient_Handle Hnd,     /** The handle of the control point                                       sending the action. */    IN const char *ActionURL,     /** The action URL of the service. */    IN const char *ServiceType,   /** The type of the service. */    IN const char *DevUDN,        /** This parameter is ignored and must be				      {\tt NULL}. */    IN IXML_Document *Action,     /** The DOM document for the action. */    OUT IXML_Document **RespNode  /** The DOM document for the response                                     to the action.  The SDK allocates                                     this document and the caller needs to free                                     it.  */   );/** {\bf UpnpSendActionEx} sends a message to change a state variable *  in a service.  This is a synchronous call that does not return until the  *  action is complete. * *  Note that a positive return value indicates a SOAP-protocol error code. *  In this case,  the error description can be retrieved from {\bf RespNode}. *  A negative return value indicates an SDK error. * *  @return [int] An integer representing one of the following: *    \begin{itemize} *      \item {\tt UPNP_E_SUCCESS}: The operation completed successfully. *      \item {\tt UPNP_E_INVALID_HANDLE}: The handle is not a valid control  *              point handle. *      \item {\tt UPNP_E_INVALID_URL}: {\bf ActionUrl} is not a valid URL. *      \item {\tt UPNP_E_INVALID_ACTION}: This action is not valid. *      \item {\tt UPNP_E_INVALID_DEVICE}: {\bf DevUDN} is not a  *              valid device. *      \item {\tt UPNP_E_INVALID_PARAM}: {\bf ServiceType}, {\bf Action},  *              {\bf ActionUrl}, or  *              {\bf RespNode} is not a valid pointer. *      \item {\tt UPNP_E_OUTOF_MEMORY}: Insufficient resources exist to  *              complete this operation. *    \end{itemize} */int UpnpSendActionEx(    IN UpnpClient_Handle Hnd,    /** The handle of the control point                                      sending the action. */    IN const char *ActionURL,    /** The action URL of the service. */    IN const char *ServiceType,  /** The type of the service. */    IN const char *DevUDN,       /** This parameter is ignored and must be				     {\tt NULL}. */    IN IXML_Document *Header,    /** The DOM document for the SOAP header.                                      This may be {\tt NULL} if the header is 				     not required. */    IN IXML_Document *Action,    /** The DOM document for the action. */    OUT IXML_Document **RespNode /** The DOM document for the response                                      to the action.  The SDK allocates                                      this document and the caller needs to free                                      it.  */   );/** {\bf UpnpSendActionAsync} sends a message to change a state variable *  in a service, generating a callback when the operation is complete. *  See {\bf UpnpSendAction} for comments on positive return values. These  *  positive return values are sent in the event struct associated with the *  {\tt UPNP_CONTROL_ACTION_COMPLETE} event. * *  @return [int] An integer representing one of the following: *    \begin{itemize} *      \item {\tt UPNP_E_SUCCESS}: The operation completed successfully. *      \item {\tt UPNP_E_INVALID_HANDLE}: The handle is not a valid control  *              point handle. *      \item {\tt UPNP_E_INVALID_URL}: {\bf ActionUrl} is an invalid URL. *      \item {\tt UPNP_E_INVALID_DEVICE}: {\bf DevUDN} is an invalid device. *      \item {\tt UPNP_E_INVALID_PARAM}: Either {\bf Fun} is not a valid  *              callback function or {\bf ServiceType}, {\bf Act}, or  *              {\bf ActionUrl} is {\tt NULL}. *      \item {\tt UPNP_E_INVALID_ACTION}: This action is not valid. *      \item {\tt UPNP_E_OUTOF_MEMORY}: Insufficient resources exist to  *              complete this operation. *    \end{itemize} */int UpnpSendActionAsync(    IN UpnpClient_Handle Hnd,   /** The handle of the control point                                     sending the action. */    IN const char *ActionURL,   /** The action URL of the service. */    IN const char *ServiceType, /** The type of the service. */    IN const char *DevUDN,      /** This parameter is ignored and must be				    {\tt NULL}. */    IN IXML_Document *Action,   /** The DOM document for the action to                                     perform on this device. */    IN Upnp_FunPtr Fun,         /** Pointer to a callback function to                                     be invoked when the operation 		                    completes. */    IN const void *Cookie       /** Pointer to user data that to be                                     passed to the callback when invoked. */    );/** {\bf UpnpSendActionExAsync} sends a message to change a state variable *  in a service, generating a callback when the operation is complete. *  See {\bf UpnpSendAction} for comments on positive return values. These  *  positive return values are sent in the event struct associated with the *  {\tt UPNP_CONTROL_ACTION_COMPLETE} event. * *  @return [int] An integer representing one of the following: *    \begin{itemize} *      \item {\tt UPNP_E_SUCCESS}: The operation completed successfully. *      \item {\tt UPNP_E_INVALID_HANDLE}: The handle is not a valid control  *              point handle. *      \item {\tt UPNP_E_INVALID_URL}: {\bf ActionUrl} is an invalid URL. *      \item {\tt UPNP_E_INVALID_DEVICE}: {\bf DevUDN} is an invalid device. *      \item {\tt UPNP_E_INVALID_PARAM}: Either {\bf Fun} is not a valid  *              callback function or {\bf ServiceType}, {\bf Act}, or  *              {\bf ActionUrl} is {\tt NULL}. *      \item {\tt UPNP_E_INVALID_ACTION}: This action is not valid. *      \item {\tt UPNP_E_OUTOF_MEMORY}: Insufficient resources exist to  *              complete this operation. *    \end{itemize} */int UpnpSendActionExAsync(    IN UpnpClient_Handle Hnd,   /** The handle of the control point                                     sending the action. */    IN const char *ActionURL,   /** The action URL of the service. */    IN const char *ServiceType, /** The type of the service. */    IN const char *DevUDN,      /** This parameter is ignored and must be				    {\tt NULL}. */    IN IXML_Document *Header,   /** The DOM document for the SOAP header.                                     This may be {\tt NULL} if the header is 				    not required. */    IN IXML_Document *Action,   /** The DOM document for the action to                                     perform on this device. */    IN Upnp_FunPtr Fun,         /** Pointer to a callback function to                                     be invoked when the operation 				    completes. */    IN const void *Cookie       /** Pointer to user data that to be                                     passed to the callback when invoked. */    );//@} // Control//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                                                    ////                        E V E N T I N G                             ////                                                                    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////@name Eventing//@{/** {\bf UpnpAcceptSubscription} accepts a subscription request and sends *  out the current state of the eventable variables for a service.   *  The device application should call this function when it receives a  *  {\tt UPNP_EVENT_SUBSCRIPTION_REQUEST} callback. This function is  *  synchronous and generates no callbacks. * *  {\bf UpnpAcceptSubscription} can be called during the execution of  *  a callback function. * *  @return [int] An integer representing one of the following: *    \begin{itemize} *      \item {\tt UPNP_E_SUCCESS}: The operation completed successfully. *      \item {\tt UPNP_E_INVALID_HANDLE}: The handle is not a valid device  *              handle. *      \item {\tt UPNP_E_INVALID_SERVICE}: The {\bf DevId}/{\bf ServId}  *              pair refers to an invalid service.  *      \item {\tt UPNP_E_INVALID_SID}: The specified subscription ID is not  *              valid. *      \item {\tt UPNP_E_INVALID_PARAM}: Either {\bf VarName},  *              {\bf NewVal}, {\bf DevID}, or {\bf ServID} is not a valid  *              pointer or {\bf cVariables} is less than zero. *      \item {\tt UPNP_E_OUTOF_MEMORY}: Insufficient resources exist to  *              complete this operation. *    \end{itemize} */int UpnpAcceptSubscription(    IN UpnpDevice_Handle Hnd, /** The handle of the device. */    IN const char *DevID,     /** The device ID of the subdevice of the                                   service generating the event. */    IN const char *ServID,    /** The unique service identifier of the service                                   generating the event. */    IN const char **VarName,  /** Pointer to an array of event variables. */    IN const char **NewVal,   /** Pointer to an array of values for                                   the event variables. */    IN int cVariables,        /** The number of event variables in                                   {\bf VarName}. */    IN Upnp_SID

⌨️ 快捷键说明

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