aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/media/media-rygel.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-05-13 10:33:29 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-05-13 10:33:29 +0200
commitaacefae70dd8c6b21398fa7a60574a24e1287eb0 (patch)
tree71f54bc373c5ede616d83261281074b17d2deadb /plugins/media/media-rygel.c
parent7b97a7f27578d7f4ce7cc994e5df303ac5d9c886 (diff)
media: uploading - first step
Change-Id: I469dac8883f2c8e94fa2384612723ff29e6eae41 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'plugins/media/media-rygel.c')
-rw-r--r--plugins/media/media-rygel.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/plugins/media/media-rygel.c b/plugins/media/media-rygel.c
index 66e2901a..00327795 100644
--- a/plugins/media/media-rygel.c
+++ b/plugins/media/media-rygel.c
@@ -22,6 +22,18 @@
#include "media-api.h"
#include "media-rygel.h"
+static void _rygel_device_cb (GUPnPControlPoint *, GUPnPDeviceProxy *, gpointer);
+static void _rygel_av_transport_cb (GUPnPControlPoint *, GUPnPDeviceProxy *, gpointer);
+static void _rygel_content_cb (GUPnPServiceProxy *, GUPnPServiceProxyAction *, gpointer);
+static void _rygel_metadata_cb (GUPnPServiceProxy *, GUPnPServiceProxyAction *, gpointer);
+static void _rygel_select_cb (GUPnPServiceProxy *, GUPnPServiceProxyAction *, gpointer);
+static void _rygel_upload_cb (GUPnPServiceProxy *, GUPnPServiceProxyAction *, gpointer);
+static void _rygel_transfer_cb (GUPnPServiceProxy *, GUPnPServiceProxyAction *, gpointer);
+static void _rygel_do_cb (GUPnPServiceProxy *, GUPnPServiceProxyAction *, gpointer);
+
+static unsigned int client_count = 0;
+static struct dev_ctx **dev_ctx = NULL;
+
/* -------------- MEDIA RYGEL IMPLEMENTATION ---------------- */
/* --- PUBLIC FUNCTIONS --- */
@@ -161,7 +173,7 @@ unsigned char _rygel_select (mediaCtxHandleT *ctx, unsigned int index) {
return 1;
}
-unsigned char _rygel_upload (mediaCtxHandleT *ctx, char *path) {
+unsigned char _rygel_upload (mediaCtxHandleT *ctx, const char *path, void (*oncompletion)(void*,int), void *closure) {
dev_ctx_T *dev_ctx_c = (dev_ctx_T*)ctx->media_server;
char *raw, *upload_id;
@@ -176,7 +188,7 @@ unsigned char _rygel_upload (mediaCtxHandleT *ctx, char *path) {
/* for now, we always use the same upload container id */
upload_id = _rygel_find_upload_id (dev_ctx_c, raw);
- return _rygel_start_uploading (dev_ctx_c, path, upload_id);
+ return _rygel_start_uploading (dev_ctx_c, strdup(path), upload_id);
}
unsigned char _rygel_do (mediaCtxHandleT *ctx, State state, char *args) {