[dev] Share locking

Alfonso Marí­n Marí­n almarin at um.es
Wed Oct 22 19:59:05 UTC 2008


Hi all,

As a previous step to start with CalDAV implementation, it is necessary 
to implement Kronolith locking capabilities, to have a way to lock 
calendars and/or events. I discussed with Jan an Ben the best way to do 
it and we come to the conclusion that share library would be a nice 
place to implement it to don't duplicate effort, because others 
application could use it.

I have done it and i would like to know your opinion. I attach the 
Horde_Share class modification and the Kronolith's api modification to 
expose locking capabilities to other applications/entities.

Some things to comment:
  - I have implemented the methods in Horde_Share. I had some doubts if 
it would be better in Horde_Share_Object.
  - A lock can be placed for an entire share or for an item_uid 
associated to it.
  - For share locks i use the $_app var as the scope and share_id as the 
principal
  - For item locks, i use the $_app:share_id as the scope and item_uid 
as  the principal. to give to a share a way to know which associated 
items are locked.
  - It is not necessary at all use $_app information, but i thought that 
would be good idea to have that information somewhere in the lock 
information.

Alfonso.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: api.php.patch
Type: text/x-diff
Size: 2259 bytes
Desc: not available
URL: <http://lists.horde.org/archives/dev/attachments/20081022/229d6213/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Share.php.patch
Type: text/x-diff
Size: 6020 bytes
Desc: not available
URL: <http://lists.horde.org/archives/dev/attachments/20081022/229d6213/attachment-0001.bin>


More information about the dev mailing list