-ctypedef enum gboolean:
- FALSE, TRUE
+#
+# 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/account.h":
ctypedef struct PurpleAccount
- cdef PurpleAccount *purple_account_new(char *username, char *protocol_id)
+ cdef PurpleAccount* c_purple_account_new "purple_account_new" (const_char_ptr username, const_char_ptr protocol_id)
+ cdef void c_purple_account_set_password "purple_account_set_password" (PurpleAccount *account, const_char_ptr password)
+ cdef void c_purple_account_set_enabled "purple_account_set_enabled" (PurpleAccount *account, const_char_ptr ui, gboolean value)
- cdef void purple_account_set_password(PurpleAccount *account,
- char *password)
+class Account(object):
+ """ Account class """
- cdef void purple_account_set_enabled(PurpleAccount *account, char *ui,
- gboolean value)
-
-cdef extern from "libpurple/connection.h":
- ctypedef struct PurpleConnection
-
- cdef PurpleAccount *purple_connection_get_account(PurpleConnection *gc)
+ def __init__(self):
+ purple_account = None
+ # FIXME
+ """
+ def purple_account_new(self, user_name, protocol_id):
+ return c_purple_account_new(user_name, protocol_id)
+ def purple_account_set_password(self, account, password):
+ c_purple_account_set_password(account, password)
+ def purple_account_set_enabled(self, account, ui, value):
+ c_purple_account_set_enabled(account, ui, value)
+ """
+#
+# 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/blist.h":
ctypedef struct PurpleBuddyList
- cdef void purple_set_blist(PurpleBuddyList *list)
- cdef void purple_blist_load()
- cdef PurpleBuddyList *purple_blist_new()
+ cdef void c_purple_set_blist "purple_set_blist" (PurpleBuddyList *list)
+ cdef void c_purple_blist_load "purple_blist_load" ()
+ cdef PurpleBuddyList* purple_blist_new "purple_blist_new" ()
+
+class BList(object):
+ """ BList class """
+
+ def __init__(self):
+ purple_buddy_list = None
+
+ # FIXME
+ """
+ def purple_set_blist(self, list):
+ c_purple_set_blist(list)
+
+ def purple_blist_load(self):
+ c_purple_blist_load()
+
+ def purple_blist_new(self):
+ return c_purple_blist_new()
+ """
+#
+# 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/core.h":
ctypedef struct PurpleCoreUiOps
- cdef gboolean purple_core_init(char *ui)
- cdef gboolean purple_core_migrate()
- cdef void purple_core_set_ui_ops(PurpleCoreUiOps *ops)
+ 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)
+
+class Core(object):
+ """ Core class """
+
+ def __init__(self):
+ purple_core_ui_ops = None
+
+ def purple_core_init(self, ui_name):
+ return c_purple_core_init(ui_name)
+
+ def purple_core_quit(self):
+ c_purple_core_quit()
+
+ def purple_core_migrate(self):
+ return c_purple_core_migrate()
+
+ # FIXME
+ """
+ def purple_core_set_ui_ops(ui_ops):
+ c_purple_core_set_ui_ops(ui_ops)
+ """
+#
+# 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/debug.h":
- cdef void purple_debug_set_enabled(gboolean debug_enabled)
+ cdef void c_purple_debug_set_enabled "purple_debug_set_enabled" (gboolean debug_enabled)
+
+class Debug(object):
+ """ Debug class """
+
+ def __init__(self):
+ pass
+
+ def purple_debug_set_enabled(self, debug_enabled):
+ c_purple_debug_set_enabled(debug_enabled)
+#
+# 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
- cdef void purple_eventloop_set_ui_ops(PurpleEventLoopUiOps *ops)
+ cdef 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)
+ """
+#
+# 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
- cdef void purple_idle_set_ui_ops(PurpleIdleUiOps *ops)
+ cdef 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)
+ """
+#
+# 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/plugin.h":
- cdef void purple_plugins_add_search_path(char *path)
- cdef void purple_plugins_load_saved(char *key)
+ ctypedef struct PurplePlugin
+
+ cdef void c_purple_plugins_add_search_path "purple_plugins_add_search_path" (const_char_ptr path)
+ cdef void c_purple_plugins_load_saved "purple_plugins_load_saved" (const_char_ptr key)
+ cdef gboolean c_purple_plugin_register "purple_plugin_register" (PurplePlugin *plugin)
+
+class Plugin(object):
+ """ Plugin class """
+
+ def __init__(self):
+ purple_plugin = None
+
+ def purple_plugins_add_search_path(path):
+ c_purple_plugins_add_search_path(path)
+
+ def purple_plugins_load_saved(key):
+ c_purple_plugins_load_saved(key)
+
+ # FIXME
+ """
+ def purple_plugin_register(plugin):
+ return c_purple_plugin_register(plugin)
+ """
+#
+# 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/pounce.h":
- cdef gboolean purple_pounces_load()
+ cdef gboolean c_purple_pounces_load "purple_pounces_load" ()
+
+class Pounce(object):
+ """ Pounce class """
+
+ def __init__(self):
+ pass
+
+ def purple_pounces_load():
+ return c_purple_pounces_load()
+#
+# 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":
- cdef void purple_prefs_rename(char *oldname, char *newname)
- cdef char *purple_prefs_get_string(char *name)
- cdef gboolean purple_prefs_load()
+ cdef void c_purple_prefs_rename "purple_prefs_rename" (const_char_ptr oldname, const_char_ptr newname)
+ cdef const_char_ptr c_purple_prefs_get_string "purple_prefs_get_string" (const_char_ptr name)
+ cdef 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()
+#
+# 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/util.h":
- cdef void purple_util_set_user_dir(char *dir)
+ cdef void c_purple_util_set_user_dir "purple_util_set_user_dir" (char *dir)
+
+class Utils(object):
+ """ Utils class """
+
+ def __init__(self):
+ pass
+
+ def purple_util_set_user_dir(self, dir):
+ c_purple_util_set_user_dir(dir)
-#include "core/blist.pxd"
-#include "core/core.pxd"
-#include "core/debug.pxd"
-#include "core/eventloop.pxd"
-#include "core/idle.pxd"
-#include "core/plugin.pxd"
-#include "core/pounce.pxd"
-#include "core/prefs.pxd"
-#include "core/util.pxd"
+#
+# 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 "glib-2.0/glib.h":
+ ctypedef gboolean
+
+cdef extern from *:
+ ctypedef char* const_char_ptr "const char *"
+
+include "core/account.pxd"
+include "core/blist.pxd"
+include "core/connection.pxd"
+include "core/core.pxd"
+include "core/debug.pxd"
+include "core/eventloop.pxd"
+include "core/idle.pxd"
+include "core/plugin.pxd"
+include "core/pounce.pxd"
+include "core/prefs.pxd"
+include "core/util.pxd"