1 //******************************************************************
3 // Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 #ifndef _INTEL_OCUTILITIES_H_
22 #define _INTEL_OCUTILITIES_H_
33 typedef std::map<std::string, std::string> QueryParamsKeyVal;
35 * @brief Helper function to get query parameter from a URI
36 * @remarks Its okay to return a copy of the container.\
37 * The size is not expected to be huge.
38 * @remarks Temporary: The URI must strictly have\
39 * coap as the protocol in the fully qualified URI\
40 * e.g., coap://1.2.3.4:5657/foo?bar=0)
41 * @remarks If a separate class for URI parser is needed,\
42 * please talk to Erich Keane.
43 * @todo If more URI elements need to be parsed,\
44 * please move the common parsing logic to a
47 QueryParamsKeyVal getQueryParams(const std::string& uri);