Blame gdata/gdata-entry.h

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 2008–2010 <philip@tecnocode.co.uk>
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_ENTRY_H
Packit 4b6dd7
#define GDATA_ENTRY_H
Packit 4b6dd7
Packit 4b6dd7
#include <glib.h>
Packit 4b6dd7
#include <glib-object.h>
Packit 4b6dd7
Packit 4b6dd7
#include <gdata/gdata-parsable.h>
Packit 4b6dd7
#include <gdata/atom/gdata-category.h>
Packit 4b6dd7
#include <gdata/atom/gdata-link.h>
Packit 4b6dd7
#include <gdata/atom/gdata-author.h>
Packit 4b6dd7
Packit 4b6dd7
G_BEGIN_DECLS
Packit 4b6dd7
Packit 4b6dd7
#define GDATA_TYPE_ENTRY		(gdata_entry_get_type ())
Packit 4b6dd7
#define GDATA_ENTRY(o)			(G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_ENTRY, GDataEntry))
Packit 4b6dd7
#define GDATA_ENTRY_CLASS(k)		(G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_ENTRY, GDataEntryClass))
Packit 4b6dd7
#define GDATA_IS_ENTRY(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_ENTRY))
Packit 4b6dd7
#define GDATA_IS_ENTRY_CLASS(k)		(G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_ENTRY))
Packit 4b6dd7
#define GDATA_ENTRY_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_ENTRY, GDataEntryClass))
Packit 4b6dd7
Packit 4b6dd7
typedef struct _GDataEntryPrivate	GDataEntryPrivate;
Packit 4b6dd7
Packit 4b6dd7
/**
Packit 4b6dd7
 * GDataEntry:
Packit 4b6dd7
 *
Packit 4b6dd7
 * All the fields in the #GDataEntry structure are private and should never be accessed directly.
Packit 4b6dd7
 */
Packit 4b6dd7
typedef struct {
Packit 4b6dd7
	GDataParsable parent;
Packit 4b6dd7
	GDataEntryPrivate *priv;
Packit 4b6dd7
} GDataEntry;
Packit 4b6dd7
Packit 4b6dd7
/**
Packit 4b6dd7
 * GDataEntryClass:
Packit 4b6dd7
 * @parent: the parent class
Packit 4b6dd7
 * @get_entry_uri: a function to build the entry URI for the entry, given its entry ID; free the URI with g_free()
Packit 4b6dd7
 * @kind_term: the term for this entry's kind category (see the
Packit 4b6dd7
 * <ulink type="http" url="http://code.google.com/apis/gdata/docs/2.0/elements.html#Introduction">documentation on kinds</ulink>)
Packit 4b6dd7
 *
Packit 4b6dd7
 * The class structure for the #GDataEntry type.
Packit 4b6dd7
 */
Packit 4b6dd7
typedef struct {
Packit 4b6dd7
	GDataParsableClass parent;
Packit 4b6dd7
Packit 4b6dd7
	gchar *(*get_entry_uri) (const gchar *id); /* G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC */
Packit 4b6dd7
	const gchar *kind_term;
Packit 4b6dd7
Packit 4b6dd7
	/*< private >*/
Packit 4b6dd7
	/* Padding for future expansion */
Packit 4b6dd7
	void (*_g_reserved0) (void);
Packit 4b6dd7
	void (*_g_reserved1) (void);
Packit 4b6dd7
	void (*_g_reserved2) (void);
Packit 4b6dd7
	void (*_g_reserved3) (void);
Packit 4b6dd7
	void (*_g_reserved4) (void);
Packit 4b6dd7
	void (*_g_reserved5) (void);
Packit 4b6dd7
	void (*_g_reserved6) (void);
Packit 4b6dd7
	void (*_g_reserved7) (void);
Packit 4b6dd7
} GDataEntryClass;
Packit 4b6dd7
Packit 4b6dd7
GType gdata_entry_get_type (void) G_GNUC_CONST;
Packit 4b6dd7
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GDataEntry, g_object_unref)
Packit 4b6dd7
Packit 4b6dd7
GDataEntry *gdata_entry_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
Packit 4b6dd7
Packit 4b6dd7
const gchar *gdata_entry_get_title (GDataEntry *self) G_GNUC_PURE;
Packit 4b6dd7
void gdata_entry_set_title (GDataEntry *self, const gchar *title);
Packit 4b6dd7
const gchar *gdata_entry_get_summary (GDataEntry *self) G_GNUC_PURE;
Packit 4b6dd7
void gdata_entry_set_summary (GDataEntry *self, const gchar *summary);
Packit 4b6dd7
const gchar *gdata_entry_get_id (GDataEntry *self) G_GNUC_PURE;
Packit 4b6dd7
const gchar *gdata_entry_get_etag (GDataEntry *self) G_GNUC_PURE;
Packit 4b6dd7
gint64 gdata_entry_get_updated (GDataEntry *self);
Packit 4b6dd7
gint64 gdata_entry_get_published (GDataEntry *self);
Packit 4b6dd7
void gdata_entry_add_category (GDataEntry *self, GDataCategory *category);
Packit 4b6dd7
GList *gdata_entry_get_categories (GDataEntry *self) G_GNUC_PURE;
Packit 4b6dd7
const gchar *gdata_entry_get_content (GDataEntry *self) G_GNUC_PURE;
Packit 4b6dd7
void gdata_entry_set_content (GDataEntry *self, const gchar *content);
Packit 4b6dd7
const gchar *gdata_entry_get_content_uri (GDataEntry *self) G_GNUC_PURE;
Packit 4b6dd7
void gdata_entry_set_content_uri (GDataEntry *self, const gchar *content_uri);
Packit 4b6dd7
void gdata_entry_add_link (GDataEntry *self, GDataLink *_link);
Packit 4b6dd7
gboolean gdata_entry_remove_link (GDataEntry *self, GDataLink *_link);
Packit 4b6dd7
GDataLink *gdata_entry_look_up_link (GDataEntry *self, const gchar *rel) G_GNUC_PURE;
Packit 4b6dd7
GList *gdata_entry_look_up_links (GDataEntry *self, const gchar *rel) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
Packit 4b6dd7
void gdata_entry_add_author (GDataEntry *self, GDataAuthor *author);
Packit 4b6dd7
GList *gdata_entry_get_authors (GDataEntry *self) G_GNUC_PURE;
Packit 4b6dd7
const gchar *gdata_entry_get_rights (GDataEntry *self) G_GNUC_PURE;
Packit 4b6dd7
void gdata_entry_set_rights (GDataEntry *self, const gchar *rights);
Packit 4b6dd7
Packit 4b6dd7
gboolean gdata_entry_is_inserted (GDataEntry *self) G_GNUC_PURE;
Packit 4b6dd7
Packit 4b6dd7
G_END_DECLS
Packit 4b6dd7
Packit 4b6dd7
#endif /* !GDATA_ENTRY_H */