![]() |
![]() |
![]() |
ZIF Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#define ZIF_LOCK_ERROR ZifLock; ZifLockPrivate; 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;
GQuark zif_lock_error_quark (void
);
Returns : |
Our personal error quark. |
Since 0.1.0
gboolean zif_lock_is_locked (ZifLock *lock
,guint *pid
);
Gets the lock state.
|
the ZifLock object |
|
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.
|
the ZifLock object |
|
the PID of the process holding the lock, or NULL
|
|
a GError which is used on failure, or NULL
|
Returns : |
TRUE if we locked, else FALSE and the error is set
|
Since 0.1.0