include/basedir.h File Reference

Go to the source code of this file.

Classes

struct  xdgHandle

Defines

#define XDG_BASEDIR_SPEC   0.6

Functions

XDG data cache management


xdgHandle xdgAllocHandle ()
void xdgFreeHandle (xdgHandle handle)
int xdgUpdateData (xdgHandle handle)
Basic XDG Base Directory Queries


const char * xdgDataHome (xdgHandle handle)
const char * xdgConfigHome (xdgHandle handle)
const char *const * xdgDataDirectories (xdgHandle handle)
const char *const * xdgSearchableDataDirectories (xdgHandle handle)
const char *const * xdgConfigDirectories (xdgHandle handle)
const char *const * xdgSearchableConfigDirectories (xdgHandle handle)
const char * xdgCacheHome (xdgHandle handle)


Detailed Description

Functions for using the XDG Base Directory specification.

Define Documentation

#define XDG_BASEDIR_SPEC   0.6

Version of XDG Base Directory specification implemented in this library.


Function Documentation

xdgHandle xdgAllocHandle (  ) 

Get a handle to an XDG data cache and initialize the cache. Use xdgFreeHandle() to free the handle.

Returns:
a handle if allocation was successful, else 0

const char* xdgCacheHome ( xdgHandle  handle  ) 

Base directory for user specific non-essential data files.

Parameters:
handle Handle to data cache, allocated with xdgAllocHandle().
Returns:
a path as described by the standards.

const char* const* xdgConfigDirectories ( xdgHandle  handle  ) 

Preference-ordered set of base directories to search for configuration files in addition to the $XDG_CONFIG_HOME base directory.

Parameters:
handle Handle to data cache, allocated with xdgAllocHandle().
Returns:
A null-terminated list of directory strings.

const char* xdgConfigHome ( xdgHandle  handle  ) 

Base directory for user specific configuration files.

Parameters:
handle Handle to data cache, allocated with xdgAllocHandle().
Returns:
a path as described by the standards.

const char* const* xdgDataDirectories ( xdgHandle  handle  ) 

Preference-ordered set of base directories to search for data files in addition to the $XDG_DATA_HOME base directory.

Parameters:
handle Handle to data cache, allocated with xdgAllocHandle().
Returns:
A null-terminated list of directory strings.

const char* xdgDataHome ( xdgHandle  handle  ) 

Base directory for user specific data files.

Parameters:
handle Handle to data cache, allocated with xdgAllocHandle().
Returns:
a path as described by the standards.

void xdgFreeHandle ( xdgHandle  handle  ) 

Free handle to XDG data cache. Free handle allocated using xdgAllocHandle().

const char* const* xdgSearchableConfigDirectories ( xdgHandle  handle  ) 

Preference-ordered set of base directories to search for configuration files with $XDG_CONFIG_HOME prepended. The base directory defined by $XDG_CONFIG_HOME is considered more important than any of the base directories defined by $XDG_CONFIG_DIRS.

Parameters:
handle Handle to data cache, allocated with xdgAllocHandle().
Returns:
A null-terminated list of directory strings.

const char* const* xdgSearchableDataDirectories ( xdgHandle  handle  ) 

Preference-ordered set of base directories to search for data files with $XDG_DATA_HOME prepended. The base directory defined by $XDG_DATA_HOME is considered more important than any of the base directories defined by $XDG_DATA_DIRS.

Parameters:
handle Handle to data cache, allocated with xdgAllocHandle().
Returns:
A null-terminated list of directory strings.

int xdgUpdateData ( xdgHandle  handle  ) 

Update the data cache. This should not be done frequently as it reallocates the cache. Even if updating the cache fails the handle remains valid and can be used to access XDG data as it was before xdgUpdateData() was called.

Returns:
0 if update failed, non-0 if successful.


Generated on Wed Nov 12 11:32:31 2008 for XDGBaseDirectorySpecificationsLibrary by  doxygen 1.5.7.1