Browse Source

user handler initialization macros

1.0.0
Georg Hopp 11 years ago
parent
commit
bc8faa926f
  1. 4
      src/comm_manager.c
  2. 4
      src/connector.c
  3. 4
      src/io_handler.c
  4. 4
      src/protocol_handler.c
  5. 4
      src/simple_client.c
  6. 4
      testers/test_handler.c

4
src/comm_manager.c

@ -149,7 +149,7 @@ commManagerCvInit(TR_class_ptr cls)
TR_commManagerDisableWrite);
}
TR_INSTANCE(TR_Hash, commManagerEventMethods);
TR_INIT_HANDLER(TR_CommManager);
TR_INIT_IFACE(TR_Class, commManagerCtor, commManagerDtor, NULL);
TR_INIT_IFACE(TR_CommManager, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
TR_CREATE_CLASS(
@ -158,7 +158,7 @@ TR_CREATE_CLASS(
commManagerCvInit,
TR_IF(TR_Class),
TR_IF(TR_CommManager)) = {
{ &(_commManagerEventMethods.data) }
{ TR_HANDLER_CVARS(TR_CommManager) }
};
// vim: set ts=4 sw=4:

4
src/connector.c

@ -99,14 +99,14 @@ connectorCvInit(TR_class_ptr cls)
connectorAccept);
}
TR_INSTANCE(TR_Hash, connectorEventMethods);
TR_INIT_HANDLER(TR_Connector);
TR_INIT_IFACE(TR_Class, connectorCtor, connectorDtor, NULL);
TR_CREATE_CLASS(
TR_Connector,
TR_EventHandler,
connectorCvInit,
TR_IF(TR_Class)) = {
{ &(_connectorEventMethods.data) }
{ TR_HANDLER_CVARS(TR_Connector) }
};
// vim: set ts=4 sw=4:

4
src/io_handler.c

@ -170,14 +170,14 @@ ioHandlerCvInit(TR_class_ptr cls)
ioHandlerWrite);
}
TR_INSTANCE(TR_Hash, ioHandlerEventMethods);
TR_INIT_HANDLER(TR_IoHandler);
TR_INIT_IFACE(TR_Class, ioHandlerCtor, ioHandlerDtor, NULL);
TR_CREATE_CLASS(
TR_IoHandler,
TR_EventHandler,
ioHandlerCvInit,
TR_IF(TR_Class)) = {
{ &(_ioHandlerEventMethods.data) }
{ TR_HANDLER_CVARS(TR_IoHandler) }
};
// vim: set ts=4 sw=4:

4
src/protocol_handler.c

@ -142,14 +142,14 @@ protocolHandlerCvInit(TR_class_ptr cls)
// protocolHandlerUpgrade);
}
TR_INSTANCE(TR_Hash, protocolHandlerEventMethods);
TR_INIT_HANDLER(TR_ProtocolHandler);
TR_INIT_IFACE(TR_Class, protocolHandlerCtor, protocolHandlerDtor, NULL);
TR_CREATE_CLASS(
TR_ProtocolHandler,
TR_EventHandler,
protocolHandlerCvInit,
TR_IF(TR_Class)) = {
{ &(_protocolHandlerEventMethods.data) }
{ TR_HANDLER_CVARS(TR_ProtocolHandler) }
};
// vim: set ts=4 sw=4:

4
src/simple_client.c

@ -147,14 +147,14 @@ simpleClientCvInit(TR_class_ptr cls)
simpleClientHandleData);
}
TR_INSTANCE(TR_Hash, simpleClientEventMethods);
TR_INIT_HANDLER(TR_SimpleClient);
TR_INIT_IFACE(TR_Class, simpleClientCtor, simpleClientDtor, NULL);
TR_CREATE_CLASS(
TR_SimpleClient,
TR_EventHandler,
simpleClientCvInit,
TR_IF(TR_Class)) = {
{ &(_simpleClientEventMethods.data) }
{ TR_HANDLER_CVARS(TR_SimpleClient) }
};
// vim: set ts=4 sw=4:

4
testers/test_handler.c

@ -122,14 +122,14 @@ testHandlerCvInit(TR_class_ptr class)
#endif
}
TR_INSTANCE(TR_Hash, testHandlerEventMethods);
TR_INIT_HANDLER(TR_TestHandler);
TR_INIT_IFACE(TR_Class, testHandlerCtor, testHandlerDtor, NULL);
TR_CREATE_CLASS(
TestHandler,
TR_EventHandler,
testHandlerCvInit,
TR_IF(TR_Class)) = {
{ &(_testHandlerEventMethods.data) }
{ TR_HANDLER_CVARS(TR_TestHandler) }
};
// vim: set ts=4 sw=4:
Loading…
Cancel
Save