1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
/*
* Copyright (C) 2003 Novell, Inc.
* Copyright (C) 2008 Red Hat, Inc.
* Copyright (C) 2021 Igalia S.L.
*/
#pragma once
#include "soup-connection.h"
#include "soup-message.h"
#include "soup-session-private.h"
G_BEGIN_DECLS
typedef enum {
SOUP_MESSAGE_STARTING,
SOUP_MESSAGE_CONNECTING,
SOUP_MESSAGE_CONNECTED,
SOUP_MESSAGE_TUNNELING,
SOUP_MESSAGE_READY,
SOUP_MESSAGE_RUNNING,
SOUP_MESSAGE_CACHED,
SOUP_MESSAGE_RESTARTING,
SOUP_MESSAGE_FINISHING,
SOUP_MESSAGE_FINISHED
} SoupMessageQueueItemState;
struct _SoupMessageQueueItem {
SoupSession *session;
SoupMessage *msg;
GCancellable *cancellable;
GError *error;
GTask *task;
guint paused : 1;
guint io_started : 1;
guint async : 1;
guint connect_only : 1;
guint resend_count : 5;
int io_priority;
SoupMessageQueueItemState state;
SoupMessageQueueItem *related;
};
SoupMessageQueueItem *soup_message_queue_item_new (SoupSession *session,
SoupMessage *msg,
gboolean async,
GCancellable *cancellable);
SoupMessageQueueItem *soup_message_queue_item_ref (SoupMessageQueueItem *item);
void soup_message_queue_item_unref (SoupMessageQueueItem *item);
void soup_message_queue_item_cancel (SoupMessageQueueItem *item);
G_END_DECLS
|