2 # Copyright (c) 2008 INdT - Instituto Nokia de Tecnologia
4 # This file is part of python-purple.
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.
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.
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/>.
28 ctypedef char const_char "const char"
29 ctypedef long int time_t
31 cdef extern from "libpurple/status.h":
32 ctypedef struct PurpleStatusType
33 ctypedef struct PurpleStatusAttr
34 ctypedef struct PurplePresence
35 ctypedef struct PurpleStatus
37 ctypedef enum PurplePresenceContext:
38 PURPLE_PRESENCE_CONTEXT_UNSET = 0
39 PURPLE_PRESENCE_CONTEXT_ACCOUNT
40 PURPLE_PRESENCE_CONTEXT_CONV
41 PURPLE_PRESENCE_CONTEXT_BUDDY
43 ctypedef enum PurpleStatusPrimitive:
44 PURPLE_STATUS_UNSET = 0
46 PURPLE_STATUS_AVAILABLE
47 PURPLE_STATUS_UNAVAILABLE
48 PURPLE_STATUS_INVISIBLE
50 PURPLE_STATUS_EXTENDED_AWAY
53 PURPLE_STATUS_NUM_PRIMITIVES
55 ctypedef struct PurpleStatusType:
56 PurpleStatusPrimitive primitive
60 glib.gboolean saveable
61 glib.gboolean user_settable
62 glib.gboolean independent
65 ctypedef struct PurpleStatusAttr:
68 value.PurpleValue *value_type
70 ctypedef struct __ChatType:
71 conversation.PurpleConversation *conv
74 ctypedef struct __BuddyType:
75 account.PurpleAccount *account
77 blist.PurpleBuddy *buddy
79 ctypedef union __UnionType:
80 account.PurpleAccount *account
84 ctypedef struct PurplePresence:
85 PurplePresenceContext context
90 glib.GHashTable *status_table
91 PurpleStatus *active_status
94 ctypedef struct PurpleStatus:
95 PurpleStatusType *type
96 PurplePresence *presence
99 glib.GHashTable *attr_values
101 ctypedef struct PurpleStatusBuddyKey:
102 account.PurpleAccount *account
105 glib.gboolean purple_presence_is_online(PurplePresence *presence)