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

📄 netcam_wget.h

📁 video motion detection of linux base
💻 H
字号:
/*Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002	Free Software Foundation, Inc.Additional Copyright (C) 2004-2005 Christopher Price,Angel Carpintero, and other contributing authors.Major part of this file is reused code from GNU Wget. It has beenmerged and modified for use in the program Motion which is alsoreleased under the terms of the GNU General Public License.GNU Wget and Motion is free software; you can redistribute it and/ormodify it under the terms of the GNU General Public License as publishedby the Free Software Foundation; either version 2 of the License, or(at your option) any later version.GNU Wget is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with Wget; if not, write to the Free SoftwareFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef NETCAM_WGET_H#define NETCAM_WGET_H#include "netcam.h"/* Retrieval stream */struct rbuf{	char buffer[4096];      /* the input buffer */	char *buffer_pos;       /* current position in the buffer */	size_t buffer_left;     /* number of bytes left in the buffer:	                           buffer_left = buffer_end - buffer_pos */	int ret;                /* used by RBUF_READCHAR macro */};/* Read a character from RBUF.  If there is anything in the buffer,   the character is returned from the buffer.  Otherwise, refill the   buffer and return the first character.   The return value is the same as with read(2).  On buffered read,   the function returns 1.   #### That return value is totally screwed up, and is a direct   result of historical implementation of header code.  The macro   should return the character or EOF, and in case of error store it   to rbuf->err or something.  */#define RBUF_READCHAR(netcam, store)	\((netcam)->response->buffer_left ? (--(netcam)->response->buffer_left,	\*((char *) (store)) = *(netcam)->response->buffer_pos++, 1)	\: ((netcam)->response->buffer_pos = (netcam)->response->buffer,	\((((netcam)->response->ret = rbuf_read_bufferful (netcam)) <= 0)	\? (netcam)->response->ret : ((netcam)->response->buffer_left = (netcam->response)->ret - 1,	\*((char *) (store)) = *(netcam)->response->buffer_pos++,1))))/* Function declarations */void rbuf_initialize(netcam_context_ptr);int rbuf_initialized_p(netcam_context_ptr);void rbuf_uninitialize(netcam_context_ptr);int rbuf_readchar(netcam_context_ptr, char *);int rbuf_peek(netcam_context_ptr, char *);int rbuf_flush(netcam_context_ptr, char *, int);/* Internal, but used by the macro. */int rbuf_read_bufferful(netcam_context_ptr);/* How many bytes it will take to store LEN bytes in base64.  */#define BASE64_LENGTH(len) (4 * (((len) + 2) / 3))void base64_encode(const char *, char *, int);char *strdupdelim(const char *, const char *);int http_process_type(const char *, void *);enum { HG_OK, HG_ERROR, HG_EOF};enum header_get_flags{ HG_NONE = 0,HG_NO_CONTINUATIONS = 0x2 };int header_get (netcam_context_ptr, char **, enum header_get_flags);int header_process (const char *, const char *,                    int (*) (const char *, void *), void *);int header_extract_number(const char *, void *);int header_strdup(const char *, void *);int skip_lws(const char *);int http_result_code(const char *);#endif /* NETCAM_WGET_H */

⌨️ 快捷键说明

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