Toyomasa Watarai
/
Mbed-example-WS-W27
Mbed Cloud example program for workshop in W27 2018.
Embed:
(wiki syntax)
Show/hide line numbers
uriqueryparser.h
00001 // ---------------------------------------------------------------------------- 00002 // Copyright 2016-2017 ARM Ltd. 00003 // 00004 // SPDX-License-Identifier: Apache-2.0 00005 // 00006 // Licensed under the Apache License, Version 2.0 (the "License"); 00007 // you may not use this file except in compliance with the License. 00008 // You may obtain a copy of the License at 00009 // 00010 // http://www.apache.org/licenses/LICENSE-2.0 00011 // 00012 // Unless required by applicable law or agreed to in writing, software 00013 // distributed under the License is distributed on an "AS IS" BASIS, 00014 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 // See the License for the specific language governing permissions and 00016 // limitations under the License. 00017 // ---------------------------------------------------------------------------- 00018 00019 #ifndef URIQUERYPARSER_H 00020 #define URIQUERYPARSER_H 00021 00022 #ifdef __cplusplus 00023 extern "C" { 00024 #endif 00025 00026 #include "ns_types.h" 00027 00028 /** 00029 * \brief Returns string containing query parameters. 00030 * \param uri URL 00031 * \return Query parameters or NULL if there is no parameters. 00032 */ 00033 char *query_string(char *uri); 00034 00035 /** 00036 * \brief Return count of query parameters. 00037 * \param query Query string 00038 * \return Count of query parameters 00039 */ 00040 int8_t query_param_count(char *query); 00041 00042 /** 00043 * \brief Extract queries from the query string. 00044 * \param query Query string 00045 * \param uri_query_parameters [OUT] List of queries 00046 * \param index Starting index 00047 * \return True if parsing success otherwise False. 00048 */ 00049 bool uri_query_parameters(char* query, char *uri_query_parameters[], int index); 00050 00051 #ifdef __cplusplus 00052 } 00053 #endif 00054 00055 #endif // URIQUERYPARSER_H
Generated on Tue Jul 12 2022 16:22:13 by 1.7.2