Merge branch 'master' into windows-port
[platform/upstream/iotivity.git] / resource / include / OCApi.h
index c0fdf93..875aace 100644 (file)
 #include <map>
 #include <memory>
 #include <iterator>
+#if defined(_MSC_VER)
+#include <functional>
+//Squelch "decorated name length exceeded, name was truncated"
+// This compensates for templates full of templates
+#pragma warning(disable : 4503)
+#endif
 
 #include "octypes.h"
 #include "OCHeaderOption.h"
@@ -45,6 +51,9 @@ namespace OC
 
 namespace OC
 {
+#if defined(_MSC_VER)
+    extern std::ostream& oclog();
+#else
     typedef boost::iostreams::stream<OC::oc_log_stream>     log_target_t;
 
     namespace detail
@@ -65,7 +74,7 @@ namespace OC
     {
         return detail::oclog_target();
     };
-
+#endif
 } // namespace OC
 
 namespace OC
@@ -252,6 +261,8 @@ namespace OC
 
     typedef std::function<void(std::shared_ptr<OCResource>)> FindCallback;
 
+    typedef std::function<void(const std::string&, const int)> FindErrorCallback;
+
     typedef std::function<void(const OCRepresentation&)> FindDeviceCallback;
 
     typedef std::function<void(const OCRepresentation&)> FindPlatformCallback;