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/>.
23 ctypedef char* const_char_ptr "const char *"
25 cdef extern from "time.h":
26 ctypedef long int time_t
28 cdef extern from "libpurple/debug.h":
29 void c_purple_debug_set_enabled "purple_debug_set_enabled" (gboolean debug_enabled)
31 cdef extern from "libpurple/plugin.h":
32 void c_purple_plugins_add_search_path "purple_plugins_add_search_path" (const_char_ptr path)
34 cdef extern from "libpurple/util.h":
35 void c_purple_util_set_user_dir "purple_util_set_user_dir" (char *dir)
37 cdef extern from "c_purple.h":
38 void init_libpurple(const_char_ptr ui_id)
42 self.DEFAULT_PATH = "/home/user/MyDocs/Carman"
43 self.APP_NAME = "carman-purple-python"
45 self.debug_set_enabled(True)
46 self.util_set_user_dir(self.DEFAULT_PATH)
47 self.plugin_add_search_path(self.DEFAULT_PATH)
49 init_libpurple(self.APP_NAME)
52 def debug_set_enabled(self, debug_enabled):
53 c_purple_debug_set_enabled(debug_enabled)
56 def plugin_add_search_path(self, path):
57 c_purple_plugins_add_search_path(path)
58 # plugin_add_search_path
60 def util_set_user_dir(self, dir):
61 c_purple_util_set_user_dir(dir)
64 #include "core/account.pxd"
65 #include "core/blist.pxd"
66 #include "core/connection.pxd"
67 #include "core/core.pxd"
68 #include "core/eventloop.pxd"
69 #include "core/idle.pxd"
70 #include "core/pounce.pxd"
71 #include "core/prefs.pxd"