* as BTH etc.
* NOTE: OCStackResult is defined in ocstack.h.
*/
+#ifdef CA_INT
+ OCStackResult findResource(const std::string& host, const std::string& resourceURI,
+ OCConnectivityType connectivityType, FindCallback resourceHandler);
+ OCStackResult findResource(const std::string& host, const std::string& resourceURI,
+ OCConnectivityType connectivityType, FindCallback resourceHandler,
+ QualityOfService QoS);
+#else
OCStackResult findResource(const std::string& host, const std::string& resourceURI,
FindCallback resourceHandler);
OCStackResult findResource(const std::string& host, const std::string& resourceURI,
FindCallback resourceHandler, QualityOfService QoS);
+#endif
+ /**
+ * API for Device Discovery
+ *
+ * @param host - Host IP Address. If null or empty, Multicast is performed.
+ * @param resourceURI - Uri containing address to the virtual device in C Stack
+ * ("/oc/core/d")
+ *
+ * @param QualityOfService the quality of communication
+ *
+ */
+#ifdef CA_INT
+ OCStackResult getDeviceInfo(const std::string& host, const std::string& deviceURI,
+ OCConnectivityType connectivityType, FindDeviceCallback deviceInfoHandler);
+ OCStackResult getDeviceInfo(const std::string& host, const std::string& deviceURI,
+ OCConnectivityType connectivityType, FindDeviceCallback deviceInfoHandler,
+ QualityOfService QoS);
+#else
+ OCStackResult getDeviceInfo(const std::string& host, const std::string& deviceURI,
+ FindDeviceCallback deviceInfoHandler);
+ OCStackResult getDeviceInfo(const std::string& host, const std::string& deviceURI,
+ FindDeviceCallback deviceInfoHandler, QualityOfService QoS);
+#endif
/**
* This API registers a resource with the server
const std::shared_ptr<OCResource> resource);
/**
+ * This API registers all the device specific information
+ *
+ * @param OCDeviceInfo - Structure containing all the device related information
+ *
+ * @return OCStackResult return value of the API. Returns OC_STACK_OK if success
+ *
+ * Note: OCDeviceInfo is defined in OCStack.h
+ */
+ OCStackResult registerDeviceInfo(const OCDeviceInfo deviceInfo);
+
+ /**
* Set default device entity handler
*
* @param entityHandler - entity handler to handle requests for
*
* @return OCStackResult - return value of the API. Returns OCSTACK_OK if success <br>
*/
+#ifdef CA_INT
+ OCStackResult subscribePresence(OCPresenceHandle& presenceHandle, const std::string& host,
+ OCConnectivityType connectivityType, SubscribeCallback presenceHandler);
+ OCStackResult subscribePresence(OCPresenceHandle& presenceHandle, const std::string& host,
+ const std::string& resourceType, OCConnectivityType connectivityType,
+ SubscribeCallback presenceHandler);
+#else
OCStackResult subscribePresence(OCPresenceHandle& presenceHandle, const std::string& host,
SubscribeCallback presenceHandler);
OCStackResult subscribePresence(OCPresenceHandle& presenceHandle, const std::string& host,
const std::string& resourceType, SubscribeCallback presenceHandler);
-
+#endif
/**
* unsubscribes from a previously subscribed server's presence events. Note that
* you may for a short time still receive events from the server since it may take time
* @param interfaces - a collection of interfaces that the resource supports/implements
* @return OCResource::Ptr - a shared pointer to the new resource object
*/
+#ifdef CA_INT
+ OCResource::Ptr constructResourceObject(const std::string& host, const std::string& uri,
+ OCConnectivityType connectivityType, bool isObservable,
+ const std::vector<std::string>& resourceTypes,
+ const std::vector<std::string>& interfaces);
+#else
OCResource::Ptr constructResourceObject(const std::string& host, const std::string& uri,
bool isObservable, const std::vector<std::string>& resourceTypes,
const std::vector<std::string>& interfaces);
-
+#endif
/**
* Allows application entity handler to send response to an incoming request.
*