11f4e116c086f8f518b06d69067d465e9902631b
[python-purple] / value.pxd
1 #
2 #  Copyright (c) 2008 INdT - Instituto Nokia de Tecnologia
3 #
4 #  This file is part of python-purple.
5 #
6 #  python-purple is free software: you can redistribute it and/or modify
7 #  it under the terms of the GNU General Public License as published by
8 #  the Free Software Foundation, either version 3 of the License, or
9 #  (at your option) any later version.
10 #
11 #  python-purple is distributed in the hope that it will be useful,
12 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 #  GNU General Public License for more details.
15 #
16 #  You should have received a copy of the GNU General Public License
17 #  along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 #
19
20 cimport glib
21
22 cdef extern from "libpurple/value.h":
23     ctypedef enum PurpleType:
24         PURPLE_TYPE_UNKNOWN = 0
25         PURPLE_TYPE_SUBTYPE
26         PURPLE_TYPE_CHAR
27         PURPLE_TYPE_UCHAR
28         PURPLE_TYPE_BOOLEAN
29         PURPLE_TYPE_SHORT
30         PURPLE_TYPE_USHORT
31         PURPLE_TYPE_INT
32         PURPLE_TYPE_UINT
33         PURPLE_TYPE_LONG
34         PURPLE_TYPE_ULONG
35         PURPLE_TYPE_INT64
36         PURPLE_TYPE_UINT64
37         PURPLE_TYPE_STRING
38         PURPLE_TYPE_OBJECT
39         PURPLE_TYPE_POINTER
40         PURPLE_TYPE_ENUM
41         PURPLE_TYPE_BOXED
42
43     ctypedef enum PurpleSubType:
44         PURPLE_SUBTYPE_UNKNOWN = 0
45         PURPLE_SUBTYPE_ACCOUNT
46         PURPLE_SUBTYPE_BLIST
47         PURPLE_SUBTYPE_BLIST_BUDDY
48         PURPLE_SUBTYPE_BLIST_GROUP
49         PURPLE_SUBTYPE_BLIST_CHAT
50         PURPLE_SUBTYPE_BUDDY_ICON
51         PURPLE_SUBTYPE_CONNECTION
52         PURPLE_SUBTYPE_CONVERSATION
53         PURPLE_SUBTYPE_PLUGIN
54         PURPLE_SUBTYPE_BLIST_NODE
55         PURPLE_SUBTYPE_CIPHER
56         PURPLE_SUBTYPE_STATUS
57         PURPLE_SUBTYPE_LOG
58         PURPLE_SUBTYPE_XFER
59         PURPLE_SUBTYPE_SAVEDSTATUS
60         PURPLE_SUBTYPE_XMLNODE
61         PURPLE_SUBTYPE_USERINFO
62         PURPLE_SUBTYPE_STORED_IMAGE
63         PURPLE_SUBTYPE_CERTIFICATEPOOL
64
65     ctypedef union __UnionTypeData:
66         char char_data
67         unsigned char uchar_data
68         glib.gboolean boolean_data
69         short short_data
70         unsigned short ushort_data
71         int int_data
72         unsigned int uint_data
73         long long_data
74         unsigned long ulong_data
75         glib.gint64 int64_data
76         glib.guint64 uint64_data
77         char *string_data
78         void *object_data
79         void *pointer_data
80         int enum_data
81         void *boxed_data
82
83     ctypedef union __UnionTypeU:
84         unsigned int subtype
85         char *specific_type
86
87     ctypedef struct PurpleValue:
88         PurpleType type
89         unsigned short flags
90         __UnionTypeData data
91         __UnionTypeU u