Commit c62ea1f6 authored by Adrien Dorsaz's avatar Adrien Dorsaz

xmpp-client: initiate soup session and logger inside constructor

parent a43534cb
Pipeline #212 failed with stages
......@@ -18,7 +18,21 @@
#include "xmpp-client.h"
XmppClient::XmppClient()
#define debug_session true
XmppClient::XmppClient(ustring jid)
{
soup_session = soup_session_new_with_options (
SOUP_SESSION_USER_AGENT, "org.gnome.ibex/0.1.0",
NULL);
if (debug_session)
{
soup_logger = soup_logger_new(SOUP_LOGGER_LOG_BODY, -1);
soup_session_add_feature(soup_session, SOUP_SESSION_FEATURE(soup_logger));
g_object_unref(soup_logger);
}
}
......@@ -21,12 +21,17 @@
#include "ibex-settings.h"
using Glib::ustring;
class XmppClient
{
public:
XmppClient();
XmppClient(ustring jid);
private:
IbexSettings settings;
SoupSession *soup_session;
SoupLogger *soup_logger;
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment