PlankServicesPaths

PlankServicesPaths — A wrapper class that gives static instances of GFile for commonly used paths. Most paths are retrieved from GLib.Environment, which on Linux uses the XDG Base Directory specification (see http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html).

Synopsis

#define             PLANK_SERVICES_TYPE_PATHS
GFile *             plank_services_paths_get_HomeFolder (void);
void                plank_services_paths_set_HomeFolder (GFile *value);
GFile *             plank_services_paths_get_DataFolder (void);
void                plank_services_paths_set_DataFolder (GFile *value);
GFile *             plank_services_paths_get_ThemeFolder
                                                        (void);
void                plank_services_paths_set_ThemeFolder
                                                        (GFile *value);
GFile *             plank_services_paths_get_ConfigHomeFolder
                                                        (void);
void                plank_services_paths_set_ConfigHomeFolder
                                                        (GFile *value);
GFile *             plank_services_paths_get_DataHomeFolder
                                                        (void);
void                plank_services_paths_set_DataHomeFolder
                                                        (GFile *value);
GFile *             plank_services_paths_get_CacheHomeFolder
                                                        (void);
void                plank_services_paths_set_CacheHomeFolder
                                                        (GFile *value);
GeeArrayList *      plank_services_paths_get_DataDirFolders
                                                        (void);
void                plank_services_paths_set_DataDirFolders
                                                        (GeeArrayList *value);
GFile *             plank_services_paths_get_AppConfigFolder
                                                        (void);
void                plank_services_paths_set_AppConfigFolder
                                                        (GFile *value);
GFile *             plank_services_paths_get_AppDataFolder
                                                        (void);
void                plank_services_paths_set_AppDataFolder
                                                        (GFile *value);
GFile *             plank_services_paths_get_AppThemeFolder
                                                        (void);
void                plank_services_paths_set_AppThemeFolder
                                                        (GFile *value);
GFile *             plank_services_paths_get_AppCacheFolder
                                                        (void);
void                plank_services_paths_set_AppCacheFolder
                                                        (GFile *value);
void                plank_services_paths_initialize     (const gchar *app_name,
                                                         const gchar *data_folder);
gboolean            plank_services_paths_ensure_directory_exists
                                                        (GFile *dir);
struct              PlankServicesPaths;
struct              PlankServicesPathsClass;

Object Hierarchy

  GObject
   +----PlankServicesPaths

Description

Initializing this class also ensures any writable directories exist.

Details

PLANK_SERVICES_TYPE_PATHS

#define PLANK_SERVICES_TYPE_PATHS (plank_services_paths_get_type ())

The type for PlankServicesPaths.


plank_services_paths_get_HomeFolder ()

GFile *             plank_services_paths_get_HomeFolder (void);

Get and return the current value of the "HomeFolder" property.

User's home folder - $HOME

self :

the PlankServicesPaths instance to query

Returns :

the value of the "HomeFolder" property

plank_services_paths_set_HomeFolder ()

void                plank_services_paths_set_HomeFolder (GFile *value);

Set the value of the "HomeFolder" property to value.

User's home folder - $HOME

self :

the PlankServicesPaths instance to modify

value :

the new value of the "HomeFolder" property

plank_services_paths_get_DataFolder ()

GFile *             plank_services_paths_get_DataFolder (void);

Get and return the current value of the "DataFolder" property.

Path passed in to initialize method should be Build.PKGDATADIR

self :

the PlankServicesPaths instance to query

Returns :

the value of the "DataFolder" property

plank_services_paths_set_DataFolder ()

void                plank_services_paths_set_DataFolder (GFile *value);

Set the value of the "DataFolder" property to value.

Path passed in to initialize method should be Build.PKGDATADIR

self :

the PlankServicesPaths instance to modify

value :

the new value of the "DataFolder" property

plank_services_paths_get_ThemeFolder ()

GFile *             plank_services_paths_get_ThemeFolder
                                                        (void);

Get and return the current value of the "ThemeFolder" property.

DataFolder/themes

self :

the PlankServicesPaths instance to query

Returns :

the value of the "ThemeFolder" property

plank_services_paths_set_ThemeFolder ()

void                plank_services_paths_set_ThemeFolder
                                                        (GFile *value);

Set the value of the "ThemeFolder" property to value.

DataFolder/themes

self :

the PlankServicesPaths instance to modify

value :

the new value of the "ThemeFolder" property

plank_services_paths_get_ConfigHomeFolder ()

GFile *             plank_services_paths_get_ConfigHomeFolder
                                                        (void);

Get and return the current value of the "ConfigHomeFolder" property.

HomeFolder/.config

self :

the PlankServicesPaths instance to query

Returns :

the value of the "ConfigHomeFolder" property

plank_services_paths_set_ConfigHomeFolder ()

void                plank_services_paths_set_ConfigHomeFolder
                                                        (GFile *value);

Set the value of the "ConfigHomeFolder" property to value.

HomeFolder/.config

self :

the PlankServicesPaths instance to modify

value :

the new value of the "ConfigHomeFolder" property

plank_services_paths_get_DataHomeFolder ()

GFile *             plank_services_paths_get_DataHomeFolder
                                                        (void);

Get and return the current value of the "DataHomeFolder" property.

HomeFolder/.local/share

self :

the PlankServicesPaths instance to query

Returns :

the value of the "DataHomeFolder" property

plank_services_paths_set_DataHomeFolder ()

void                plank_services_paths_set_DataHomeFolder
                                                        (GFile *value);

Set the value of the "DataHomeFolder" property to value.

HomeFolder/.local/share

self :

the PlankServicesPaths instance to modify

value :

the new value of the "DataHomeFolder" property

plank_services_paths_get_CacheHomeFolder ()

GFile *             plank_services_paths_get_CacheHomeFolder
                                                        (void);

Get and return the current value of the "CacheHomeFolder" property.

HomeFolder/.cache

self :

the PlankServicesPaths instance to query

Returns :

the value of the "CacheHomeFolder" property

plank_services_paths_set_CacheHomeFolder ()

void                plank_services_paths_set_CacheHomeFolder
                                                        (GFile *value);

Set the value of the "CacheHomeFolder" property to value.

HomeFolder/.cache

self :

the PlankServicesPaths instance to modify

value :

the new value of the "CacheHomeFolder" property

plank_services_paths_get_DataDirFolders ()

GeeArrayList *      plank_services_paths_get_DataDirFolders
                                                        (void);

Get and return the current value of the "DataDirFolders" property.

/usr/local/share/:/usr/share/

self :

the PlankServicesPaths instance to query

Returns :

the value of the "DataDirFolders" property

plank_services_paths_set_DataDirFolders ()

void                plank_services_paths_set_DataDirFolders
                                                        (GeeArrayList *value);

Set the value of the "DataDirFolders" property to value.

/usr/local/share/:/usr/share/

self :

the PlankServicesPaths instance to modify

value :

the new value of the "DataDirFolders" property

plank_services_paths_get_AppConfigFolder ()

GFile *             plank_services_paths_get_AppConfigFolder
                                                        (void);

Get and return the current value of the "AppConfigFolder" property.

defaults to ConfigHomeFolder/app_name

self :

the PlankServicesPaths instance to query

Returns :

the value of the "AppConfigFolder" property

plank_services_paths_set_AppConfigFolder ()

void                plank_services_paths_set_AppConfigFolder
                                                        (GFile *value);

Set the value of the "AppConfigFolder" property to value.

defaults to ConfigHomeFolder/app_name

self :

the PlankServicesPaths instance to modify

value :

the new value of the "AppConfigFolder" property

plank_services_paths_get_AppDataFolder ()

GFile *             plank_services_paths_get_AppDataFolder
                                                        (void);

Get and return the current value of the "AppDataFolder" property.

defaults to DataHomeFolder/app_name

self :

the PlankServicesPaths instance to query

Returns :

the value of the "AppDataFolder" property

plank_services_paths_set_AppDataFolder ()

void                plank_services_paths_set_AppDataFolder
                                                        (GFile *value);

Set the value of the "AppDataFolder" property to value.

defaults to DataHomeFolder/app_name

self :

the PlankServicesPaths instance to modify

value :

the new value of the "AppDataFolder" property

plank_services_paths_get_AppThemeFolder ()

GFile *             plank_services_paths_get_AppThemeFolder
                                                        (void);

Get and return the current value of the "AppThemeFolder" property.

defaults to AppDataFolder/themes

self :

the PlankServicesPaths instance to query

Returns :

the value of the "AppThemeFolder" property

plank_services_paths_set_AppThemeFolder ()

void                plank_services_paths_set_AppThemeFolder
                                                        (GFile *value);

Set the value of the "AppThemeFolder" property to value.

defaults to AppDataFolder/themes

self :

the PlankServicesPaths instance to modify

value :

the new value of the "AppThemeFolder" property

plank_services_paths_get_AppCacheFolder ()

GFile *             plank_services_paths_get_AppCacheFolder
                                                        (void);

Get and return the current value of the "AppCacheFolder" property.

defaults to CacheHomeFolder/app_name

self :

the PlankServicesPaths instance to query

Returns :

the value of the "AppCacheFolder" property

plank_services_paths_set_AppCacheFolder ()

void                plank_services_paths_set_AppCacheFolder
                                                        (GFile *value);

Set the value of the "AppCacheFolder" property to value.

defaults to CacheHomeFolder/app_name

self :

the PlankServicesPaths instance to modify

value :

the new value of the "AppCacheFolder" property

plank_services_paths_initialize ()

void                plank_services_paths_initialize     (const gchar *app_name,
                                                         const gchar *data_folder);

Initialize the class, creating the GFile instances for all common paths. Also ensure that any writable directory exists.

app_name :

 . the name of the application. [in]

data_folder :

 . the path to the application's data folder. [in]

plank_services_paths_ensure_directory_exists ()

gboolean            plank_services_paths_ensure_directory_exists
                                                        (GFile *dir);

Creates the directory if it does not already exist

dir :

 . the directory to ensure exists. [in]

Returns :

true if a directory was created, false otherwise

struct PlankServicesPaths

struct PlankServicesPaths;

A wrapper class that gives static instances of GFile for commonly used paths. Most paths are retrieved from GLib.Environment, which on Linux uses the XDG Base Directory specification (see http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html).

Initializing this class also ensures any writable directories exist.


struct PlankServicesPathsClass

struct PlankServicesPathsClass {
	GObjectClass parent_class;
};

The class structure for PLANK_SERVICES_TYPE_PATHS. All the fields in this structure are private and should never be accessed directly.

GObjectClass parent_class;

the parent class structure