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.
Fork of libMiMic by
NyLPC_cUrlReader.h
00001 /* 00002 * NyLPC_cUrlReader.h 00003 * 00004 * Created on: 2013/04/22 00005 * Author: nyatla 00006 */ 00007 00008 #ifndef NYLPC_cUrlReader_H_ 00009 #define NYLPC_cUrlReader_H_ 00010 #include "NyLPC_stdlib.h" 00011 00012 #ifdef __cplusplus 00013 extern "C" { 00014 #endif /* __cplusplus */ 00015 /** 00016 * URLからパス文字列のポインタと長さを返します。 00017 */ 00018 NyLPC_TBool NyLPC_cUrlReader_getPath(const NyLPC_TChar* i_src,const NyLPC_TChar** path,NyLPC_TInt32* path_len); 00019 00020 /** 00021 * 指定したURLクエリキーの値を探します。 00022 * @return 00023 * クエリ値の直前のポインタです。 00024 * 例えばキーがabcの時、探索する文字列が[^\?]*\?abc=cdfの場合、=の位置を返します。[^\?]*\?abc&cdfの場合、&の位置を返します。 00025 * cdfの場合、[^\?]*\?abc=cdfはNULL,[^\?]*\?abc&cdfは終端'\0'の位置を返します。 00026 * この関数は補助的なものです。Query文字列から値を取得するときは、getStr,getUInt,getInt等を使用してください。 00027 */ 00028 const NyLPC_TChar* NyLPC_cUrlReader_findKeyValue(const NyLPC_TChar* i_src,const NyLPC_TChar* i_key_name); 00029 /** 00030 * URLから指定キー[:KEY:]のURLクエリ値[:VALUE:]を取得します。 00031 * [:query:] := [^\?]*\?(&[:KEY:](=[:VALUE:])?&)*([:KEY:](=[:VALUE:])?) 00032 * [:KEY:] := [a-zA-Z0-9_-] 00033 * [:VALUE:] := [^\#&] 00034 */ 00035 NyLPC_TBool NyLPC_cUrlReader_getStr(const NyLPC_TChar* i_src,const NyLPC_TChar* i_key_name,const NyLPC_TChar** str,NyLPC_TInt32* str_len); 00036 00037 /** 00038 * URLから指定キー[:KEY:]のURLクエリ値[:VALUE:]を32bit-unsigned値で取得します。 00039 * [:query:] := [^\?]*\?(&[:KEY:](=[:VALUE:])?&)*([:KEY:](=[:VALUE:])?) 00040 * [:KEY:] := [a-zA-Z0-9_-] 00041 * [:VALUE:] := [:DIGIT:]+|0x[:HEX:] 00042 */ 00043 NyLPC_TBool NyLPC_cUrlReader_getUInt(const NyLPC_TChar* i_buf,const NyLPC_TChar* i_key_name,NyLPC_TUInt32* value); 00044 /** 00045 * URLから指定キー[:KEY:]のURLクエリ値[:VALUE:]を32bit-unsigned値で取得します。 00046 * [:query:] := [^\?]*\?(&[:KEY:](=[:VALUE:])?&)*([:KEY:](=[:VALUE:])?) 00047 * [:KEY:] := [a-zA-Z0-9_-] 00048 * [:VALUE:] := -?[:DIGIT:]+|0x[:HEX:] 00049 */ 00050 NyLPC_TBool NyLPC_cUrlReader_getInt(const NyLPC_TChar* i_buf,const NyLPC_TChar* i_key_name,NyLPC_TInt32* value); 00051 00052 #ifdef __cplusplus 00053 } 00054 #endif /* __cplusplus */ 00055 00056 #endif 00057 00058
Generated on Tue Jul 12 2022 16:22:59 by
