static void _init_data(gpointer fixture, gconstpointer user_data) { GeneratorData *data = fixture; data->protocol = eventd_protocol_new(&_callbacks, NULL, NULL); data->event = eventd_event_new_for_uuid_string(EVENTD_EVENT_TEST_UUID, EVENTD_EVENT_TEST_NAME, EVENTD_EVENT_TEST_NAME); }
/** * eventc_light_connection_new: * @name: (nullable): the host running the eventd instance to connect to or %NULL (equivalent to "localhost") * * Creates a new connection to an eventd daemon. * See eventc_light_connection_set_name() for the exact format of @name. * * Returns: (transfer full): a new connection */ EVENTD_EXPORT EventcLightConnection * eventc_light_connection_new(const gchar *name) { #ifdef G_OS_WIN32 WSADATA data; WSAStartup(MAKEWORD(2, 2), &data); #endif /* G_OS_WIN32 */ EventcLightConnection *self; self = g_new0(EventcLightConnection, 1); self->refcount = 1; self->name = g_strdup(name); self->protocol = eventd_protocol_new(&_eventc_light_connection_protocol_callbacks, self, NULL); return self; }