]> git.0d.be Git - empathy.git/blob - libempathy/action-chain-internal.h
sort contacts by most recent event
[empathy.git] / libempathy / action-chain-internal.h
1 /*
2  * Copyright (C) 2009 Collabora Ltd.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17  *
18  * Authors: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
19  */
20
21 #ifndef __TPL_ACTION_CHAIN_H__
22 #define __TPL_ACTION_CHAIN_H__
23
24 #include <glib-object.h>
25 #include <gio/gio.h>
26
27 typedef struct {
28     GQueue *chain;
29     GSimpleAsyncResult *simple;
30     gboolean running;
31 } TplActionChain;
32
33 TplActionChain *_tpl_action_chain_new_async (GObject *obj,
34     GAsyncReadyCallback cb,
35     gpointer user_data);
36 void _tpl_action_chain_free (TplActionChain *self);
37 typedef void (*TplPendingAction) (TplActionChain *ctx, gpointer user_data);
38 void _tpl_action_chain_append (TplActionChain *self, TplPendingAction func,
39     gpointer user_data);
40 void _tpl_action_chain_prepend (TplActionChain *self, TplPendingAction func,
41     gpointer user_data);
42 void _tpl_action_chain_start (TplActionChain *self);
43 void _tpl_action_chain_continue (TplActionChain *self);
44 void _tpl_action_chain_terminate (TplActionChain *self, const GError *error);
45 void _tpl_action_chain_clear (TplActionChain *self);
46
47 gpointer _tpl_action_chain_get_object (TplActionChain *self);
48 gboolean _tpl_action_chain_new_finish (GObject *source,
49     GAsyncResult *result, GError **error);
50
51 #endif // __TPL_ACTION_CHAIN_H__