Skip to main content

OdinEvent

Union of all possible ODIN events.

Declaration
typedef struct OdinEvent {
OdinEventTag tag;
union {
OdinEvent_JoinedData joined;
OdinEvent_PeerJoinedData peer_joined;
OdinEvent_PeerLeftData peer_left;
OdinEvent_PeerUserDataChangedData peer_user_data_changed;
OdinEvent_MediaAddedData media_added;
OdinEvent_MediaRemovedData media_removed;
OdinEvent_MediaActiveStateChangedData media_active_state_changed;
OdinEvent_RoomUserDataChangedData room_user_data_changed;
OdinEvent_RoomConnectionStateChangedData room_connection_state_changed;
OdinEvent_MessageReceivedData message_received;
};
} OdinEvent;

Fields

tag

The type of the event. Identifies which field of the union is valid.

Declaration
OdinEventTag tag;

joined

Data for the OdinEvent_Joined event. Only valid if tag is OdinEvent_Joined.

Declaration
OdinEvent_JoinedData joined;

peer_joined

Data for the OdinEvent_PeerJoined event. Only valid if tag is OdinEvent_PeerJoined.

Declaration
OdinEvent_PeerJoinedData peer_joined;

peer_left

Data for the OdinEvent_PeerLeft event. Only valid if tag is OdinEvent_PeerLeft.

Declaration
OdinEvent_PeerLeftData peer_left;

peer_user_data_changed

Data for the OdinEvent_PeerUserDataChanged event. Only valid if tag is OdinEvent_PeerUserDataChanged.

Declaration
OdinEvent_PeerUserDataChangedData peer_user_data_changed;

media_added

Data for the OdinEvent_MediaAdded event. Only valid if tag is OdinEvent_MediaAdded.

Declaration
OdinEvent_MediaAddedData media_added;

media_removed

Data for the OdinEvent_MediaRemoved event. Only valid if tag is OdinEvent_MediaRemoved.

Declaration
OdinEvent_MediaRemovedData media_removed;

media_active_state_changed

Data for the OdinEvent_MediaActiveStateChanged event. Only valid if tag is OdinEvent_MediaActiveStateChanged.

Declaration
OdinEvent_MediaActiveStateChangedData media_active_state_changed;

room_user_data_changed

Data for the OdinEvent_RoomUserDataChanged event. Only valid if tag is OdinEvent_RoomUserDataChanged.

Declaration
OdinEvent_RoomUserDataChangedData room_user_data_changed;

room_connection_state_changed

Data for the OdinEvent_RoomConnectionStateChanged event. Only valid if tag is OdinEvent_RoomConnectionStateChanged.

Declaration
OdinEvent_RoomConnectionStateChangedData room_connection_state_changed;

message_received

Data for the OdinEvent_MessageReceived event. Only valid if tag is OdinEvent_MessageReceived.

Declaration
OdinEvent_MessageReceivedData message_received;

Remarks

This union is used to represent all possible ODIN events. The tag field is used to determine which field of the union is valid. The tag field should be checked before accessing any of the other fields.