Skip to main content

odin_room_set_event_callback

Sets the event callback on the the specified

OdinRoomHandle

. Generally this should be called once before joining a room.

Declaration
OdinReturnCode odin_room_set_event_callback(OdinRoomHandle room,
void (*callback)(OdinRoomHandle room,
const struct OdinEvent *event,
void *extra_data),
void *extra_data);

Parameters

room

Handle of the room (

OdinRoomHandle

) for which the callback is being set.

Declaration
OdinRoomHandle room;

callback

The callback function to be invoked on room events. The callback function should have the following signature:

Declaration
void (*callback)(OdinRoomHandle room, const struct OdinEvent *event, void *extra_data)

Parameters

room

Handle of the room (

OdinRoomHandle

) for which the event occurred.

Declaration
OdinRoomHandle room;
event

Pointer to the event that occurred. See

OdinEvent

for more information.

Declaration
const struct OdinEvent *event;
extra_data

Pointer to user-defined data that was passed to the callback function.

Declaration
void *extra_data;

extra_data

User-defined data that will be passed to the callback function.

Declaration
void *extra_data;

Returns

A return code indicating success or failure. See

OdinReturnCode

for more information.

Return Type
OdinReturnCode