summaryrefslogtreecommitdiff
path: root/rest-extras
diff options
context:
space:
mode:
authorEitan Isaacson <eitan@monotonous.org>2011-03-21 00:53:44 -0700
committerRoss Burton <ross@linux.intel.com>2011-03-22 21:38:15 +0000
commit1a4acc9d57cc8c9640d3d380b053947d487ade8a (patch)
tree7d1ce64e90a25f5e8a23c1c423eb9c2be51bbf9f /rest-extras
parent59e0fad3762607693a00aecf06ca1deecc05bc0b (diff)
downloadlibrest-1a4acc9d57cc8c9640d3d380b053947d487ade8a.tar.gz
youtube-proxy: Added incomplete option.librest-0.7.8
Diffstat (limited to 'rest-extras')
-rw-r--r--rest-extras/youtube-proxy.c8
-rw-r--r--rest-extras/youtube-proxy.h1
2 files changed, 7 insertions, 2 deletions
diff --git a/rest-extras/youtube-proxy.c b/rest-extras/youtube-proxy.c
index 9f9bedb..af39e20 100644
--- a/rest-extras/youtube-proxy.c
+++ b/rest-extras/youtube-proxy.c
@@ -160,7 +160,7 @@ youtube_proxy_set_user_auth (YoutubeProxy *proxy,
}
static gchar *
-_construct_upload_atom_xml (GHashTable *fields)
+_construct_upload_atom_xml (GHashTable *fields, gboolean incomplete)
{
GHashTableIter iter;
gpointer key, value;
@@ -175,6 +175,9 @@ _construct_upload_atom_xml (GHashTable *fields)
rest_xml_node_add_attr (entry, "xmlns:yt",
"http://gdata.youtube.com/schemas/2007");
+ if (incomplete)
+ rest_xml_node_add_child (group, "yt:incomplete");
+
g_hash_table_iter_init (&iter, fields);
while (g_hash_table_iter_next (&iter, &key, &value)) {
@@ -317,6 +320,7 @@ gboolean
youtube_proxy_upload_async (YoutubeProxy *self,
const gchar *filename,
GHashTable *fields,
+ gboolean incomplete,
YoutubeProxyUploadCallback callback,
GObject *weak_object,
gpointer userdata,
@@ -339,7 +343,7 @@ youtube_proxy_upload_async (YoutubeProxy *self,
mp = soup_multipart_new ("multipart/related");
- atom_xml = _construct_upload_atom_xml (fields);
+ atom_xml = _construct_upload_atom_xml (fields, incomplete);
sb = soup_buffer_new_with_owner (atom_xml,
strlen(atom_xml),
diff --git a/rest-extras/youtube-proxy.h b/rest-extras/youtube-proxy.h
index b2bde90..440fd6a 100644
--- a/rest-extras/youtube-proxy.h
+++ b/rest-extras/youtube-proxy.h
@@ -84,6 +84,7 @@ typedef void (*YoutubeProxyUploadCallback)(YoutubeProxy *proxy,
gboolean youtube_proxy_upload_async (YoutubeProxy *self,
const gchar *filename,
GHashTable *fields,
+ gboolean incomplete,
YoutubeProxyUploadCallback callback,
GObject *weak_object,
gpointer userdata,