## AnjutaSession AnjutaSession — Program session |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #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);
    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);
    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);

## Object Hierarchy

      GObject
       +----AnjutaSession

## Description

## Details

### AnjutaSession

    typedef struct _AnjutaSession AnjutaSession;

### AnjutaSessionClass

    typedef struct {
    	GObjectClass parent_class;
    	/* Add Signal Functions Here */
    } AnjutaSessionClass;

### enum AnjutaSessionPhase

    typedef enum {
    	ANJUTA_SESSION_PHASE_START,
    	ANJUTA_SESSION_PHASE_FIRST,
    	ANJUTA_SESSION_PHASE_NORMAL,
    	ANJUTA_SESSION_PHASE_LAST,
    	ANJUTA_SESSION_PHASE_END,
    } AnjutaSessionPhase;

### AnjutaSessionPriv

    typedef struct _AnjutaSessionPriv AnjutaSessionPriv;

### anjuta_session_clear ()

    void                anjuta_session_clear                (AnjutaSession *session);

Clears the session.

`session` : | an AnjutaSession object

### anjuta_session_clear_section ()

    void                anjuta_session_clear_section        (AnjutaSession *session,
                                                             const gchar *section);

Clears the given section in session object.

`session` : | an AnjutaSession object.
`section` : | Section to clear.

### anjuta_session_get_float ()

    gfloat              anjuta_session_get_float            (AnjutaSession *session,
                                                             const gchar *section,
                                                             const gchar *key);

Get a float `value` of `key` in given `section`.

`session` : | an AnjutaSession object
`section` : | Section.
`key` : | Key name.
Returns : | Key value

### anjuta_session_get_int ()

    gint                anjuta_session_get_int              (AnjutaSession *session,
                                                             const gchar *section,
                                                             const gchar *key);

Get an integer `value` of `key` in given `section`.

`session` : | an AnjutaSession object
`section` : | Section.
`key` : | Key name.
Returns : | Key value

### anjuta_session_get_session_directory ()

    const gchar *       anjuta_session_get_session_directory
                                                            (AnjutaSession *session);

Returns the directory corresponding to this session object.

`session` : | an AnjutaSession object
Returns : | session directory

### anjuta_session_get_session_filename ()

    gchar *             anjuta_session_get_session_filename (AnjutaSession *session);

Gets the session filename corresponding to this session object.

`session` : | an AnjutaSession object
Returns : | session (absolute) filename

### anjuta_session_get_string ()

    gchar *             anjuta_session_get_string           (AnjutaSession *session,
                                                             const gchar *section,
                                                             const gchar *key);

Get a string `value` of `key` in given `section`.

`session` : | an AnjutaSession object
`section` : | Section.
`key` : | Key name.
Returns : | Key value

### anjuta_session_get_string_list ()

    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`.

`session` : | an AnjutaSession object
`section` : | Section.
`key` : | Key name.
Returns : | Key value

### anjuta_session_new ()

    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.

`session_directory` : | Directory where session is loaded from/saved to.
Returns : | an AnjutaSession Object

### anjuta_session_set_float ()

    void                anjuta_session_set_float            (AnjutaSession *session,
                                                             const gchar *section,
                                                             const gchar *key,
                                                             gfloat value);

Set a float `value` to `key` in given `section`.

`session` : | an AnjutaSession object
`section` : | Section.
`key` : | Key name.
`value` : | Key value

### anjuta_session_set_int ()

    void                anjuta_session_set_int              (AnjutaSession *session,
                                                             const gchar *section,
                                                             const gchar *key,
                                                             gint value);

Set an integer `value` to `key` in given `section`.

`session` : | an AnjutaSession object
`section` : | Section.
`key` : | Key name.
`value` : | Key value

### anjuta_session_set_string ()

    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`.

`session` : | an AnjutaSession object
`section` : | Section.
`key` : | Key name.
`value` : | Key value

### anjuta_session_set_string_list ()

    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`.

`session` : | an AnjutaSession object
`section` : | Section.
`key` : | Key name.
`value` : | Key value

### anjuta_session_sync ()

    void                anjuta_session_sync                 (AnjutaSession *session);

Synchronizes session object with session file

`session` : | an AnjutaSession object