1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
4 * Copyright (C) Naba Kumar <naba@gnome.org>
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>
26 #include <libanjuta/anjuta-plugin-description.h>
27 #include <libanjuta/anjuta-plugin-manager.h>
31 #define ANJUTA_TYPE_PROFILE (anjuta_profile_get_type ())
32 #define ANJUTA_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ANJUTA_TYPE_PROFILE, AnjutaProfile))
33 #define ANJUTA_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ANJUTA_TYPE_PROFILE, AnjutaProfileClass))
34 #define ANJUTA_IS_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ANJUTA_TYPE_PROFILE))
35 #define ANJUTA_IS_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ANJUTA_TYPE_PROFILE))
36 #define ANJUTA_PROFILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ANJUTA_TYPE_PROFILE, AnjutaProfileClass))
39 * ANJUTA_PROFILE_ERROR:
41 * Error domain for Anjuta profile. Errors in this domain will be from the
42 * #AnjutaProfileError enumeration. See #GError for more information
45 #define ANJUTA_PROFILE_ERROR (anjuta_profile_error_quark())
49 * @ANJUTA_PROFILE_ERROR_URI_READ_FAILED: Fail to read xml plugins list file.
50 * @ANJUTA_PROFILE_ERROR_URI_WRITE_FAILED: Fail to write xml plugins list file.
52 * Error codes returned by anjuta profile functions.
57 ANJUTA_PROFILE_ERROR_URI_READ_FAILED
,
58 ANJUTA_PROFILE_ERROR_URI_WRITE_FAILED
61 typedef struct _AnjutaProfileClass AnjutaProfileClass
;
62 typedef struct _AnjutaProfile AnjutaProfile
;
63 typedef struct _AnjutaProfilePriv AnjutaProfilePriv
;
65 struct _AnjutaProfileClass
67 GObjectClass parent_class
;
70 void(* plugin_added
) (AnjutaProfile
*self
,
71 AnjutaPluginDescription
*plugin
);
72 void(* plugin_removed
) (AnjutaProfile
*self
,
73 AnjutaPluginDescription
*plugin
);
74 void(* changed
) (AnjutaProfile
*self
, GList
*plugins
);
80 * Stores a plugin list.
84 GObject parent_instance
;
85 AnjutaProfilePriv
*priv
;
88 GQuark
anjuta_profile_error_quark (void);
89 GType
anjuta_profile_get_type (void) G_GNUC_CONST
;
91 AnjutaProfile
* anjuta_profile_new (const gchar
*name
,
92 AnjutaPluginManager
*plugin_manager
);
93 const gchar
*anjuta_profile_get_name (AnjutaProfile
*profile
);
94 void anjuta_profile_add_plugin (AnjutaProfile
*profile
,
95 AnjutaPluginDescription
*plugin
);
96 void anjuta_profile_remove_plugin (AnjutaProfile
*profile
,
97 AnjutaPluginDescription
*plugin
);
98 gboolean
anjuta_profile_add_plugins_from_xml (AnjutaProfile
*profile
,
99 GFile
* profile_xml_file
,
100 gboolean exclude_from_sync
,
102 gboolean
anjuta_profile_has_plugin (AnjutaProfile
*profile
,
103 AnjutaPluginDescription
*plugin
);
104 GList
* anjuta_profile_get_plugins (AnjutaProfile
*profile
);
106 void anjuta_profile_set_sync_file (AnjutaProfile
*profile
,
108 gboolean
anjuta_profile_sync (AnjutaProfile
*profile
, GError
**error
);
112 #endif /* _ANJUTA_PROFILE_H_ */