[IOT-963] Fix maximum URI length
[platform/upstream/iotivity.git] / resource / csdk / stack / include / ocstackconfig.h
1 //******************************************************************
2 //
3 // Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
4 //
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 //
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
10 //
11 //      http://www.apache.org/licenses/LICENSE-2.0
12 //
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.
18 //
19 //******************************************************************
20
21
22 /**
23  * @file
24  *
25  * This file contains all the variables which can be configured/modified as
26  * per platform or specific product usage scenarios.
27  */
28
29 #ifndef OCSTACK_CONFIG_H_
30 #define OCSTACK_CONFIG_H_
31
32 /**
33  * Maximum length of the URI supported by client/server while processing
34  * REST requests/responses.
35  */
36 #define MAX_URI_LENGTH (256)
37
38 /**
39  * Maximum length of the query supported by client/server while processing
40  * REST requests/responses.
41  */
42 #define MAX_QUERY_LENGTH (64)
43
44 /**
45  * Maximum length of the Manufacturer name supported by the server
46  * for manufacturer name.
47  */
48 #define MAX_MANUFACTURER_NAME_LENGTH (16)
49
50 /**
51  * Maximum length of the URL to the Manufacturer details supported by
52  * the server.
53  */
54 #define MAX_MANUFACTURER_URL_LENGTH (32)
55
56 /**
57  * Maximum number of resources which can be contained inside collection
58  * resource.
59  */
60 #define MAX_CONTAINED_RESOURCES  (5)
61
62 /**
63  *  Maximum number of vendor specific header options an application can set or receive
64  *  in PDU
65  */
66 #define MAX_HEADER_OPTIONS (2)
67
68 /**
69  *  Maximum Length of the vendor specific header option
70  */
71 #define MAX_HEADER_OPTION_DATA_LENGTH (20)
72
73 /**
74  * Sets the time to live (TTL) for response callback(s).
75  * The callback(s) will be up for deletion after such time but are not guaranteed
76  * to be deleted immediately and you may get responses even after timeout.
77  * This timeout will NOT apply to OBSERVE requests. OBSERVE needs an explicit cancel using OCCancel().
78  * @note: Changing the setting to a very long duration may lead to unsupported and untested
79  * operation. Setting this to as small a value as reasonable will reclaim memory faster.
80  */
81 #define MAX_CB_TIMEOUT_SECONDS   (2 * 60 * 60)  // 2 hours = 7200 seconds.
82
83 #endif //OCSTACK_CONFIG_H_