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 //******************************************************************
25 * This file contains all the variables which can be configured/modified as
26 * per platform or specific product usage scenarios.
29 #ifndef OCSTACK_CONFIG_H_
30 #define OCSTACK_CONFIG_H_
33 * Maximum length of the URI supported by client/server while processing
34 * REST requests/responses.
36 #if defined(ARDUINO) || defined(__TIZENRT__)
37 #define MAX_URI_LENGTH (64)
39 #define MAX_URI_LENGTH (256)
43 * Maximum length of the query supported by client/server while processing
44 * REST requests/responses.
46 #if defined(ARDUINO) || defined(__TIZENRT__)
47 #define MAX_QUERY_LENGTH (64)
49 #define MAX_QUERY_LENGTH (256)
54 * Maximum length of the Manufacturer name supported by the server
55 * for manufacturer name.
56 * @deprecated use MAX_PLATFORM_NAME_LENGTH instead.
58 #define MAX_MANUFACTURER_NAME_LENGTH (64)
61 * Maximum length of the URL to the Manufacturer details supported by
63 * @deprecated use MAX_PLATFORM_URL_LENGTH instead.
65 #define MAX_MANUFACTURER_URL_LENGTH (256)
68 * Maximum length of the value supported by the server
69 * for platform property of type string.
71 #define MAX_PLATFORM_NAME_LENGTH (64)
74 * Maximum length of the URL supported by the server
75 * for platform property of type url.
77 #define MAX_PLATFORM_URL_LENGTH (256)
80 * Maximum number of resources which can be contained inside collection
83 #define MAX_CONTAINED_RESOURCES (5)
86 * Maximum number of vendor specific header options an application can set or receive
89 #if defined(ARDUINO) || defined(__TIZENRT__)
90 #define MAX_HEADER_OPTIONS (2)
92 #define MAX_HEADER_OPTIONS (50)
96 * Maximum Length of the vendor specific header option
98 #if defined(ARDUINO) || defined(__TIZENRT__)
99 #define MAX_HEADER_OPTION_DATA_LENGTH (20)
101 #define MAX_HEADER_OPTION_DATA_LENGTH (1024)
105 * Sets the time to live (TTL) for response callback(s).
106 * The callback(s) will be up for deletion after such time but are not guaranteed
107 * to be deleted immediately and you may get responses even after timeout.
108 * This timeout will NOT apply to OBSERVE requests. OBSERVE needs an explicit cancel using OCCancel().
109 * @note: Changing the setting to a very long duration may lead to unsupported and untested
110 * operation. Setting this to as small a value as reasonable will reclaim memory faster.
112 #define MAX_CB_TIMEOUT_SECONDS (2 * 60 * 60) // 2 hours = 7200 seconds.
114 #endif //OCSTACK_CONFIG_H_