Skip to content

Commit

Permalink
[Event] Add new event type
Browse files Browse the repository at this point in the history
Add new event type for new connection.

Signed-off-by: gichan2-jang <gichan2.jang@samsung.com>
  • Loading branch information
gichan-jang committed Sep 23, 2024
1 parent 8226b8c commit 288a464
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/nnstreamer-edge-event.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions src/libnnstreamer-edge/nnstreamer-edge-internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 288a464

Please sign in to comment.