Main Page | Class List | File List | Class Members | File Members | Related Pages

platform.h File Reference

Platform specific routines. More...

#include <sys/stat.h>

Go to the source code of this file.

Functions

EXTERN_C_BEGIN LIBGIFT_EXPORT
char * 
platform_data_dir (void)
LIBGIFT_EXPORT char * platform_plugin_dir (void)
LIBGIFT_EXPORT char * platform_home_dir (void)
LIBGIFT_EXPORT char * platform_local_dir (void)
LIBGIFT_EXPORT bool platform_init (const char *home_dir, const char *local_dir, const char *data_dir, const char *plugin_dir)
LIBGIFT_EXPORT void platform_cleanup (void)


Detailed Description

Platform specific routines.

Contains routines that are specific to a platform (*nix, Windows, etc). You should be aware that you are expected to call platform_init before using any routines held within libgiFT.


Function Documentation

LIBGIFT_EXPORT void platform_cleanup void   ) 
 

Platform specific cleanup. Frees any memory that was allocated by platform_init.

Please note that platform_cleanup should be called on program termination.

EXTERN_C_BEGIN LIBGIFT_EXPORT char* platform_data_dir void   ) 
 

Contains installed data, such as mime.types.

UNIX: this is defined by configure as DATA_DIR Windows: The plugin_dir + /data

LIBGIFT_EXPORT char* platform_home_dir void   ) 
 

Contains the user's 'home' directory.

UNIX: assigned to $HOME or /home/$USER Windows: Searches for the first valid directory in: 1. HKEY_CURRENT_USER registry key 2. HOME% directory, if HOME% is defined in the environment. 3. Directory where giFT started from. 4. Current directory.

LIBGIFT_EXPORT bool platform_init const char *  home_dir,
const char *  local_dir,
const char *  data_dir,
const char *  plugin_dir
 

Platform specific initialization.

Must be called before calling any other functions in this library. See libgift_init for a more appropriate and complete wrapper.

Parameters:
home_dir Optional home_dir hint.
local_dir Optional local_dir hint.
data_dir Optional data_dir hint.
plugin_dir Optional plugin_dir hint.
Returns:
Boolean success or failure. Failure to initialize the platform will result in several systems being unusable. You should not proceed with execution.

LIBGIFT_EXPORT char* platform_local_dir void   ) 
 

Contains all user preferences (.conf files).

UNIX: assigned to $HOME/.giFT Windows: Searches for the first valid directory in: 1. home_dir 2. home_dir + /.giFT

LIBGIFT_EXPORT char* platform_plugin_dir void   ) 
 

Contains all dynamically loaded plugins that this giFT installation has available.

UNIX: this is defined by configure as PLUGIN_DIR Windows: Searches for the first valid directory in: 1. HKEY_LOCAL_MACHINE registry key 2. Directory where giFT started from 3. Current directory


Generated on Sun Aug 22 07:56:41 2004 by doxygen 1.3.7