|  |  |  | Anjuta Developers Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
#include <libanjuta/anjuta-session.h>
                    AnjutaSession;
                    AnjutaSessionClass;
enum                AnjutaSessionPhase;
                    AnjutaSessionPriv;
void                anjuta_session_clear                (AnjutaSession *session);
void                anjuta_session_clear_section        (AnjutaSession *session,
                                                         const gchar *section);
GFile *             anjuta_session_get_file_from_relative_uri
                                                        (AnjutaSession *session,
                                                         const gchar *uri,
                                                         const gchar **fragment);
gfloat              anjuta_session_get_float            (AnjutaSession *session,
                                                         const gchar *section,
                                                         const gchar *key);
gint                anjuta_session_get_int              (AnjutaSession *session,
                                                         const gchar *section,
                                                         const gchar *key);
gchar *             anjuta_session_get_relative_uri_from_file
                                                        (AnjutaSession *session,
                                                         GFile *file,
                                                         const gchar *fragment);
const gchar *       anjuta_session_get_session_directory
                                                        (AnjutaSession *session);
gchar *             anjuta_session_get_session_filename (AnjutaSession *session);
gchar *             anjuta_session_get_string           (AnjutaSession *session,
                                                         const gchar *section,
                                                         const gchar *key);
GList *             anjuta_session_get_string_list      (AnjutaSession *session,
                                                         const gchar *section,
                                                         const gchar *key);
AnjutaSession *     anjuta_session_new                  (const gchar *session_directory);
void                anjuta_session_set_float            (AnjutaSession *session,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gfloat value);
void                anjuta_session_set_int              (AnjutaSession *session,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         gint value);
void                anjuta_session_set_string           (AnjutaSession *session,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         const gchar *value);
void                anjuta_session_set_string_list      (AnjutaSession *session,
                                                         const gchar *section,
                                                         const gchar *key,
                                                         GList *value);
void                anjuta_session_sync                 (AnjutaSession *session);
typedef struct {
	GObjectClass parent_class;
	/* Add Signal Functions Here */
} AnjutaSessionClass;
typedef enum {
	ANJUTA_SESSION_PHASE_START,
	ANJUTA_SESSION_PHASE_FIRST,
	ANJUTA_SESSION_PHASE_NORMAL,
	ANJUTA_SESSION_PHASE_LAST,
	ANJUTA_SESSION_PHASE_END,
} AnjutaSessionPhase;
void                anjuta_session_clear                (AnjutaSession *session);
Clears the session.
| 
 | an AnjutaSession object | 
void anjuta_session_clear_section (AnjutaSession *session,const gchar *section);
Clears the given section in session object.
| 
 | an AnjutaSession object. | 
| 
 | Section to clear. | 
GFile * anjuta_session_get_file_from_relative_uri (AnjutaSession *session,const gchar *uri,const gchar **fragment);
Return a GFile corresponding to the URI and and optional fragment, normally read from a session key. The path is expected to be relative to the session directory but it works with an absolute URI, in this case it returns the same file than g_file_new_for_uri. It is useful to keep only relative file paths in a session file to be able to copy the whole project without breaking references.
| 
 | an AnjutaSession object | 
| 
 | a relative URI from a key | 
| 
 | fragment part of the URI if existing, cal be NULL | 
| Returns : | A new GFile that has to be freed with g_object_unref(). | 
gfloat anjuta_session_get_float (AnjutaSession *session,const gchar *section,const gchar *key);
Get a float value of key in given section.
| 
 | an AnjutaSession object | 
| 
 | Section. | 
| 
 | Key name. | 
| Returns : | Key value | 
gint anjuta_session_get_int (AnjutaSession *session,const gchar *section,const gchar *key);
Get an integer value of key in given section.
| 
 | an AnjutaSession object | 
| 
 | Section. | 
| 
 | Key name. | 
| Returns : | Key value | 
gchar * anjuta_session_get_relative_uri_from_file (AnjutaSession *session,GFile *file,const gchar *fragment);
Return an URI relative to the session directory file with an optional fragment. It is useful to keep only relative file paths in a session file to be able to copy the whole project without breaking references.
| 
 | an AnjutaSession object | 
| 
 | a GFile | 
| 
 | an optional fragment | 
| Returns : | A string that has to be freed with g_free(). | 
const gchar *       anjuta_session_get_session_directory
                                                        (AnjutaSession *session);
Returns the directory corresponding to this session object.
| 
 | an AnjutaSession object | 
| Returns : | session directory | 
gchar *             anjuta_session_get_session_filename (AnjutaSession *session);
Gets the session filename corresponding to this session object.
| 
 | an AnjutaSession object | 
| Returns : | session (absolute) filename | 
gchar * anjuta_session_get_string (AnjutaSession *session,const gchar *section,const gchar *key);
Get a string value of key in given section.
| 
 | an AnjutaSession object | 
| 
 | Section. | 
| 
 | Key name. | 
| Returns : | Key value | 
GList * anjuta_session_get_string_list (AnjutaSession *session,const gchar *section,const gchar *key);
Get a list of strings value of key in given section.
| 
 | an AnjutaSession object | 
| 
 | Section. | 
| 
 | Key name. | 
| Returns : | Key value | 
AnjutaSession *     anjuta_session_new                  (const gchar *session_directory);
Created a new session object. session_directory is the directory
where session information will be stored or loaded in case of existing
session.
| 
 | Directory where session is loaded from/saved to. | 
| Returns : | an AnjutaSession Object | 
void anjuta_session_set_float (AnjutaSession *session,const gchar *section,const gchar *key,gfloat value);
Set a float value to key in given section.
| 
 | an AnjutaSession object | 
| 
 | Section. | 
| 
 | Key name. | 
| 
 | Key value | 
void anjuta_session_set_int (AnjutaSession *session,const gchar *section,const gchar *key,gint value);
Set an integer value to key in given section.
| 
 | an AnjutaSession object | 
| 
 | Section. | 
| 
 | Key name. | 
| 
 | Key value | 
void anjuta_session_set_string (AnjutaSession *session,const gchar *section,const gchar *key,const gchar *value);
Set a string value to key in given section.
| 
 | an AnjutaSession object | 
| 
 | Section. | 
| 
 | Key name. | 
| 
 | Key value | 
void anjuta_session_set_string_list (AnjutaSession *session,const gchar *section,const gchar *key,GList *value);
Set a list of strings value to key in given section.
| 
 | an AnjutaSession object | 
| 
 | Section. | 
| 
 | Key name. | 
| 
 | Key value | 
void                anjuta_session_sync                 (AnjutaSession *session);
Synchronizes session object with session file
| 
 | an AnjutaSession object |