2
* Copyright (C) 2012 Igalia S.L.
4
* Contact: Iago Toral Quiroga <itoral@igalia.com>
6
* Authors: Víctor M. Jáquez L. <vjaquez@igalia.com>
7
* Juan A. Suarez Romero <jasuarez@igalia.com>
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU Lesser General Public License
11
* as published by the Free Software Foundation; version 2.1 of
12
* the License, or (at your option) any later version.
14
* This library is distributed in the hope that it will be useful, but
15
* WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* Lesser General Public License for more details.
19
* You should have received a copy of the GNU Lesser General Public
20
* License along with this library; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
26
#ifndef _GRL_NET_PRIVATE_H_
27
#define _GRL_NET_PRIVATE_H_
29
#include <libsoup/soup.h>
32
#include "grl-net-wc.h"
36
struct _GrlNetWcPrivate {
38
SoupLoggerLogLevel log_level;
39
guint throttling; /* throttling in secs */
40
GTimeVal last_request; /* last request time */
41
GQueue *pending; /* closure queue for delayed requests */
42
guint cache_size; /* cache size in Mb */
47
void parse_error (guint status,
49
const gchar *response,
50
GSimpleAsyncResult *result);
52
void get_url_now (GrlNetWc *self,
55
GCancellable *cancellable);
57
void get_content (GrlNetWc *self,
62
void init_requester (GrlNetWc *self);
64
void finalize_requester (GrlNetWc *self);
66
void cache_down (GrlNetWc *self);
68
void cache_up (GrlNetWc *self);
70
gboolean cache_is_available (GrlNetWc *self);
72
void cache_set_size (GrlNetWc *self, guint size);
74
guint cache_get_size (GrlNetWc *self);
76
void free_op_res (void *op);
80
#endif /* _GRL_NET_PRIVATE_H_ */