|
Packit |
4b6dd7 |
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
|
|
Packit |
4b6dd7 |
/*
|
|
Packit |
4b6dd7 |
* GData Client
|
|
Packit |
4b6dd7 |
* Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
|
|
Packit |
4b6dd7 |
* Copyright (C) Richard Schwarting 2010 <aquarichy@gmail.com>
|
|
Packit |
4b6dd7 |
*
|
|
Packit |
4b6dd7 |
* GData Client is free software; you can redistribute it and/or
|
|
Packit |
4b6dd7 |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
4b6dd7 |
* License as published by the Free Software Foundation; either
|
|
Packit |
4b6dd7 |
* version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
4b6dd7 |
*
|
|
Packit |
4b6dd7 |
* GData Client is distributed in the hope that it will be useful,
|
|
Packit |
4b6dd7 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
4b6dd7 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
4b6dd7 |
* Lesser General Public License for more details.
|
|
Packit |
4b6dd7 |
*
|
|
Packit |
4b6dd7 |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
4b6dd7 |
* License along with GData Client. If not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
4b6dd7 |
*/
|
|
Packit |
4b6dd7 |
|
|
Packit |
4b6dd7 |
#ifndef GDATA_COMMENTABLE_H
|
|
Packit |
4b6dd7 |
#define GDATA_COMMENTABLE_H
|
|
Packit |
4b6dd7 |
|
|
Packit |
4b6dd7 |
#include <glib.h>
|
|
Packit |
4b6dd7 |
#include <glib-object.h>
|
|
Packit |
4b6dd7 |
|
|
Packit |
4b6dd7 |
#include <gdata/gdata-feed.h>
|
|
Packit |
4b6dd7 |
#include <gdata/gdata-service.h>
|
|
Packit |
4b6dd7 |
#include <gdata/gdata-comment.h>
|
|
Packit |
4b6dd7 |
|
|
Packit |
4b6dd7 |
G_BEGIN_DECLS
|
|
Packit |
4b6dd7 |
|
|
Packit |
4b6dd7 |
#define GDATA_TYPE_COMMENTABLE (gdata_commentable_get_type ())
|
|
Packit |
4b6dd7 |
#define GDATA_COMMENTABLE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_COMMENTABLE, GDataCommentable))
|
|
Packit |
4b6dd7 |
#define GDATA_COMMENTABLE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_COMMENTABLE, GDataCommentableInterface))
|
|
Packit |
4b6dd7 |
#define GDATA_IS_COMMENTABLE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_COMMENTABLE))
|
|
Packit |
4b6dd7 |
#define GDATA_COMMENTABLE_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GDATA_TYPE_COMMENTABLE, GDataCommentableInterface))
|
|
Packit |
4b6dd7 |
|
|
Packit |
4b6dd7 |
/**
|
|
Packit |
4b6dd7 |
* GDataCommentable:
|
|
Packit |
4b6dd7 |
*
|
|
Packit |
4b6dd7 |
* All the fields in the #GDataCommentable structure are private and should never be accessed directly
|
|
Packit |
4b6dd7 |
*
|
|
Packit |
4b6dd7 |
* Since: 0.10.0
|
|
Packit |
4b6dd7 |
*/
|
|
Packit |
4b6dd7 |
typedef struct _GDataCommentable GDataCommentable; /* dummy typedef */
|
|
Packit |
4b6dd7 |
|
|
Packit |
4b6dd7 |
/**
|
|
Packit |
4b6dd7 |
* GDataCommentableInterface:
|
|
Packit |
4b6dd7 |
* @parent: the parent type
|
|
Packit |
4b6dd7 |
* @comment_type: the #GType of the comment class (subclass of #GDataComment) to use for query results from this commentable object
|
|
Packit |
4b6dd7 |
* @get_authorization_domain: (allow-none): a function to return the #GDataAuthorizationDomain to be used for all operations on the comments
|
|
Packit |
4b6dd7 |
* belonging to this commentable object; not implementing this function is equivalent to returning %NULL from it, which signifies that operations on the
|
|
Packit |
4b6dd7 |
* comments don't require authorization
|
|
Packit |
4b6dd7 |
* @get_query_comments_uri: a function that returns the URI of a #GDataFeed of comments from a commentable object, or %NULL if the given commentable
|
|
Packit |
4b6dd7 |
* object doesn't support commenting; free with g_free()
|
|
Packit |
4b6dd7 |
* @get_insert_comment_uri: a function that returns the URI to add new comments to the commentable object, or %NULL if the given commentable object
|
|
Packit |
4b6dd7 |
* doesn't support adding comments; free with g_free()
|
|
Packit |
4b6dd7 |
* @is_comment_deletable: a function that returns %TRUE if the given comment may be deleted, %FALSE otherwise
|
|
Packit |
4b6dd7 |
*
|
|
Packit |
4b6dd7 |
* The interface structure for the #GDataCommentable interface.
|
|
Packit |
4b6dd7 |
*
|
|
Packit |
4b6dd7 |
* Since: 0.10.0
|
|
Packit |
4b6dd7 |
*/
|
|
Packit |
4b6dd7 |
typedef struct {
|
|
Packit |
4b6dd7 |
GTypeInterface parent;
|
|
Packit |
4b6dd7 |
|
|
Packit |
4b6dd7 |
GType comment_type;
|
|
Packit |
4b6dd7 |
|
|
Packit |
4b6dd7 |
GDataAuthorizationDomain *(*get_authorization_domain) (GDataCommentable *self);
|
|
Packit |
4b6dd7 |
|
|
Packit |
4b6dd7 |
gchar *(*get_query_comments_uri) (GDataCommentable *self);
|
|
Packit |
4b6dd7 |
gchar *(*get_insert_comment_uri) (GDataCommentable *self, GDataComment *comment);
|
|
Packit |
4b6dd7 |
gboolean (*is_comment_deletable) (GDataCommentable *self, GDataComment *comment);
|
|
Packit |
4b6dd7 |
} GDataCommentableInterface;
|
|
Packit |
4b6dd7 |
|
|
Packit |
4b6dd7 |
GType gdata_commentable_get_type (void) G_GNUC_CONST;
|
|
Packit |
4b6dd7 |
|
|
Packit |
4b6dd7 |
GDataFeed *gdata_commentable_query_comments (GDataCommentable *self, GDataService *service, GDataQuery *query, GCancellable *cancellable,
|
|
Packit |
4b6dd7 |
GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
|
|
Packit |
4b6dd7 |
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
|
|
Packit |
4b6dd7 |
void gdata_commentable_query_comments_async (GDataCommentable *self, GDataService *service, GDataQuery *query, GCancellable *cancellable,
|
|
Packit |
4b6dd7 |
GDataQueryProgressCallback progress_callback, gpointer progress_user_data,
|
|
Packit |
4b6dd7 |
GDestroyNotify destroy_progress_user_data, GAsyncReadyCallback callback, gpointer user_data);
|
|
Packit |
4b6dd7 |
GDataFeed *gdata_commentable_query_comments_finish (GDataCommentable *self, GAsyncResult *result,
|
|
Packit |
4b6dd7 |
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
|
|
Packit |
4b6dd7 |
|
|
Packit |
4b6dd7 |
GDataComment *gdata_commentable_insert_comment (GDataCommentable *self, GDataService *service, GDataComment *comment_, GCancellable *cancellable,
|
|
Packit |
4b6dd7 |
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
|
|
Packit |
4b6dd7 |
void gdata_commentable_insert_comment_async (GDataCommentable *self, GDataService *service, GDataComment *comment_, GCancellable *cancellable,
|
|
Packit |
4b6dd7 |
GAsyncReadyCallback callback, gpointer user_data);
|
|
Packit |
4b6dd7 |
GDataComment *gdata_commentable_insert_comment_finish (GDataCommentable *self, GAsyncResult *result,
|
|
Packit |
4b6dd7 |
GError **error) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
|
|
Packit |
4b6dd7 |
|
|
Packit |
4b6dd7 |
gboolean gdata_commentable_delete_comment (GDataCommentable *self, GDataService *service, GDataComment *comment_, GCancellable *cancellable,
|
|
Packit |
4b6dd7 |
GError **error);
|
|
Packit |
4b6dd7 |
void gdata_commentable_delete_comment_async (GDataCommentable *self, GDataService *service, GDataComment *comment_, GCancellable *cancellable,
|
|
Packit |
4b6dd7 |
GAsyncReadyCallback callback, gpointer user_data);
|
|
Packit |
4b6dd7 |
gboolean gdata_commentable_delete_comment_finish (GDataCommentable *self, GAsyncResult *result, GError **error);
|
|
Packit |
4b6dd7 |
|
|
Packit |
4b6dd7 |
G_END_DECLS
|
|
Packit |
4b6dd7 |
|
|
Packit |
4b6dd7 |
#endif /* !GDATA_COMMENTABLE_H */
|