LockCalendar Method
Obtain a lock for a specified calendar resource.
Syntax
[VB.NET] Public Sub LockCalendar(ByVal ResourceURI As String)
[C#] public void LockCalendar(string resourceURI);
Remarks
This method will request a new lock to be placed on ResourceURI in the user's name so that only the user can operate on it. The method is linked to a number of properties that it uses to generate the lock request:
Owner | The principle that will own the lock. |
Scope | The scope of the lock. The component only currently supports locks of scope "exclusive" and "shared". |
Timeout | The amount of time that the lock is allowed to exist before ResourceURI is automatically unlocked by the server. |
Tokens | The lock itself. If the user sets this before making the request, the timeout on the existing lock will be refreshed (reset to 0). Otherwise, a new set of lock tokens will be returned. |
LockType | The type of lock. The component only currently supports of type "write". |
This method is associated with the Depth property. If Depth is set to "0", the component will lock only ResourceURI and its properties. If Depth is set to "infinity", the component will lock ResourceURI and its entire subtree.
If MoveCalendarEvent or CopyCalendarEvent are used to place a resource or collection in a location under a resource locked with "infinity", the new resource or collection will be added to the lock. Any lock on a collection will prevent non-lock owners from adding resources to that collection.
Note that while the Yahoo CalDAV server does accept LockCalendar and UnLockCalendar requests, the server does not respect resource locks (either on events or on the entire calendar). The Google CalDAV sever does not support either of these requests, and will respond with an HTTP protocol error: 405 Method Not Allowed. Also, neither Yahoo nor Google CalDAV servers support copying or moving calendar resources.