project_files/frontlib/net/netconn_callbacks.c
changeset 7482 d70a5b0d1190
parent 7338 1ed603a54ebd
child 7580 c92596feac0d
equal deleted inserted replaced
7479:c8c552ee3acb 7482:d70a5b0d1190
   115  */
   115  */
   116 #define GENERATE_CB_SETTER_AND_DEFAULT(cbName, cbParameterTypes) \
   116 #define GENERATE_CB_SETTER_AND_DEFAULT(cbName, cbParameterTypes) \
   117 	static void _noop_callback_##cbName cbParameterTypes {} \
   117 	static void _noop_callback_##cbName cbParameterTypes {} \
   118 	GENERATE_CB_SETTER(cbName, cbParameterTypes, _noop_callback_##cbName)
   118 	GENERATE_CB_SETTER(cbName, cbParameterTypes, _noop_callback_##cbName)
   119 
   119 
   120 // TODO Disallow transfer of ownership?
       
   121 GENERATE_CB_SETTER(onMessage, (void *context, int msgtype, const char *msg), defaultCallback_onMessage);
   120 GENERATE_CB_SETTER(onMessage, (void *context, int msgtype, const char *msg), defaultCallback_onMessage);
   122 GENERATE_CB_SETTER_AND_DEFAULT(onConnected, (void *context));
   121 GENERATE_CB_SETTER_AND_DEFAULT(onConnected, (void *context));
   123 GENERATE_CB_SETTER_AND_DEFAULT(onDisconnected, (void *context, int reason, const char *message));
   122 GENERATE_CB_SETTER_AND_DEFAULT(onDisconnected, (void *context, int reason, const char *message));
   124 GENERATE_CB_SETTER_AND_DEFAULT(onRoomlist, (void *context, const flib_room **rooms, int roomCount));
   123 GENERATE_CB_SETTER_AND_DEFAULT(onRoomlist, (void *context, const flib_room **rooms, int roomCount));
   125 GENERATE_CB_SETTER_AND_DEFAULT(onRoomAdd, (void *context, const flib_room *room));
   124 GENERATE_CB_SETTER_AND_DEFAULT(onRoomAdd, (void *context, const flib_room *room));