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
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2003, Ximian, Inc.
*/
#ifndef SOUP_TYPES_H
#define SOUP_TYPES_H 1
#include <glib/gtypes.h>
#include <glib-object.h>
#include <libsoup/soup-status.h>
typedef struct SoupAddress SoupAddress;
typedef struct SoupConnection SoupConnection;
typedef struct SoupMessage SoupMessage;
typedef struct SoupServer SoupServer;
typedef union SoupServerAuth SoupServerAuth;
typedef struct SoupServerAuthContext SoupServerAuthContext;
typedef struct SoupServerMessage SoupServerMessage;
typedef struct SoupSession SoupSession;
typedef struct SoupSessionAsync SoupSessionAsync;
typedef struct SoupSessionSync SoupSessionSync;
typedef struct SoupSocket SoupSocket;
typedef struct SoupUri SoupUri;
#define SOUP_MAKE_TYPE(l,t,ci,i,parent) \
GType l##_get_type(void)\
{\
static GType type = 0; \
if (!type){ \
static GTypeInfo const object_info = { \
sizeof (t##Class), \
\
(GBaseInitFunc) NULL, \
(GBaseFinalizeFunc) NULL, \
\
(GClassInitFunc) ci, \
(GClassFinalizeFunc) NULL, \
NULL, /* class_data */ \
\
sizeof (t), \
0, /* n_preallocs */ \
(GInstanceInitFunc) i, \
}; \
type = g_type_register_static (parent, #t, &object_info, 0); \
} \
return type; \
}
#endif
|