//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-#ifndef __INTEL_OCAPI_H_2014_07_10
-#define __INTEL_OCAPI_H_2014_07_10
+#ifndef OC_OCAPI_H_
+#define OC_OCAPI_H_
#include <string>
#include <sstream>
#include <map>
#include <memory>
#include <iterator>
+#if defined(_MSC_VER)
+#include <functional>
+#endif
#include "octypes.h"
#include "OCHeaderOption.h"
class OCResource;
class OCResourceRequest;
class OCResourceResponse;
+ class OCDirectPairing;
} // 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
{
return detail::oclog_target();
};
-
+#endif
} // namespace OC
namespace OC
{
Server,
Client,
- Both
+ Both,
+ Gateway /**< Client server mode along with routing capabilities.*/
};
/**
// Typedef for query parameter map
typedef std::map<std::string, std::string> QueryParamsMap;
+ // Typedef for query parameter map with Vector
+ typedef std::map< std::string, std::vector<std::string> > QueryParamsList;
+
// Typedef for list of observation IDs
typedef std::vector<OCObservationId> ObservationIds;
ObserveAction action;
// Identifier for observation being registered/unregistered
OCObservationId obsId;
+
+ OCConnectivityType connectivityType;
+ std::string address;
+ uint16_t port;
} ObservationInfo;
// const strings for different interfaces
// Used in GET, PUT, POST methods on links to other remote resources of a group.
const std::string GROUP_INTERFACE = "oic.mi.grp";
+ //Typedef for list direct paired devices
+ typedef std::vector<std::shared_ptr<OCDirectPairing>> PairedDevices;
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;
typedef std::function<void(const HeaderOptions&,
const OCRepresentation&, const int, const int)> ObserveCallback;
+
+ typedef std::function<void(std::shared_ptr<OCDirectPairing>, OCStackResult)> DirectPairingCallback;
+
+ typedef std::function<void(const PairedDevices&)> GetDirectPairedCallback;
+
+ typedef std::function<void(const HeaderOptions&,
+ const OCRepresentation&, const int,
+ std::shared_ptr<OCResource>)> MQCreateTopicCallback;
+
} // namespace OC
#endif