1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
4 * Copyright (c) 2005 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 Library 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_SESSION_H_
22 #define _ANJUTA_SESSION_H_
25 #include <glib-object.h>
30 #define ANJUTA_TYPE_SESSION (anjuta_session_get_type ())
31 #define ANJUTA_SESSION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), ANJUTA_TYPE_SESSION, AnjutaSession))
32 #define ANJUTA_SESSION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), ANJUTA_TYPE_SESSION, AnjutaSessionClass))
33 #define ANJUTA_IS_SESSION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), ANJUTA_TYPE_SESSION))
34 #define ANJUTA_IS_SESSION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ANJUTA_TYPE_SESSION))
35 #define ANJUTA_SESSION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), ANJUTA_TYPE_SESSION, AnjutaSessionClass))
37 typedef struct _AnjutaSessionPriv AnjutaSessionPriv
;
41 ANJUTA_SESSION_PHASE_START
,
42 ANJUTA_SESSION_PHASE_FIRST
,
43 ANJUTA_SESSION_PHASE_NORMAL
,
44 ANJUTA_SESSION_PHASE_LAST
,
45 ANJUTA_SESSION_PHASE_END
,
50 AnjutaSessionPriv
*priv
;
54 GObjectClass parent_class
;
55 /* Add Signal Functions Here */
58 GType
anjuta_session_get_type (void);
59 AnjutaSession
*anjuta_session_new (const gchar
*session_directory
);
61 gchar
* anjuta_session_get_session_filename (AnjutaSession
*session
);
62 const gchar
* anjuta_session_get_session_directory (AnjutaSession
*session
);
64 void anjuta_session_sync (AnjutaSession
*session
);
65 void anjuta_session_clear (AnjutaSession
*session
);
66 void anjuta_session_clear_section (AnjutaSession
*session
,
67 const gchar
*section
);
69 void anjuta_session_set_int (AnjutaSession
*session
, const gchar
*section
,
70 const gchar
*key
, gint value
);
71 void anjuta_session_set_float (AnjutaSession
*session
, const gchar
*section
,
72 const gchar
*key
, gfloat value
);
73 void anjuta_session_set_string (AnjutaSession
*session
, const gchar
*section
,
74 const gchar
*key
, const gchar
*value
);
75 void anjuta_session_set_string_list (AnjutaSession
*session
,
77 const gchar
*key
, GList
*value
);
79 gint
anjuta_session_get_int (AnjutaSession
*session
, const gchar
*section
,
81 gfloat
anjuta_session_get_float (AnjutaSession
*session
, const gchar
*section
,
83 gchar
* anjuta_session_get_string (AnjutaSession
*session
, const gchar
*section
,
85 GList
* anjuta_session_get_string_list (AnjutaSession
*session
,
89 gchar
*anjuta_session_get_relative_uri_from_file (AnjutaSession
*session
,
91 const gchar
*fragment
);
92 GFile
* anjuta_session_get_file_from_relative_uri (AnjutaSession
*session
,
94 const gchar
**fragment
);
98 #endif /* _ANJUTA_SESSION_H_ */