summaryrefslogtreecommitdiff
path: root/libdleyna/server/upnp.h
blob: b2d9ba139128d5fb4cac02c0cf40c262b8b81f10 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/*
 * dLeyna
 *
 * Copyright (C) 2012-2013 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.
 *
 * Mark Ryan <mark.d.ryan@intel.com>
 *
 */

#ifndef DLS_UPNP_H__
#define DLS_UPNP_H__

#include <libdleyna/core/connector.h>

#include "client.h"
#include "async.h"

typedef void (*dls_upnp_callback_t)(const gchar *path, void *user_data);
typedef void (*dls_upnp_task_complete_t)(dls_task_t *task, GError *error);

dls_upnp_t *dls_upnp_new(dleyna_connector_id_t connection,
			 const dleyna_connector_dispatch_cb_t *dispatch_table,
			 dls_upnp_callback_t found_server,
			 dls_upnp_callback_t lost_server,
			 void *user_data);

void dls_upnp_delete(dls_upnp_t *upnp);

GVariant *dls_upnp_get_device_ids(dls_upnp_t *upnp);

GHashTable *dls_upnp_get_device_udn_map(dls_upnp_t *upnp);

void dls_upnp_get_children(dls_upnp_t *upnp, dls_client_t *client,
			   dls_task_t *task,
			   dls_upnp_task_complete_t cb);

void dls_upnp_get_all_props(dls_upnp_t *upnp, dls_client_t *client,
			    dls_task_t *task,
			    dls_upnp_task_complete_t cb);

void dls_upnp_get_prop(dls_upnp_t *upnp, dls_client_t *client,
		       dls_task_t *task,
		       dls_upnp_task_complete_t cb);

void dls_upnp_search(dls_upnp_t *upnp, dls_client_t *client,
		     dls_task_t *task,
		     dls_upnp_task_complete_t cb);

void dls_upnp_browse_objects(dls_upnp_t *upnp, dls_client_t *client,
			     dls_task_t *task,
			     dls_upnp_task_complete_t cb);

void dls_upnp_get_resource(dls_upnp_t *upnp, dls_client_t *client,
			   dls_task_t *task,
			   dls_upnp_task_complete_t cb);

void dls_upnp_upload_to_any(dls_upnp_t *upnp, dls_client_t *client,
			    dls_task_t *task,
			    dls_upnp_task_complete_t cb);

void dls_upnp_upload(dls_upnp_t *upnp, dls_client_t *client,
		     dls_task_t *task,
		     dls_upnp_task_complete_t cb);

void dls_upnp_get_upload_status(dls_upnp_t *upnp, dls_task_t *task);

void dls_upnp_get_upload_ids(dls_upnp_t *upnp, dls_task_t *task);

void dls_upnp_cancel_upload(dls_upnp_t *upnp, dls_task_t *task);

void dls_upnp_delete_object(dls_upnp_t *upnp, dls_client_t *client,
			    dls_task_t *task,
			    dls_upnp_task_complete_t cb);

void dls_upnp_create_container(dls_upnp_t *upnp, dls_client_t *client,
			       dls_task_t *task,
			       dls_upnp_task_complete_t cb);

void dls_upnp_create_container_in_any(dls_upnp_t *upnp, dls_client_t *client,
				      dls_task_t *task,
				      dls_upnp_task_complete_t cb);

void dls_upnp_update_object(dls_upnp_t *upnp, dls_client_t *client,
			    dls_task_t *task,
			    dls_upnp_task_complete_t cb);

void dls_upnp_get_object_metadata(dls_upnp_t *upnp, dls_client_t *client,
				  dls_task_t *task,
				  dls_upnp_task_complete_t cb);

void dls_upnp_create_reference(dls_upnp_t *upnp, dls_client_t *client,
			       dls_task_t *task,
			       dls_upnp_task_complete_t cb);

void dls_upnp_get_icon(dls_upnp_t *upnp, dls_client_t *client,
		       dls_task_t *task,
		       dls_upnp_task_complete_t cb);

void dls_upnp_wake(dls_upnp_t *upnp, dls_client_t *client,
		   dls_task_t *task,
		   dls_upnp_task_complete_t cb);

void dls_upnp_unsubscribe(dls_upnp_t *upnp);

gboolean dls_upnp_device_context_exist(dls_device_t *device,
				       dls_device_context_t *context);

void dls_upnp_rescan(dls_upnp_t *upnp);

GUPnPContextManager *dls_upnp_get_context_manager(dls_upnp_t *upnp);

#endif /* DLS_UPNP_H__ */