LOCAL_CPPFLAGS += -std=c++0x\r
LOCAL_CPP_FEATURES := rtti exceptions\r
LOCAL_C_INCLUDES := $(OIC_SRC_PATH)/include\r
+LOCAL_C_INCLUDES += $(OIC_SRC_PATH)/c_common\r
LOCAL_C_INCLUDES += $(OIC_SRC_PATH)/csdk/stack/include\r
LOCAL_C_INCLUDES += $(OIC_SRC_PATH)/csdk/ocsocket/include\r
LOCAL_C_INCLUDES += $(OIC_SRC_PATH)/oc_logger/include\r
import os
env.AppendUnique(CPPPATH = [
+ os.path.join(Dir('.').abspath),
os.path.join(Dir('.').abspath, 'oic_malloc/include'),
os.path.join(Dir('.').abspath, 'oic_string/include')
])
--- /dev/null
+//******************************************************************
+//
+// Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
+//
+//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//******************************************************************
+
+/**
+ * @file
+ *
+ * This file contains compiler and platform feature definitions. These
+ * can be used to enable functionality on only platforms that support
+ * said functionality.
+ */
+
+#ifndef PLATFORM_FEATURES_H_
+#define PLATFORM_FEATURES_H_
+
+
+#if (__cplusplus >=201103L) || defined(__GXX_EXPERIMENTAL_CXX0X__)
+ #define SUPPORTS_DEFAULT_CTOR
+#endif
+
+#endif
#ifndef OCTYPES_H_
#define OCTYPES_H_
+#include "platform_features.h"
#include "ocstackconfig.h"
#include <stdbool.h>
#include <stdint.h>
/** pointer to its data.*/
uint8_t optionData[MAX_HEADER_OPTION_DATA_LENGTH];
-#ifdef __cplusplus
+#ifdef SUPPORTS_DEFAULT_CTOR
OCHeaderOption() = default;
OCHeaderOption(OCTransportProtocolID pid,
uint16_t optId,
/** A pointer to a function to delete the context when this callback is removed.*/
OCClientContextDeleter cd;
-#ifdef __cplusplus
+#ifdef SUPPORTS_DEFAULT_CTOR
OCCallbackData() = default;
OCCallbackData(void* ctx, OCClientResponseHandler callback, OCClientContextDeleter deleter)
:context(ctx), cb(callback), cd(deleter){}