#include <sys/stat.h>
Go to the source code of this file.
Classes | |
| struct | _sproc_data |
Defines | |
| #define | PARENT_FUNC(func) int func (SubprocessData *subproc, void *udata) |
| #define | CHILD_FUNC(func) int func (SubprocessData *subproc, void *udata) |
| #define | SUBPROCESS(func) int func (void *param) |
| #define | __PRETTY_FUNCTION__ "" |
| #define | S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) |
| #define | S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) |
| #define | S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) |
| #define | S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) |
| #define | S_ISREG(m) (((m) & S_IFMT) == S_IFREG) |
Typedefs | |
| typedef int(* | ParentFunc )(struct _sproc_data *sdata, void *udata) |
| typedef int(* | ChildFunc )(struct _sproc_data *sdata, void *udata) |
| typedef _sproc_data | SubprocessData |
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) |
| LIBGIFT_EXPORT int | platform_gettimeofday (struct timeval *tv, void *unused) |
| LIBGIFT_EXPORT int | platform_child (ChildFunc cfunc, ParentFunc pfunc, void *udata) |
| LIBGIFT_EXPORT int | platform_child_sendmsg (SubprocessData *sdata, char *msg, size_t len) |
| LIBGIFT_EXPORT int | platform_child_recvmsg (SubprocessData *sdata) |
| LIBGIFT_EXPORT char * | platform_version (void) |
| LIBGIFT_EXPORT unsigned long | platform_errno (void) |
| LIBGIFT_EXPORT char * | platform_error (void) |
| LIBGIFT_EXPORT unsigned long | platform_net_errno (void) |
| LIBGIFT_EXPORT char * | platform_net_error (void) |
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.
|
|
Structure containing data passed between parent and child processes. |
|
||||||||||||||||
|
Spawn's a child process. In *nix, fork is used, in Windows, a thread is used.
|
|
|
Receive a message from a child process in a parent process. The data is returned in sdata->data, and the length in sdata->len.
|
|
||||||||||||||||
|
Send a message to a parent process from a child process.
|
|
|
Platform specific cleanup. Frees any memory that was allocated by platform_init. Please note that platform_cleanup should be called on program termination. |
|
|
Contains installed data, such as mime.types. UNIX: this is defined by configure as DATA_DIR Windows: The plugin_dir + /data |
|
|
Access the error code of the last system error. This uses GetLastError() on Windows and errno for everything else.
|
|
|
Access the error message of the last system error. On Windows , FormatMessage() and GetLastError() will be used. Otherwise the standard strerror call will be used.
|
|
||||||||||||
|
Emulates *nix's gettimeofday function.
|
|
|
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. |
|
||||||||||||||||||||
|
Platform specific initialization. Must be called before calling any other functions in this library. See libgift_init for a more appropriate and complete wrapper.
|
|
|
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 |
|
|
Access the error code of the last socket error. This function is implemented only to work around Windows non-conformity. |
|
|
Similar to platform_error, but will use platform_net_errno to retrieve the error number. |
|
|
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 |
|
|
Access an HTTP_USER_AGENT string describing the giFT version and OS version. Uhm, this really wasn't very well throught out and you should definitely avoid using this function.
|
1.3.7