| Camel Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#define CAMEL_LOCK_DOT_RETRY #define CAMEL_LOCK_DOT_DELAY #define CAMEL_LOCK_DOT_STALE #define CAMEL_LOCK_RETRY #define CAMEL_LOCK_DELAY enum CamelLockType;gint camel_lock_dot (const,gchar *path);GError **errorgint camel_lock_fcntl (,gint fdCamelLockType type,);GError **errorgint camel_lock_flock (,gint fdCamelLockType type,);GError **errorvoid camel_unlock_dot (const);gchar *pathvoid camel_unlock_fcntl ();gint fdvoid camel_unlock_flock ();gint fdgint camel_lock_folder (const,gchar *path,gint fdCamelLockType type,);GError **errorvoid camel_unlock_folder (const,gchar *path);gint fd
gint camel_lock_dot (const,gchar *path);GError **error
Create an exclusive lock using .lock semantics. All locks are equivalent to write locks (exclusive).
|
return location for a NULL |
Returns : |
-1 on error, sets ex appropriately. |
gint camel_lock_fcntl (,gint fdCamelLockType type,);GError **error
Create a lock using fcntl(2).
type is CAMEL_LOCK_WRITE or CAMEL_LOCK_READ,
to create exclusive or shared read locks
|
return location for a NULL |
Returns : |
-1 on error. |
gint camel_lock_flock (,gint fdCamelLockType type,);GError **error
Create a lock using flock(2).
type is CAMEL_LOCK_WRITE or CAMEL_LOCK_READ,
to create exclusive or shared read locks
|
return location for a NULL |
Returns : |
-1 on error. |
gint camel_lock_folder (const,gchar *path,gint fdCamelLockType type,);GError **error
Attempt to lock a folder, multiple attempts will be made using all locking strategies available.
|
Path to the file to lock (used for .locking only). |
|
Open file descriptor of the right type to lock. |
|
Type of lock, CAMEL_LOCK_READ or CAMEL_LOCK_WRITE. |
|
return location for a NULL |
Returns : |
-1 on error, ex will describe the locking system that failed. |