Add skeleton code for discovery
authorGichan Jang <gichan2.jang@samsung.com>
Mon, 13 Jan 2025 05:14:55 +0000 (14:14 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Tue, 21 Jan 2025 08:28:10 +0000 (17:28 +0900)
Add skeleton code for discovery devices within network.

Signed-off-by: Gichan Jang <gichan2.jang@samsung.com>
include/nnstreamer-edge-event.h
include/nnstreamer-edge.h

index 5d2454c2697cd84526dfb24b479cbb07329969a7..3f55468dcf24e8d6facf57321a5673c3103ded61 100644 (file)
@@ -31,6 +31,8 @@ typedef enum {
   NNS_EDGE_EVENT_CALLBACK_RELEASED,
   NNS_EDGE_EVENT_CONNECTION_CLOSED,
   NNS_EDGE_EVENT_CONNECTION_COMPLETED,
+  NNS_EDGE_EVENT_CONNECTION_FAILURE,
+  NNS_EDGE_EVENT_DEVICE_FOUND,
 
   NNS_EDGE_EVENT_CUSTOM = 0x01000000
 } nns_edge_event_e;
index 347d548c516cdd0c07dacd9c544bbaea4104d04c..87deca66c8d1cc54d4d7df0eb00b89f2a294ad69 100644 (file)
@@ -213,6 +213,17 @@ int nns_edge_release_handle (nns_edge_h edge_h);
  */
 int nns_edge_set_event_callback (nns_edge_h edge_h, nns_edge_event_cb cb, void *user_data);
 
+/**
+ * @brief Discovery connectable devices within the network.
+ * @param[in] edge_h The edge handle.
+ * @param[in] user_data The user's custom data passed to discovery callback.
+ * @return 0 on success. Otherwise a negative error value.
+ * @retval #NNS_EDGE_ERROR_NONE Successful.
+ * @retval #NNS_EDGE_ERROR_NOT_SUPPORTED Not supported.
+ * @retval #NNS_EDGE_ERROR_INVALID_PARAMETER Given parameter is invalid.
+ */
+int nns_edge_discovery (nns_edge_h edge_h, void *user_data);
+
 /**
  * @brief Connect to the destination node. In the case of Hybrid and MQTT, the TOPIC, DEST_HOST and DEST_PORT must be set before connection using nns_edge_set_info().
  * @param[in] edge_h The edge handle.