From d822f7dacd1fb97e1e25304e4657696892248972 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 5 Jul 2022 11:16:05 +0200 Subject: net: Split GrlNetWcPrivate definition --- libs/net/grl-net-wc-private.h | 45 +++++++++++++++++++++++++++++++++++++++++++ libs/net/grl-net-wc.c | 17 +--------------- 2 files changed, 46 insertions(+), 16 deletions(-) create mode 100644 libs/net/grl-net-wc-private.h diff --git a/libs/net/grl-net-wc-private.h b/libs/net/grl-net-wc-private.h new file mode 100644 index 0000000..d954a20 --- /dev/null +++ b/libs/net/grl-net-wc-private.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2010, 2011 Igalia S.L. + * Copyright (C) 2012 Canonical Ltd. + * + * Contact: Iago Toral Quiroga + * + * Authors: Víctor M. Jáquez L. + * Juan A. Suarez Romero + * Jens Georg + * Mathias Hasselmann + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; version 2.1 of + * the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#include + +struct _GrlNetWcPrivate { + SoupSession *session; + char *user_agent; + SoupLoggerLogLevel log_level; + /* throttling in secs */ + guint throttling; + /* last request time, timestamp in seconds */ + gint64 last_request; + /* closure queue for delayed requests */ + GQueue *pending; + /* cache size in Mb */ + gboolean use_cache; + guint cache_size; + gchar *previous_data; +}; diff --git a/libs/net/grl-net-wc.c b/libs/net/grl-net-wc.c index fe4a914..8ce20db 100644 --- a/libs/net/grl-net-wc.c +++ b/libs/net/grl-net-wc.c @@ -51,6 +51,7 @@ #include #include "grl-net-wc.h" +#include "grl-net-wc-private.h" #include "grl-net-mock-private.h" #define GRL_LOG_DOMAIN_DEFAULT wc_log_domain @@ -74,22 +75,6 @@ struct request_res { gsize offset; }; -struct _GrlNetWcPrivate { - SoupSession *session; - char *user_agent; - SoupLoggerLogLevel log_level; - /* throttling in secs */ - guint throttling; - /* last request time, timestamp in seconds */ - gint64 last_request; - /* closure queue for delayed requests */ - GQueue *pending; - /* cache size in Mb */ - gboolean use_cache; - guint cache_size; - gchar *previous_data; -}; - static const char *capture_dir = NULL; GQuark -- cgit v1.2.1