1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 3 /* 4 * GThumb 5 * 6 * Copyright (C) 2010 Free Software Foundation, Inc. 7 * 8 * This program is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program. If not, see <http://www.gnu.org/licenses/>. 20 */ 21 22 #ifndef FACEBOOK_SERVICE_H 23 #define FACEBOOK_SERVICE_H 24 25 #include <gtk/gtk.h> 26 #include <gthumb.h> 27 #include <extensions/oauth/oauth.h> 28 #include "facebook-album.h" 29 #include "facebook-types.h" 30 31 #define FACEBOOK_TYPE_SERVICE (facebook_service_get_type ()) 32 #define FACEBOOK_SERVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), FACEBOOK_TYPE_SERVICE, FacebookService)) 33 #define FACEBOOK_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), FACEBOOK_TYPE_SERVICE, FacebookServiceClass)) 34 #define FACEBOOK_IS_SERVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), FACEBOOK_TYPE_SERVICE)) 35 #define FACEBOOK_IS_SERVICE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), FACEBOOK_TYPE_SERVICE)) 36 #define FACEBOOK_SERVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), FACEBOOK_TYPE_SERVICE, FacebookServiceClass)) 37 38 typedef struct _FacebookService FacebookService; 39 typedef struct _FacebookServicePrivate FacebookServicePrivate; 40 typedef struct _FacebookServiceClass FacebookServiceClass; 41 42 struct _FacebookService 43 { 44 WebService __parent; 45 FacebookServicePrivate *priv; 46 }; 47 48 struct _FacebookServiceClass 49 { 50 WebServiceClass __parent_class; 51 }; 52 53 GType facebook_service_get_type (void) G_GNUC_CONST; 54 FacebookService * facebook_service_new (GCancellable *cancellable, 55 GtkWidget *browser, 56 GtkWidget *dialog); 57 void facebook_service_get_albums (FacebookService *self, 58 GCancellable *cancellable, 59 GAsyncReadyCallback callback, 60 gpointer user_data); 61 GList * facebook_service_get_albums_finish (FacebookService *self, 62 GAsyncResult *result, 63 GError **error); 64 void facebook_service_create_album (FacebookService *self, 65 FacebookAlbum *album, 66 GCancellable *cancellable, 67 GAsyncReadyCallback callback, 68 gpointer user_data); 69 FacebookAlbum * facebook_service_create_album_finish (FacebookService *self, 70 GAsyncResult *result, 71 GError **error); 72 void facebook_service_upload_photos (FacebookService *self, 73 FacebookAlbum *album, 74 GList *file_list, /* GFile list */ 75 int max_resolution, 76 GCancellable *cancellable, 77 GAsyncReadyCallback callback, 78 gpointer user_data); 79 GList * facebook_service_upload_photos_finish (FacebookService *self, 80 GAsyncResult *result, 81 GError **error); 82 void facebook_service_list_photos (FacebookService *self, 83 FacebookAlbum *album, 84 int limit, 85 const char *after, 86 GCancellable *cancellable, 87 GAsyncReadyCallback callback, 88 gpointer user_data); 89 GList * facebook_service_list_photos_finish (FacebookService *self, 90 GAsyncResult *result, 91 GError **error); 92 93 #endif /* FACEBOOK_SERVICE_H */ 94