replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / resource / csdk / stack / include / ocstackconfig.h
index ad7c3da..ee4ffe3 100644 (file)
@@ -1,6 +1,6 @@
 //******************************************************************
 //
-// Copyright 2014 Intel Corporation All Rights Reserved.
+// Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 //
 // See the License for the specific language governing permissions and
 // limitations under the License.
 //
-//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-#ifndef OCSTACK_CONFIG_H_
-#define OCSTACK_CONFIG_H_
-
-// This file contains all the variables which can be configured/modified as
-// per platform or specific product usage scenarios.
+//******************************************************************
 
-/** This would need to be updated in future as we move to support IPv6 and other
- *  technologies.
- */
-#define DEV_ADDR_SIZE_MAX (16)
 
 /**
- * Maximum length of the response supported by Server for any REST request.
+ * @file
+ *
+ * This file contains all the variables which can be configured/modified as
+ * per platform or specific product usage scenarios.
  */
-#ifdef WITH_ARDUINO
-#define MAX_RESPONSE_LENGTH (256)
-#else
-#define MAX_RESPONSE_LENGTH (1024)
-#endif
 
-/**
- * Maximum length of the request supported by Client/Server for any REST request.
- */
-#ifdef WITH_ARDUINO
-#define MAX_REQUEST_LENGTH (256)
-#else
-#define MAX_REQUEST_LENGTH (1024)
-#endif
+#ifndef OCSTACK_CONFIG_H_
+#define OCSTACK_CONFIG_H_
 
 /**
  * Maximum length of the URI supported by client/server while processing
  * REST requests/responses.
  */
+#if defined(ARDUINO) || defined(__TIZENRT__)
 #define MAX_URI_LENGTH (64)
+#else
+#define MAX_URI_LENGTH (256)
+#endif
 
 /**
  * Maximum length of the query supported by client/server while processing
  * REST requests/responses.
  */
+#if defined(ARDUINO) || defined(__TIZENRT__)
 #define MAX_QUERY_LENGTH (64)
+#else
+#define MAX_QUERY_LENGTH (256)
+#endif
+
 
 /**
  * Maximum length of the Manufacturer name supported by the server
- * for manufacturer name
+ * for manufacturer name.
+ * @deprecated use MAX_PLATFORM_NAME_LENGTH instead.
  */
-#define MAX_MANUFACTURER_NAME_LENGTH (16)
+#define MAX_MANUFACTURER_NAME_LENGTH (64)
 
 /**
  * Maximum length of the URL to the Manufacturer details supported by
  * the server.
+ * @deprecated use MAX_PLATFORM_URL_LENGTH instead.
+ */
+#define MAX_MANUFACTURER_URL_LENGTH (256)
+
+/**
+ * Maximum length of the value supported by the server
+ * for platform property of type string.
+ */
+#define MAX_PLATFORM_NAME_LENGTH (64)
+
+/**
+ * Maximum length of the URL supported by the server
+ * for platform property of type url.
  */
-#define MAX_MANUFACTURER_URL_LENGTH (32)
+#define MAX_PLATFORM_URL_LENGTH (256)
 
 /**
  * Maximum number of resources which can be contained inside collection
 #define MAX_CONTAINED_RESOURCES  (5)
 
 /**
- *  Maximum number of vendor specific header options an application can set or receive in pdu
+ *  Maximum number of vendor specific header options an application can set or receive
+ *  in PDU
  */
+#if defined(ARDUINO) || defined(__TIZENRT__)
 #define MAX_HEADER_OPTIONS (2)
+#else
+#define MAX_HEADER_OPTIONS (50)
+#endif
 
 /**
  *  Maximum Length of the vendor specific header option
  */
-#define MAX_HEADER_OPTION_DATA_LENGTH (16)
+#if defined(ARDUINO) || defined(__TIZENRT__)
+#define MAX_HEADER_OPTION_DATA_LENGTH (20)
+#else
+#define MAX_HEADER_OPTION_DATA_LENGTH (1024)
+#endif
+
+/**
+ * Sets the time to live (TTL) for response callback(s).
+ * The callback(s) will be up for deletion after such time but are not guaranteed
+ * to be deleted immediately and you may get responses even after timeout.
+ * This timeout will NOT apply to OBSERVE requests. OBSERVE needs an explicit cancel using OCCancel().
+ * @note: Changing the setting to a very long duration may lead to unsupported and untested
+ * operation. Setting this to as small a value as reasonable will reclaim memory faster.
+ */
+#define MAX_CB_TIMEOUT_SECONDS   (2 * 60 * 60)  // 2 hours = 7200 seconds.
 
 #endif //OCSTACK_CONFIG_H_