Fixed last BFP.
authorRagner Magalhaes <ragner.magalhaes@openbossa.org>
Tue, 2 Dec 2008 20:16:23 +0000 (20:16 +0000)
committerAnderson Briglia <anderson.briglia@openbossa.org>
Sat, 28 Feb 2009 21:11:09 +0000 (17:11 -0400)
FIXES:
 - Fixed includes on purple.pyx.
 - Moved remaining .pxd's to libpurple/ directory.
 - Removed core/ directory.

Signed-off-by: Bruno Abinader <bruno.abinader@indt.org.br>

git-svn-id: https://garage.maemo.org/svn/carman/branches/carman-0.7-beta2/python-purple@1288 596f6dd7-e928-0410-a184-9e12fd12cf7e

core/core.pxd [deleted file]
core/eventloop.pxd [deleted file]
core/idle.pxd [deleted file]
core/prefs.pxd [deleted file]
libpurple/idle.pxd [new file with mode: 0644]
purple.pyx

diff --git a/core/core.pxd b/core/core.pxd
deleted file mode 100644 (file)
index 7f2fa68..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-#
-#  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 = None 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 <http://www.gnu.org/licenses/>.
-#
-
-cdef extern from "libpurple/core.h":
-    ctypedef struct PurpleCoreUiOps:
-        void (*ui_prefs_init) ()
-        void (*debug_ui_init) ()
-        void (*ui_init) ()
-        void (*quit) ()
-        GHashTable* (*get_ui_info) ()
-
-    cdef gboolean c_purple_core_init "purple_core_init" (const_char_ptr ui)
-    cdef void c_purple_core_quit "purple_core_quit" ()
-    cdef gboolean c_purple_core_migrate "purple_core_migrate" ()
-    cdef void c_purple_core_set_ui_ops "purple_core_set_ui_ops" (PurpleCoreUiOps *ops)
-
-""" CoreUiOps class """
-__core_uiops = None
-
-cdef void ui_prefs_init():
-    global __core_uiops
-    if __core_uiops and __core_uiops.ui_prefs_init:
-        __core_uiops.ui_prefs_init()
-
-cdef void debug_ui_init():
-    global __core_uiops
-    if __core_uiops and __core_uiops.debug_ui_init:
-        __core_uiops.debug_ui_init()
-
-cdef void ui_init():
-    global __core_uiops
-    if __core_uiops and __core_uiops.ui_init:
-        __core_uiops.ui_init()
-
-cdef void quit():
-    global __core_uiops
-    if __core_uiops and __core_uiops.quit:
-        __core_uiops.quit()
-
-cdef GHashTable *get_ui_info():
-    global __core_uiops
-    if __core_uiops and __core_uiops.get_ui_info:
-        __core_uiops.get_ui_info()
-
-
-class CoreUiOps(object):
-    def __init__(self):
-        self.ui_prefs_init = None
-        self.debug_ui_init = None
-        self.ui_init = None
-        self.quit = None
-        self.get_ui_info = None
-
-
-def core_set_ui_ops(core_uiops):
-    global __core_uiops
-    cdef PurpleCoreUiOps c_core_uiops
-
-    c_core_uiops.ui_prefs_init = ui_prefs_init
-    c_core_uiops.debug_ui_init = debug_ui_init
-    c_core_uiops.ui_init = ui_init
-    c_core_uiops.quit = quit
-    c_core_uiops.get_ui_info = get_ui_info
-
-    __core_uiops = core_uiops
-
-    c_purple_core_set_ui_ops(&c_core_uiops)
-
-def core_init(ui):
-    c_purple_core_init(ui)
-
diff --git a/core/eventloop.pxd b/core/eventloop.pxd
deleted file mode 100644 (file)
index 013324f..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-#  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 <http://www.gnu.org/licenses/>.
-#
-
-cdef extern from "libpurple/eventloop.h":
-    ctypedef struct PurpleEventLoopUiOps:
-        pass
-
-    void c_purple_eventloop_set_ui_ops "purple_eventloop_set_ui_ops" (PurpleEventLoopUiOps *ops)
-
-class EventLoop(object):
-    """ EventLoop class """
-
-    def __init__(self):
-        purple_eventloop_ui_ops = None
-
-    # FIXME
-    """
-    def purple_eventloop_set_ui_ops(ops):
-        c_purple_eventloop_set_ui_ops(ops)
-    """
diff --git a/core/idle.pxd b/core/idle.pxd
deleted file mode 100644 (file)
index 7130f04..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-#  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 <http://www.gnu.org/licenses/>.
-#
-
-cdef extern from "libpurple/idle.h":
-    ctypedef struct PurpleIdleUiOps:
-        pass
-
-    void c_purple_idle_set_ui_ops "purple_idle_set_ui_ops" (PurpleIdleUiOps *ops)
-
-class Idle(object):
-    """ Idle class """
-
-    def __init__(self):
-        purple_idle_ui_ops = None
-
-    # FIXME
-    """
-    def purple_idle_set_ui_ops(ops)
-        c_purple_idle_set_ui_ops(ops)
-    """
diff --git a/core/prefs.pxd b/core/prefs.pxd
deleted file mode 100644 (file)
index 3e402dd..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-#  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 <http://www.gnu.org/licenses/>.
-#
-
-cdef extern from "libpurple/prefs.h":
-    void c_purple_prefs_rename "purple_prefs_rename" (const_char_ptr oldname, const_char_ptr newname)
-    const_char_ptr c_purple_prefs_get_string "purple_prefs_get_string" (const_char_ptr name)
-    gboolean c_purple_prefs_load "purple_prefs_load" ()
-
-class Prefs(object):
-    """ Prefs class """
-
-    def __init__(self):
-        pass
-
-    def purple_prefs_rename(old_name, new_name):
-        c_purple_prefs_rename(old_name, new_name)
-
-    def purple_prefs_get_string(name):
-        return c_purple_prefs_get_string(name)
-
-    def purple_prefs_load():
-        return c_purple_prefs_load()
diff --git a/libpurple/idle.pxd b/libpurple/idle.pxd
new file mode 100644 (file)
index 0000000..cd4e8b5
--- /dev/null
@@ -0,0 +1,24 @@
+#
+#  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 <http://www.gnu.org/licenses/>.
+#
+
+cdef extern from "libpurple/idle.h":
+    ctypedef struct PurpleIdleUiOps:
+        pass
+
+    void c_purple_idle_set_ui_ops "purple_idle_set_ui_ops" (PurpleIdleUiOps *ops)
index c012dd2..e49067e 100644 (file)
@@ -34,6 +34,7 @@ include "libpurple/conversation.pxd"
 include "libpurple/core.pxd"
 include "libpurple/debug.pxd"
 include "libpurple/eventloop.pxd"
+include "libpurple/idle.pxd"
 include "libpurple/plugin.pxd"
 include "libpurple/pounce.pxd"
 include "libpurple/prefs.pxd"
@@ -177,11 +178,7 @@ cdef class Purple:
         conn = Connection()
         conn.connect()
 
-include "core/account.pxd"
-#include "core/blist.pxd"
-include "core/buddy.pxd"
-include "core/connection.pxd"
-include "core/conversation.pxd"
-#include "core/core.pxd"
-#include "core/idle.pxd"
-#include "core/pounce.pxd"
+include "account.pyx"
+include "buddy.pyx"
+include "connection.pyx"
+include "conversation.pyx"