X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=plugins%2Fmedia%2Fmedia-rygel.c;h=003277955e81d57dbc34a56b67ac10f3c0d5bcf0;hb=83b48bb7331232020068d537716435458786a0cd;hp=66e2901aef56944c88afdfe9fde575ef6800155b;hpb=3303d82a7e637f7c15b55ee21d555df7b672ae81;p=src%2Fapp-framework-binder.git 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) {