Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: MbedFileServer_1768MiniDK2 RedWireBridge IssueDebug_gcc MiMicRemoteMCU-for-Mbed ... more
Revision 55:5f993fccc09c, committed 2013-08-09
- Comitter:
- nyatla
- Date:
- Fri Aug 09 08:37:59 2013 +0000
- Parent:
- 54:25cf4bf09cc6
- Child:
- 56:d38b6ce8c63b
- Commit message:
- remove unused class
Changed in this revision
| core/http/NyLPC_cHttpShortRequestHeaderParser.c | Show diff for this revision Revisions of this file |
| core/http/NyLPC_cHttpShortRequestHeaderParser.h | Show diff for this revision Revisions of this file |
--- a/core/http/NyLPC_cHttpShortRequestHeaderParser.c Fri Aug 09 06:45:59 2013 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*********************************************************************************
- * PROJECT: MiMic
- * --------------------------------------------------------------------------------
- *
- * This file is part of MiMic
- * Copyright (C)2011 Ryo Iizuka
- *
- * MiMic is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * For further information please contact.
- * http://nyatla.jp/
- * <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>
- *
- *********************************************************************************/
-#include "NyLPC_cHttpShortRequestHeaderParser.h"
-
-static NyLPC_TBool message_handler(NyLPC_TcHttpBasicHeaderParser_t* i_inst,const NyLPC_TChar* i_name,NyLPC_TChar i_c,struct NyLPC_THttpBasicHeader* o_out)
-{
- (void)i_inst;
- (void)i_name;
- (void)i_c;
- return NyLPC_TBool_TRUE;
-}
-static NyLPC_TBool urlHandler(NyLPC_TcHttpBasicHeaderParser_t* i_inst,NyLPC_TChar i_c,struct NyLPC_THttpBasicHeader* o_out)
-{
- //32文字までのURL解析
- NyLPC_TcHttpShortRequestHeaderParser_t* inst=(NyLPC_TcHttpShortRequestHeaderParser_t*)i_inst;
- struct NyLPC_THttpShortRequestHeader* out=(struct NyLPC_THttpShortRequestHeader*)o_out;
- out->url[inst->url_len]=i_c;
- inst->url_len++;
- if(inst->url_len>=32){
- out->url[inst->url_len-1]='\0';
- return NyLPC_TBool_FALSE;
- }
- return NyLPC_TBool_TRUE;
-}
-/**
- * デフォルトハンドラ
- */
-static const struct NyLPC_TcHttpBasicHeaderParser_Handler _handler=
-{
- message_handler,
- urlHandler
-};
-
-
-
-
-void NyLPC_cHttpShortRequestHeaderParser_initialize(NyLPC_TcHttpShortRequestHeaderParser_t* i_inst)
-{
- NyLPC_cHttpBasicHeaderParser_initialize(&(i_inst->super),&_handler);
-}
-
-void NyLPC_cHttpShortRequestHeaderParser_parseInit(NyLPC_TcHttpShortRequestHeaderParser_t* i_inst,struct NyLPC_THttpShortRequestHeader* o_out)
-{
- i_inst->url_len=0;
- NyLPC_cHttpBasicHeaderParser_parseInit(&((i_inst)->super),&((o_out)->super));
-}
-
-NyLPC_TBool NyLPC_cHttpShortRequestHeaderParser_parse(NyLPC_TcHttpShortRequestHeaderParser_t* i_inst,NyLPC_TcHttpStream_t* i_stream,struct NyLPC_THttpShortRequestHeader* o_out)
-{
- NyLPC_cHttpShortRequestHeaderParser_parseInit(i_inst,o_out);
- if(!NyLPC_cHttpBasicHeaderParser_parseStream(&(i_inst->super),i_stream,&(o_out->super)))
- {
- return NyLPC_TBool_FALSE;
- }
- return NyLPC_cHttpBasicHeaderParser_parseFinish(&(i_inst->super),&(o_out->super));
-}
--- a/core/http/NyLPC_cHttpShortRequestHeaderParser.h Fri Aug 09 06:45:59 2013 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*********************************************************************************
- * PROJECT: MiMic
- * --------------------------------------------------------------------------------
- *
- * This file is part of MiMic
- * Copyright (C)2011 Ryo Iizuka
- *
- * MiMic is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * For further information please contact.
- * http://nyatla.jp/
- * <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>
- *
- *********************************************************************************/
-#ifndef NYLPC_CHTTPSHORTHTTPHEADERPARSER_H_
-#define NYLPC_CHTTPSHORTHTTPHEADERPARSER_H_
-#include "NyLPC_cHttpBasicHeaderParser.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/**
- * URLが最大31文字までの、短いHttpリクエストを処理します。
- * このクラスは、NyLPC_TBasicHttpHeader_tにキャストできます。
- */
-typedef struct NyLPC_TcHttpShortReqestHeaderParser NyLPC_TcHttpShortRequestHeaderParser_t;
-
-
-struct NyLPC_THttpShortRequestHeader
-{
- struct NyLPC_THttpBasicHeader super;
- NyLPC_TChar url[32];
-};
-
-struct NyLPC_TcHttpShortReqestHeaderParser{
- NyLPC_TcHttpBasicHeaderParser_t super;
- NyLPC_TUInt16 url_len;
-};
-
-void NyLPC_cHttpShortRequestHeaderParser_initialize(NyLPC_TcHttpShortRequestHeaderParser_t* i_inst);
-
-#define NyLPC_cHttpShortRequestHeaderParser_finalize(i_inst) NyLPC_cHttpBasicHeaderParser_finalize(i_inst);
-
-/**
- * parseInit,parseStream,parseFinishを一括で実行します。
- */
-NyLPC_TBool NyLPC_cHttpShortRequestHeaderParser_parse(NyLPC_TcHttpShortRequestHeaderParser_t* i_inst,NyLPC_TcHttpStream_t* i_stream,struct NyLPC_THttpShortRequestHeader* o_out);
-
-
-/** override
- */
-void NyLPC_cHttpShortRequestHeaderParser_parseInit(NyLPC_TcHttpShortRequestHeaderParser_t* i_inst,struct NyLPC_THttpShortRequestHeader* o_out);
-
-
-/** override
- */
-#define NyLPC_cHttpShortRequestHeaderParser_parseFinish(i_inst,o_out) NyLPC_cHttpBasicHeaderParser_parseFinish(&((i_inst)->super),&((o_out)->super))
-
-/** override
- */
-#define NyLPC_cHttpShortRequestHeaderParser_parseChar(i_inst,i_c,i_size,o_out) NyLPC_cHttpBasicHeaderParser_parseChar(&((i_inst)->super),i_c,i_size,&((o_out)->super));
-
-/** override
- */
-#define NyLPC_cHttpShortRequestHeaderParser_parseStream(i_inst,i_stream,o_out) NyLPC_cHttpBasicHeaderParser_parseStream(&((i_inst)->super),i_stream,&((o_out)->super))
-
-
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* NYLPC_CHTTPSHORTHTTPHEADERPARSER_H_ */
\ No newline at end of file
MiMic Webservice library