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

📄 upnphttp.h

📁 这同样是FS8610相关的代码.看起来不错啊.
💻 H
字号:
#ifndef __UPNPHTTP_H__
#define __UPNPHTTP_H__
#include "arch/system.h"

/* UPNP HTTP Method */
#define		UPNPHTTP_METHOD_ERR		       0		/**< Error Method. */
#define		UPNPHTTP_METHOD_GET		       1		/**< GET Method.   */
#define		UPNPHTTP_METHOD_POST		   2		/**< POST Method.  */
#define		UPNPHTTP_METHOD_MPOST		   3		/**< MPOST Method.  */
#define		UPNPHTTP_METHOD_SUBSCRIBE      4		/**< SUBSCRIBE Method.  */
#define		UPNPHTTP_METHOD_UNSUBSCRIBE	   5		/**< POST Method.  */

#define UPNP_XML_HEAD_OK "HTTP/1.1 200 OK\r\nContent-Type: text/xml\r\nContent-Length: "

/** Structure of HTTP REQUEST */
typedef struct 
{
	UINT8	method;					/**< request method. */
	char    path[40];   			/**< request type.   */
	union par_u
    {
        struct post_par_s
        {
            char actionName[20];
            char *msgBody;
            //char varName[20];
            //UINT32 varValue;
        }post_par;
        struct subscribe_par_s
        {
            union arg_u
            {
                char callback[44];
                char sid[44];
            }arg;
        }subscribe_par;
        struct unsubscribe_par_s
        {
            char sid[44];
        }unsubscribe_par;
    }par;
}upnphttp_request_t;


INT8 upnphttp_parse_request(upnphttp_request_t * request, UINT8 * buf);
void upnphttp_proc_request(UINT8 s, UINT8 * buf, INT16 length);

#endif /* __UPNPHTTP_H__ */

⌨️ 快捷键说明

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