1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Authors :
* Ebby Wiselyn <ebbywiselyn@gmail.com>
* Jason Willis <zenbrother@gmail.com>
*
* Copyright 2007, Novell, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU Lesser General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* * You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/
#ifndef _GDATA_ENTRY_H_
#define _GDATA_ENTRY_H_
#include <glib.h>
#include <glib-object.h>
/* LibXML2 includes */
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
G_BEGIN_DECLS
#define GDATA_TYPE_ENTRY (gdata_entry_get_type())
#define GDATA_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GDATA_TYPE_ENTRY, GDataEntry))
#define GDATA_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GDATA_TYPE_ENTRY, GDataEntryClass))
#define GDATA_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GDATA_TYPE_ENTRY))
#define GDATA_IS_ENTRY_CLASS(klass)(G_TYPE_CHECK_CLASS_TYPE((klass), GDATA_TYPE_ENTRY))
#define GDATA_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GDATA_TYPE_ENTRY, GDataEntryClass))
typedef struct _GDataEntry GDataEntry;
typedef struct _GDataEntryClass GDataEntryClass;
typedef struct _GDataEntryPrivate GDataEntryPrivate;
struct _GDataEntry {
GObject parent;
/* private */
GDataEntryPrivate *priv;
};
struct _GDataEntryClass {
GObjectClass parent_class;
/* class members */
};
/* Should be moved under extensions */
typedef struct _Attendee Attendee;
struct _Attendee {
gchar *attendee_email;
gchar *attendee_rel;
gchar *attendee_value;
gchar *attendee_status;
gchar *attendee_type;
};
GType gdata_entry_get_type(void);
/***** API *****/
GDataEntry * gdata_entry_new(void);
GDataEntryPrivate * gdata_entry_get_private (GDataEntry *entry);
GDataEntry * gdata_entry_new_from_xml(const gchar *entryXML);
GDataEntry * gdata_entry_new_from_xmlptr (xmlDocPtr doc, xmlNodePtr cur);
gchar * gdata_entry_generate_xml (GDataEntry *entry);
gchar * gdata_entry_get_id(GDataEntry *entry);
gchar * gdata_entry_get_content(GDataEntry *entry);
gchar * gdata_entry_get_description (GDataEntry *entry);
gchar * gdata_entry_get_copyright (GDataEntry *entry);
gchar * gdata_entry_get_title (GDataEntry *entry);
GSList * gdata_entry_get_authors (GDataEntry *entry);
GSList * gdata_entry_get_links (GDataEntry *links);
gchar * gdata_entry_get_start_time (GDataEntry *entry);
gchar * gdata_entry_get_end_time (GDataEntry *entry);
gchar * gdata_entry_get_location (GDataEntry *entry);
gchar * gdata_entry_get_status (GDataEntry *entry);
gchar * gdata_entry_get_edit_link (GDataEntry *entry);
GSList * gdata_entry_get_categories (GDataEntry *entry);
gchar * gdata_entry_get_start_date (GDataEntry *entry);
gchar * gdata_entry_get_end_date (GDataEntry *entry);
gchar *
gdata_entry_get_visibility (GDataEntry *entry);
gchar *
gdata_entry_get_transparency (GDataEntry *entry);
GSList *
gdata_entry_get_attendee_list (GDataEntry *entry);
void gdata_entry_set_author (GDataEntry *entry, GSList *author);
void gdata_entry_set_categories (GDataEntry *entry, GSList *categories);
void gdata_entry_set_title (GDataEntry *entry, const gchar *title);
void gdata_entry_set_content (GDataEntry *entry, const gchar *content);
void gdata_entry_set_links (GDataEntry *entry, GSList *links);
void gdata_entry_set_status (GDataEntry *entry, const gchar *status);
void gdata_entry_set_send_notification (GDataEntry *entry, const gchar *sendNotification);
void gdata_entry_set_reminder (GDataEntry *entry, const gchar *reminder);
void gdata_entry_set_start_time (GDataEntry *entry, const gchar *start_time);
void gdata_entry_set_end_time (GDataEntry *entry, const gchar *end_time);
void gdata_entry_set_transparency (GDataEntry *entry, const gchar *transparency);
void gdata_entry_set_location (GDataEntry *entry, const gchar *location);
void gdata_entry_create_authors (GDataEntry *entry,const gchar *name, const gchar *email);
void gdata_entry_create_categories (GDataEntry *entry, const gchar *scheme, const gchar *label , const gchar *term);
GSList * gdata_entries_new_from_xml (const gchar *feedXML, const gint length);
void
gdata_entry_set_id (GDataEntry *entry, gchar *id);
gboolean gdata_entry_is_recurrent (GDataEntry *entry);
void
gdata_entry_set_attendee_list (GDataEntry *entry, GSList *attendee);
#endif
|