From c07b04b3bf9e2fb178c09bda2009828deda2d47f Mon Sep 17 00:00:00 2001 From: Ragner Magalhaes Date: Tue, 2 Dec 2008 20:30:59 +0000 Subject: [PATCH] Added libpurple/value.pxd. (UPDATE) FIXES: - Added gint64 and guint64 definitions used by value.pxd on glib.pxd. - Added value.pxd cimport inside purple.pxd. - Added libpurple/value.pxd. ps: Fixed small type with PurpleValue structure definition. Signed-off-by: Bruno Abinader git-svn-id: https://garage.maemo.org/svn/carman/branches/carman-0.7-beta2/python-purple@1312 596f6dd7-e928-0410-a184-9e12fd12cf7e --- libpurple/glib.pxd | 2 ++ libpurple/purple.pxd | 1 + libpurple/value.pxd | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 libpurple/value.pxd diff --git a/libpurple/glib.pxd b/libpurple/glib.pxd index 7478033..d2ff744 100644 --- a/libpurple/glib.pxd +++ b/libpurple/glib.pxd @@ -23,6 +23,8 @@ cdef extern from "glib.h": ctypedef int gint ctypedef unsigned int guint ctypedef unsigned long gulong + ctypedef signed long long gint64 + ctypedef unsigned long long guint64 ctypedef gint gboolean ctypedef gboolean (*GSourceFunc) (gpointer data) ctypedef unsigned int gsize diff --git a/libpurple/purple.pxd b/libpurple/purple.pxd index 010cf34..8099eda 100644 --- a/libpurple/purple.pxd +++ b/libpurple/purple.pxd @@ -40,6 +40,7 @@ cimport roomlist cimport signals cimport status cimport savedstatuses +cimport value cimport util cdef extern from "libpurple/purple.h": diff --git a/libpurple/value.pxd b/libpurple/value.pxd new file mode 100644 index 0000000..11f4e11 --- /dev/null +++ b/libpurple/value.pxd @@ -0,0 +1,91 @@ +# +# Copyright (c) 2008 INdT - Instituto Nokia de Tecnologia +# +# This file is part of python-purple. +# +# python-purple is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# python-purple is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +cimport glib + +cdef extern from "libpurple/value.h": + ctypedef enum PurpleType: + PURPLE_TYPE_UNKNOWN = 0 + PURPLE_TYPE_SUBTYPE + PURPLE_TYPE_CHAR + PURPLE_TYPE_UCHAR + PURPLE_TYPE_BOOLEAN + PURPLE_TYPE_SHORT + PURPLE_TYPE_USHORT + PURPLE_TYPE_INT + PURPLE_TYPE_UINT + PURPLE_TYPE_LONG + PURPLE_TYPE_ULONG + PURPLE_TYPE_INT64 + PURPLE_TYPE_UINT64 + PURPLE_TYPE_STRING + PURPLE_TYPE_OBJECT + PURPLE_TYPE_POINTER + PURPLE_TYPE_ENUM + PURPLE_TYPE_BOXED + + ctypedef enum PurpleSubType: + PURPLE_SUBTYPE_UNKNOWN = 0 + PURPLE_SUBTYPE_ACCOUNT + PURPLE_SUBTYPE_BLIST + PURPLE_SUBTYPE_BLIST_BUDDY + PURPLE_SUBTYPE_BLIST_GROUP + PURPLE_SUBTYPE_BLIST_CHAT + PURPLE_SUBTYPE_BUDDY_ICON + PURPLE_SUBTYPE_CONNECTION + PURPLE_SUBTYPE_CONVERSATION + PURPLE_SUBTYPE_PLUGIN + PURPLE_SUBTYPE_BLIST_NODE + PURPLE_SUBTYPE_CIPHER + PURPLE_SUBTYPE_STATUS + PURPLE_SUBTYPE_LOG + PURPLE_SUBTYPE_XFER + PURPLE_SUBTYPE_SAVEDSTATUS + PURPLE_SUBTYPE_XMLNODE + PURPLE_SUBTYPE_USERINFO + PURPLE_SUBTYPE_STORED_IMAGE + PURPLE_SUBTYPE_CERTIFICATEPOOL + + ctypedef union __UnionTypeData: + char char_data + unsigned char uchar_data + glib.gboolean boolean_data + short short_data + unsigned short ushort_data + int int_data + unsigned int uint_data + long long_data + unsigned long ulong_data + glib.gint64 int64_data + glib.guint64 uint64_data + char *string_data + void *object_data + void *pointer_data + int enum_data + void *boxed_data + + ctypedef union __UnionTypeU: + unsigned int subtype + char *specific_type + + ctypedef struct PurpleValue: + PurpleType type + unsigned short flags + __UnionTypeData data + __UnionTypeU u -- 1.7.9.5