| 1 |
/* |
| 2 |
* librest - RESTful web services access |
| 3 |
* Copyright (c) 2008, 2009, Intel Corporation. |
| 4 |
* |
| 5 |
* Authors: Rob Bradford <[email protected]> |
| 6 |
* Ross Burton <[email protected]> |
| 7 |
* |
| 8 |
* This program is free software; you can redistribute it and/or modify it |
| 9 |
* under the terms and conditions of the GNU Lesser General Public License, |
| 10 |
* version 2.1, as published by the Free Software Foundation. |
| 11 |
* |
| 12 |
* This program is distributed in the hope it will be useful, but WITHOUT ANY |
| 13 |
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
| 14 |
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for |
| 15 |
* more details. |
| 16 |
* |
| 17 |
* You should have received a copy of the GNU Lesser General Public License |
| 18 |
* along with this program; if not, write to the Free Software Foundation, |
| 19 |
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 |
* |
| 21 |
*/ |
| 22 |
|
| 23 |
#pragma once |
| 24 |
|
| 25 |
#include <rest/rest-proxy.h> |
| 26 |
|
| 27 |
G_BEGIN_DECLS |
| 28 |
|
| 29 |
#define YOUTUBE_TYPE_PROXY youtube_proxy_get_type() |
| 30 |
|
| 31 |
G_DECLARE_DERIVABLE_TYPE (YoutubeProxy, youtube_proxy, YOUTUBE, PROXY, RestProxy) |
| 32 |
|
| 33 |
struct _YoutubeProxyClass { |
| 34 |
RestProxyClass parent_class; |
| 35 |
|
| 36 |
/*< private >*/ |
| 37 |
/* padding for future expansion */ |
| 38 |
gpointer _padding_dummy[8]; |
| 39 |
}; |
| 40 |
|
| 41 |
#define YOUTUBE_PROXY_ERROR youtube_proxy_error_quark() |
| 42 |
|
| 43 |
typedef void (*YoutubeProxyUploadCallback)(YoutubeProxy *proxy, |
| 44 |
const gchar *payload, |
| 45 |
gsize total, |
| 46 |
gsize uploaded, |
| 47 |
const GError *error, |
| 48 |
GObject *weak_object, |
| 49 |
gpointer user_data); |
| 50 |
|
| 51 |
RestProxy *youtube_proxy_new (const gchar *developer_key); |
| 52 |
RestProxy *youtube_proxy_new_with_auth (const gchar *developer_key, |
| 53 |
const gchar *user_auth); |
| 54 |
void youtube_proxy_set_user_auth (YoutubeProxy *proxy, |
| 55 |
const gchar *user_auth); |
| 56 |
gboolean youtube_proxy_upload_async (YoutubeProxy *self, |
| 57 |
const gchar *filename, |
| 58 |
GHashTable *fields, |
| 59 |
gboolean incomplete, |
| 60 |
YoutubeProxyUploadCallback callback, |
| 61 |
GObject *weak_object, |
| 62 |
gpointer user_data, |
| 63 |
GError **error); |
| 64 |
|
| 65 |
G_END_DECLS |