[Event] Add new event type accepted/tizen_9.0_unified accepted/tizen_unified_toolchain tizen_9.0 accepted/tizen/9.0/unified/20241030.233328 accepted/tizen/unified/20240926.050056 accepted/tizen/unified/20241108.105534 accepted/tizen/unified/20241120.162447 accepted/tizen/unified/toolchain/20241004.101324 accepted/tizen/unified/x/20240926.095718 accepted/tizen/unified/x/asan/20241013.235632 tizen_9.0_m2_release
authorgichan2-jang <gichan2.jang@samsung.com>
Fri, 13 Sep 2024 06:02:19 +0000 (15:02 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Mon, 23 Sep 2024 08:05:56 +0000 (17:05 +0900)
Add new event type for new connection.

Signed-off-by: gichan2-jang <gichan2.jang@samsung.com>
include/nnstreamer-edge-event.h
src/libnnstreamer-edge/nnstreamer-edge-internal.c

index e8856150d088d192a69a025c1cf628e31920c147..5d2454c2697cd84526dfb24b479cbb07329969a7 100644 (file)
@@ -30,6 +30,7 @@ typedef enum {
   NNS_EDGE_EVENT_NEW_DATA_RECEIVED,
   NNS_EDGE_EVENT_CALLBACK_RELEASED,
   NNS_EDGE_EVENT_CONNECTION_CLOSED,
+  NNS_EDGE_EVENT_CONNECTION_COMPLETED,
 
   NNS_EDGE_EVENT_CUSTOM = 0x01000000
 } nns_edge_event_e;
index ac7c9dbe9744f1efff7321086b1c435168159608..862905b08da449461661460e5460d4e67e396b1c 100644 (file)
@@ -1153,6 +1153,12 @@ _nns_edge_accept_socket (nns_edge_handle_s * eh)
     conn_data->sink_conn = conn;
   }
 
+  ret = nns_edge_event_invoke_callback (eh->event_cb, eh->user_data,
+      NNS_EDGE_EVENT_CONNECTION_COMPLETED, NULL, 0, NULL);
+  if (ret != NNS_EDGE_ERROR_NONE) {
+    nns_edge_loge ("Failed to send an event for new connection.");
+    goto error;
+  }
   done = true;
 
 error: