1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
4 * Copyright (C) 2003 Ximian, Inc.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of version 2 of the GNU Lesser General Public
8 * License as published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this program; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
20 * Author: Ettore Perazzoli <ettore@ximian.com>
26 #include <glib-object.h>
27 #include <libxml/tree.h>
31 #define E_TYPE_SOURCE (e_source_get_type ())
32 #define E_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_SOURCE, ESource))
33 #define E_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_SOURCE, ESourceClass))
34 #define E_IS_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_SOURCE))
35 #define E_IS_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_SOURCE))
38 typedef struct _ESource ESource;
39 typedef struct _ESourcePrivate ESourcePrivate;
40 typedef struct _ESourceClass ESourceClass;
42 #include "e-source-group.h"
50 struct _ESourceClass {
51 GObjectClass parent_class;
54 void (* changed) (ESource *source);
58 GType e_source_get_type (void);
60 ESource *e_source_new (const char *name,
61 const char *relative_uri);
62 ESource *e_source_new_with_absolute_uri(const char *name,
63 const char *absolute_uri);
64 ESource *e_source_new_from_xml_node (xmlNodePtr node);
65 ESource *e_source_new_from_standalone_xml (const char *xml);
67 ESource *e_source_copy (ESource *source);
69 gboolean e_source_equal (ESource *source_1, ESource *source_2);
71 gboolean e_source_update_from_xml_node (ESource *source,
73 gboolean *changed_return);
75 char *e_source_uid_from_xml_node (xmlNodePtr node);
77 void e_source_set_group (ESource *source,
79 void e_source_set_name (ESource *source,
81 void e_source_set_relative_uri (ESource *source,
82 const char *relative_uri);
83 void e_source_set_absolute_uri (ESource *source,
84 const char *absolute_uri);
85 void e_source_set_color_spec (ESource *source,
86 const gchar *color_spec);
87 void e_source_set_readonly (ESource *source,
89 #ifndef EDS_DISABLE_DEPRECATED
90 void e_source_set_color (ESource *source,
92 void e_source_unset_color (ESource *source);
95 ESourceGroup *e_source_peek_group (ESource *source);
96 const char *e_source_peek_uid (ESource *source);
97 const char *e_source_peek_name (ESource *source);
98 const char *e_source_peek_relative_uri (ESource *source);
99 const char *e_source_peek_absolute_uri (ESource *source);
100 const char *e_source_peek_color_spec (ESource *source);
101 gboolean e_source_get_readonly (ESource *source);
102 #ifndef EDS_DISABLE_DEPRECATED
103 gboolean e_source_get_color (ESource *source,
104 guint32 *color_return);
107 char *e_source_get_uri (ESource *source);
109 void e_source_dump_to_xml_node (ESource *source,
110 xmlNodePtr parent_node);
111 char *e_source_to_standalone_xml (ESource *source);
113 const gchar *e_source_get_property (ESource *source,
114 const gchar *property);
115 void e_source_set_property (ESource *source,
116 const gchar *property,
118 void e_source_foreach_property (ESource *source,
122 char *e_source_get_duped_property (ESource *source, const char *property);
123 char *e_source_build_absolute_uri (ESource *source);
127 #endif /* _E_SOURCE_H_ */