summaryrefslogtreecommitdiff
path: root/libdleyna/core/service-task.h
blob: 25f0a81510a29dd8eda022ff7f706e5249bb5c4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
 * dLeyna
 *
 * Copyright (C) 2012-2015 Intel Corporation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU Lesser General Public License,
 * version 2.1, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope 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.
 *
 * Ludovic Ferrandis <ludovic.ferrandis@intel.com>
 * Regis Merlino <regis.merlino@intel.com>
 *
 */

#ifndef DLEYNA_SERVICE_TASK_H__
#define DLEYNA_SERVICE_TASK_H__

#include <glib.h>
#include <libgupnp/gupnp-service-proxy.h>

#include "task-atom.h"

typedef struct dleyna_service_task_t_ dleyna_service_task_t;

typedef GUPnPServiceProxyAction *(*dleyna_service_task_action)
						(dleyna_service_task_t *task,
						 GUPnPServiceProxy *proxy,
						 gboolean *failed);

const char *dleyna_service_task_create_source(void);

void dleyna_service_task_add(const dleyna_task_queue_key_t *queue_id,
			     dleyna_service_task_action action,
			     GUPnPServiceProxy *proxy,
			     GUPnPServiceProxyActionCallback action_cb,
			     GDestroyNotify free_func,
			     gpointer cb_user_data);

void dleyna_service_task_begin_action_cb(GUPnPServiceProxy *proxy,
					 GUPnPServiceProxyAction *action,
					 gpointer user_data);

void dleyna_service_task_process_cb(dleyna_task_atom_t *atom,
				    gpointer user_data);

void dleyna_service_task_cancel_cb(dleyna_task_atom_t *atom,
				   gpointer user_data);

void dleyna_service_task_delete_cb(dleyna_task_atom_t *atom,
				   gpointer user_data);

gpointer dleyna_service_task_get_user_data(dleyna_service_task_t *task);

#endif /* DLEYNA_SERVICE_TASK_H__ */