diff options
author | 2019-05-17 14:09:36 +0300 | |
---|---|---|
committer | 2019-05-17 14:09:36 +0300 | |
commit | 2af2f46c41c7e4c770acf466baa5717b763b70a5 (patch) | |
tree | 994e3c29822e3e1a93fe4e34c45a327cb655605f /src/daemon/purple_private.h | |
parent | 9c0b33eb35d93b1ac3db644dd148979afbed79a5 (diff) | |
parent | e355b074ac00e8b05af89f854b0e46d80a5de00a (diff) | |
download | usurpation-2af2f46c41c7e4c770acf466baa5717b763b70a5.tar.gz usurpation-2af2f46c41c7e4c770acf466baa5717b763b70a5.tar.bz2 usurpation-2af2f46c41c7e4c770acf466baa5717b763b70a5.zip |
Merge branch '18-purple'
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'src/daemon/purple_private.h')
-rw-r--r-- | src/daemon/purple_private.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/daemon/purple_private.h b/src/daemon/purple_private.h new file mode 100644 index 0000000..ff50139 --- /dev/null +++ b/src/daemon/purple_private.h @@ -0,0 +1,56 @@ +/* + * Usurpation – server daemon IM module, private header + * + * Copyright (C) 2019 Gediminas Jakutis + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; version 2.1 + * of the License. + * + * This program 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef USURPATION_PURPLE_PRIVATE_H +#define USURPATION_PURPLE_PRIVATE_H + +#include <pthread.h> + +static void iface_init(void); + +static struct state { + pthread_mutex_t mutex; + pthread_t purple; + PurpleAccount *account; +} state = {PTHREAD_MUTEX_INITIALIZER, 0, 0}; + +struct glib_io { + PurpleInputFunction func; + guint result; + void *data; +}; + +static PurpleCoreUiOps core_uiops = { + NULL, + NULL, + iface_init, + NULL, + NULL, + NULL, + NULL, + NULL +}; + +static gboolean purple_glib_io(GIOChannel *source, GIOCondition cond, gpointer data); +static guint glib_input_add(gint fd, PurpleInputCondition pio_cond, PurpleInputFunction function, gpointer data); +static void *purple_spawn(void *disregard); +static void pthread_mutex_unlock_thunk(void *arg); + +#endif /* USURPATION_PURPLE_PRIVATE_H */ |