Main, IOThread: move GMainLoop setup code to class EventLoop

This commit is contained in:
Max Kellermann
2013-01-10 19:13:00 +01:00
parent be98afe34d
commit e83f805b8f
13 changed files with 139 additions and 82 deletions

View File

@@ -28,6 +28,7 @@ extern "C" {
#include "input_internal.h"
}
#include "event/Loop.hxx"
#include "IOThread.hxx"
#include "glib_compat.h"
@@ -716,7 +717,8 @@ input_curl_init(const struct config_param *param,
}
curl.source = g_source_new(&curl_source_funcs, sizeof(*curl.source));
curl.source_id = g_source_attach(curl.source, io_thread_context());
curl.source_id = g_source_attach(curl.source,
io_thread_get().GetContext());
return true;
}

View File

@@ -26,6 +26,7 @@ extern "C" {
}
#include "IOThread.hxx"
#include "event/Loop.hxx"
#include "conf.h"
extern "C" {
@@ -105,7 +106,7 @@ input_soup_init(const struct config_param *param, GError **error_r)
soup_session_async_new_with_options(SOUP_SESSION_PROXY_URI,
soup_proxy,
SOUP_SESSION_ASYNC_CONTEXT,
io_thread_context(),
io_thread_get().GetContext(),
NULL);
return true;