![]() |
![]() |
![]() |
ZIF Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#define ZIF_LOCK_ERROR struct ZifLock; ZifLockPrivate; struct ZifLockClass; enum ZifLockError; GQuark zif_lock_error_quark (void
); ZifLock * zif_lock_new (void
); gboolean zif_lock_is_locked (ZifLock *lock
,guint *pid
); gboolean zif_lock_set_locked (ZifLock *lock
,guint *pid
,GError **error
); gboolean zif_lock_set_unlocked (ZifLock *lock
,GError **error
);
typedef enum { ZIF_LOCK_ERROR_FAILED, ZIF_LOCK_ERROR_ALREADY_LOCKED, ZIF_LOCK_ERROR_NOT_LOCKED, ZIF_LOCK_ERROR_LAST } ZifLockError;
gboolean zif_lock_is_locked (ZifLock *lock
,guint *pid
);
Gets the lock state.
|
A ZifLock |
|
The PID of the process holding the lock, or NULL
|
Returns : |
TRUE if we are already locked |
Since 0.1.0
gboolean zif_lock_set_locked (ZifLock *lock
,guint *pid
,GError **error
);
Tries to lock the packaging system.
|
A ZifLock |
|
A PID of the process holding the lock, or NULL
|
|
A GError, or NULL
|
Returns : |
TRUE if we locked, else FALSE and the error is set |
Since 0.1.0