lock_resource_sync


Description:

public bool lock_resource_sync (string? uri, WebDAVLockScope lock_scope, int32 lock_timeout, string? owner, out string out_lock_token, Cancellable? cancellable = null) throws Error

Locks a resource identified by uri, or, in case it's null, by the URI defined in associated Source.

It obtains a write lock with the given lock_scope.

The owner is used to identify the lock owner. When it's an http:// or https://, then it's referenced as DAV:href, otherwise the value is treated as plain text. If it's null, then the user name from the associated Source is used.

The out_lock_token can be refreshed with refresh_lock_sync. Release the lock with unlock_sync. Free the returned out_lock_token with g_free, when no longer needed.

Parameters:

this

an WebDAVSession

uri

URI to lock, or null to read from Source

lock_scope

an WebDAVLockScope to define the scope of the lock

lock_timeout

timeout for the lock, in seconds, on 0 to infinity

owner

optional identificator of the owner of the lock, or null

out_lock_token

return location of the obtained or refreshed lock token

cancellable

optional Cancellable object, or null

Returns:

Whether succeeded.