Rework check_input so that it can work with any widget that gives a string.
[anjuta-git-plugin.git] / libanjuta / anjuta-profile.h
blobd9a2845ee344ae6c6383feded89d4e2bca7b8942
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2 /*
3 * anjuta-profile.h
4 * Copyright (C) Naba Kumar <naba@gnome.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program 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
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef _ANJUTA_PROFILE_H_
22 #define _ANJUTA_PROFILE_H_
24 #include <glib-object.h>
25 #include <libanjuta/anjuta-plugin-description.h>
26 #include <libanjuta/anjuta-plugin-manager.h>
28 G_BEGIN_DECLS
30 #define ANJUTA_TYPE_PROFILE (anjuta_profile_get_type ())
31 #define ANJUTA_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ANJUTA_TYPE_PROFILE, AnjutaProfile))
32 #define ANJUTA_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ANJUTA_TYPE_PROFILE, AnjutaProfileClass))
33 #define ANJUTA_IS_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ANJUTA_TYPE_PROFILE))
34 #define ANJUTA_IS_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ANJUTA_TYPE_PROFILE))
35 #define ANJUTA_PROFILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ANJUTA_TYPE_PROFILE, AnjutaProfileClass))
36 #define ANJUTA_PROFILE_ERROR (anjuta_profile_error_quark())
38 typedef enum
40 ANJUTA_PROFILE_ERROR_URI_READ_FAILED,
41 ANJUTA_PROFILE_ERROR_URI_WRITE_FAILED
42 } AnjutaProfileError;
44 typedef struct _AnjutaProfileClass AnjutaProfileClass;
45 typedef struct _AnjutaProfile AnjutaProfile;
46 typedef struct _AnjutaProfilePriv AnjutaProfilePriv;
48 struct _AnjutaProfileClass
50 GObjectClass parent_class;
52 /* Signals */
53 void(* plugin_added) (AnjutaProfile *self,
54 AnjutaPluginDescription *plugin);
55 void(* plugin_removed) (AnjutaProfile *self,
56 AnjutaPluginDescription *plugin);
57 void(* changed) (AnjutaProfile *self, GList *plugins);
60 struct _AnjutaProfile
62 GObject parent_instance;
63 AnjutaProfilePriv *priv;
66 GQuark anjuta_profile_error_quark (void);
67 GType anjuta_profile_get_type (void) G_GNUC_CONST;
69 AnjutaProfile* anjuta_profile_new (const gchar *profile_name,
70 AnjutaPluginManager *plugin_manager);
71 const gchar *anjuta_profile_get_name (AnjutaProfile *profile);
72 void anjuta_profile_add_plugin (AnjutaProfile *profile,
73 AnjutaPluginDescription *plugin);
74 void anjuta_profile_remove_plugin (AnjutaProfile *profile,
75 AnjutaPluginDescription *plugin);
76 gboolean anjuta_profile_add_plugins_from_xml (AnjutaProfile *profile,
77 const gchar* profile_xml_uri,
78 gboolean exclude_from_sync,
79 GError **error);
80 gboolean anjuta_profile_has_plugin (AnjutaProfile *profile,
81 AnjutaPluginDescription *plugin);
82 GList* anjuta_profile_get_plugins (AnjutaProfile *profile);
84 gchar* anjuta_profile_to_xml (AnjutaProfile *profile);
85 void anjuta_profile_set_sync_uri (AnjutaProfile *profile,
86 const gchar *sync_uri);
87 gboolean anjuta_profile_sync (AnjutaProfile *profile, GError **error);
89 G_END_DECLS
91 #endif /* _ANJUTA_PROFILE_H_ */