RANDOM_DIR = $(ROOT_DIR)/ocrandom
STACK_DIR = $(ROOT_DIR)/stack
OCMALLOC_DIR = $(ROOT_DIR)/ocmalloc
+EXTLIBS_DIR = $(ROOT_DIR)/../../extlibs
+TINYDTLS_DIR = $(EXTLIBS_DIR)/tinydtls
INC_DIRS = -I$(OCSOCK_DIR)/include/ -I$(LOGGER_DIR)/include -I$(RANDOM_DIR)/include \
- -I$(OCMALLOC_DIR)/include -I$(OC_LOG_DIR)/include
+ -I$(OCMALLOC_DIR)/include -I$(OC_LOG_DIR)/include -I$(STACK_DIR)/include
# Note for Arduino: The CC flag is set to the C++ compiler since Arduino build
# includes Time.h header file which has C++ style definitions.
OCTBSTACK_SOURCES += $(OCTBSTACK_SRC)/occlientcb.c
OCTBSTACK_SOURCES += $(OCTBSTACK_SRC)/ocresource.c
OCTBSTACK_SOURCES += $(OCTBSTACK_SRC)/ocobserve.c
+OCTBSTACK_SOURCES += $(OCTBSTACK_SRC)/ocserverrequest.c
OCTBSTACK_SOURCES += $(OCTBSTACK_SRC)/occollection.c
+ OCTBSTACK_SOURCES += $(OCTBSTACK_SRC)/ocsecurity.c
SOURCES := $(CJSON_SOURCES)
SOURCES += $(OCCOAP_SOURCES)
/* Following methods process the PUT, GET, POST
* requests
*/
-void ProcessGetRequest (OCEntityHandlerRequest *ehRequest);
-void ProcessPutRequest (OCEntityHandlerRequest *ehRequest);
-void ProcessPostRequest (OCEntityHandlerRequest *ehRequest);
+OCEntityHandlerResult ProcessGetRequest (OCEntityHandlerRequest *ehRequest,
+ char *payload,
+ size_t maxPayloadSize);
+OCEntityHandlerResult ProcessPutRequest (OCEntityHandlerRequest *ehRequest,
+ char *payload,
+ size_t maxPayloadSize);
+OCEntityHandlerResult ProcessPostRequest (OCEntityHandlerRequest *ehRequest,
+ char *payload,
+ size_t maxPayloadSize);
- /* call getResult in common.cpp to get the result in string format. */
- const char *getResult(OCStackResult result);
-
//-----------------------------------------------------------------------------
// Callback functions
//-----------------------------------------------------------------------------
#define VERIFY_NON_NULL(arg, logLevel, retVal) { if (!(arg)) { OC_LOG((logLevel), \
TAG, PCF(#arg " is NULL")); return (retVal); } }
+//TODO: we should allow the server to define this
+#define MAX_OBSERVE_AGE (0x2FFFFUL)
+ //-----------------------------------------------------------------------------
+ // Externs
+ //-----------------------------------------------------------------------------
+ extern void DeinitOCSecurityInfo();
+
//-----------------------------------------------------------------------------
// Internal API function
//-----------------------------------------------------------------------------