4 * Copyright (C) 2012 Intel Corporation. All rights reserved.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU Lesser General Public License,
8 * version 2.1, as published by the Free Software Foundation.
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
19 * Ludovic Ferrandis <ludovic.ferrandis@intel.com>
23 #ifndef MSU_CHAIN_TASK_H__
24 #define MSU_CHAIN_TASK_H__
26 #include <libgupnp/gupnp-service-proxy.h>
29 typedef struct msu_chain_task_t_ msu_chain_task_t;
31 typedef GUPnPServiceProxyAction * (*msu_chain_task_action)
32 (msu_chain_task_t *chain, gboolean *failed);
34 typedef void (*msu_chain_task_end)(msu_chain_task_t *chain, gpointer data);
36 msu_chain_task_t *msu_chain_task_new(msu_chain_task_end end_func,
39 void msu_chain_task_delete(msu_chain_task_t *chain);
41 void msu_chain_task_add(msu_chain_task_t *chain,
42 msu_chain_task_action action,
44 GUPnPServiceProxyActionCallback action_cb,
45 GDestroyNotify free_func,
46 gpointer cb_user_data);
48 void msu_chain_task_start(msu_chain_task_t *chain);
50 void msu_chain_task_begin_action_cb(GUPnPServiceProxy *proxy,
51 GUPnPServiceProxyAction *action,
54 void msu_chain_task_cancel(msu_chain_task_t *chain);
55 gboolean msu_chain_task_is_canceled(msu_chain_task_t *chain);
57 msu_device_t *msu_chain_task_get_device(msu_chain_task_t *chain);
58 gpointer *msu_chain_task_get_user_data(msu_chain_task_t *chain);
60 #endif /* MSU_CHAIN_TASK_H__ */