+STATIC json_object* seek (AFB_request *request) { /* AFB_SESSION_CHECK */
+
+ mediaCtxHandleT *ctx = (mediaCtxHandleT*)request->context;
+ const char *value = getQueryValue (request, "value");
+
+ /* no "?value=" parameter : return error */
+ if (!value)
+ return jsonNewMessage(AFB_FAIL, "You must provide a time");
+
+ if (!_rygel_do (ctx, SEEK, value))
+ return jsonNewMessage(AFB_FAIL, "Could not seek chosen media");
+
+ return jsonNewMessage(AFB_SUCCESS, "Seeked media");
+}
+
+STATIC json_object* upload (AFB_request *request, AFB_PostItem *item) { /* AFB_SESSION_CHECK */
+
+ mediaCtxHandleT *ctx = (mediaCtxHandleT*)request->context;
+ AFB_PostCtx *postFileCtx;
+#if 0
+ const char *value = getQueryValue (request, "value");
+ json_object *jresp;
+ char path[256];
+
+ /* no "?value=" parameter : return error */
+ if (!value)
+ return jsonNewMessage(AFB_FAIL, "You must provide a file name");
+#endif
+ if (item == NULL) {
+ postFileCtx = getPostContext (request);
+ if (postFileCtx) {
+ postFileCtx->errcode = MHD_HTTP_OK;
+ postFileCtx->jresp = jsonNewMessage (AFB_SUCCESS, "upload=%s done", getPostPath (request));
+ }
+ }
+
+ return getPostFile (request, item, "media");
+#if 0
+ snprintf (path, sizeof(path), "/tmp/%s", value);
+ if (access (path, R_OK) == -1)
+ return jsonNewMessage(AFB_FAIL, "File not found");
+
+ if (!_rygel_upload (ctx, path))
+ return jsonNewMessage(AFB_FAIL, "Error when uploading file... could not complete");
+
+ return jsonNewMessage(AFB_SUCCESS, "File successfully uploaded");
+#endif
+}
+