1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ 2 /* 3 * GData Client 4 * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk> 5 * 6 * GData Client is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License, or (at your option) any later version. 10 * 11 * GData Client is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with GData Client. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 #ifndef GDATA_CATEGORY_H 21 #define GDATA_CATEGORY_H 22 23 #include <glib.h> 24 #include <glib-object.h> 25 26 #include <gdata/gdata-parsable.h> 27 28 G_BEGIN_DECLS 29 30 /** 31 * GDATA_CATEGORY_SCHEMA_LABELS: 32 * 33 * A schema for categories which label the entry they're applied to in some way, such as starring it. The semantics of the various labels 34 * (such as %GDATA_CATEGORY_SCHEMA_LABELS_STARRED) are service-specific. 35 * 36 * Since: 0.11.0 37 */ 38 #define GDATA_CATEGORY_SCHEMA_LABELS "http://schemas.google.com/g/2005/labels" 39 40 /** 41 * GDATA_CATEGORY_SCHEMA_LABELS_SHARED: 42 * 43 * A term for categories of the %GDATA_CATEGORY_SCHEMA_LABELS schema which labels an entry as being “shared”. The semantics of this label are 44 * service-specific, but are obvious for services such as Google Documents. 45 * 46 * Since: 0.17.0 47 */ 48 #define GDATA_CATEGORY_SCHEMA_LABELS_SHARED GDATA_CATEGORY_SCHEMA_LABELS"#shared" 49 50 /** 51 * GDATA_CATEGORY_SCHEMA_LABELS_STARRED: 52 * 53 * A term for categories of the %GDATA_CATEGORY_SCHEMA_LABELS schema which labels an entry as being “starred”. The semantics of this label are 54 * service-specific, but are obvious for services such as Google Documents. 55 * 56 * Since: 0.11.0 57 */ 58 #define GDATA_CATEGORY_SCHEMA_LABELS_STARRED GDATA_CATEGORY_SCHEMA_LABELS"#starred" 59 60 /** 61 * GDATA_CATEGORY_SCHEMA_LABELS_VIEWED: 62 * 63 * A term for categories of the %GDATA_CATEGORY_SCHEMA_LABELS schema which labels an entry as being “viewed”. The semantics of this label are 64 * service-specific, but are obvious for services such as Google Documents. 65 * 66 * Since: 0.17.0 67 */ 68 #define GDATA_CATEGORY_SCHEMA_LABELS_VIEWED GDATA_CATEGORY_SCHEMA_LABELS"#viewed" 69 70 #define GDATA_TYPE_CATEGORY (gdata_category_get_type ()) 71 #define GDATA_CATEGORY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_CATEGORY, GDataCategory)) 72 #define GDATA_CATEGORY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_CATEGORY, GDataCategoryClass)) 73 #define GDATA_IS_CATEGORY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_CATEGORY)) 74 #define GDATA_IS_CATEGORY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_CATEGORY)) 75 #define GDATA_CATEGORY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_CATEGORY, GDataCategoryClass)) 76 77 typedef struct _GDataCategoryPrivate GDataCategoryPrivate; 78 79 /** 80 * GDataCategory: 81 * 82 * All the fields in the #GDataCategory structure are private and should never be accessed directly. 83 */ 84 typedef struct { 85 GDataParsable parent; 86 GDataCategoryPrivate *priv; 87 } GDataCategory; 88 89 /** 90 * GDataCategoryClass: 91 * 92 * All the fields in the #GDataCategoryClass structure are private and should never be accessed directly. 93 * 94 * Since: 0.4.0 95 */ 96 typedef struct { 97 /*< private >*/ 98 GDataParsableClass parent; 99 100 /*< private >*/ 101 /* Padding for future expansion */ 102 void (*_g_reserved0) (void); 103 void (*_g_reserved1) (void); 104 } GDataCategoryClass; 105 106 GType gdata_category_get_type (void) G_GNUC_CONST; 107 108 GDataCategory *gdata_category_new (const gchar *term, const gchar *scheme, const gchar *label) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC; 109 110 const gchar *gdata_category_get_term (GDataCategory *self) G_GNUC_PURE; 111 void gdata_category_set_term (GDataCategory *self, const gchar *term); 112 113 const gchar *gdata_category_get_scheme (GDataCategory *self) G_GNUC_PURE; 114 void gdata_category_set_scheme (GDataCategory *self, const gchar *scheme); 115 116 const gchar *gdata_category_get_label (GDataCategory *self) G_GNUC_PURE; 117 void gdata_category_set_label (GDataCategory *self, const gchar *label); 118 119 G_END_DECLS 120 121 #endif /* !GDATA_CATEGORY_H */ 122