Class: Protocol::Caldav::Storage
- Inherits:
-
Object
- Object
- Protocol::Caldav::Storage
- Defined in:
- lib/protocol/caldav/storage.rb
Instance Method Summary collapse
- #collection_exists?(path) ⇒ Boolean
-
#create_collection(path, props = {}) ⇒ Object
— Collections —.
- #delete_collection(path) ⇒ Object
- #delete_item(path) ⇒ Object
- #etag(path) ⇒ Object
-
#exists?(path) ⇒ Boolean
— General —.
- #get_collection(path) ⇒ Object
-
#get_item(path) ⇒ Object
— Items —.
- #get_multi(paths) ⇒ Object
- #list_collections(parent_path) ⇒ Object
- #list_items(collection_path) ⇒ Object
- #move_item(from_path, to_path) ⇒ Object
- #put_item(path, body, content_type) ⇒ Object
-
#snapshot_sync(collection_path) ⇒ Object
Snapshot the current item state for a collection and return a sync token.
-
#sync_changes(collection_path, token) ⇒ Object
Return [new_token, changes] where changes is an array of [path, status] status is :modified (200) or :deleted (404).
- #update_collection(path, props) ⇒ Object
Instance Method Details
#collection_exists?(path) ⇒ Boolean
31 32 33 |
# File 'lib/protocol/caldav/storage.rb', line 31 def collection_exists?(path) raise NotImplementedError end |
#create_collection(path, props = {}) ⇒ Object
— Collections —
11 12 13 |
# File 'lib/protocol/caldav/storage.rb', line 11 def create_collection(path, props = {}) raise NotImplementedError end |
#delete_collection(path) ⇒ Object
19 20 21 |
# File 'lib/protocol/caldav/storage.rb', line 19 def delete_collection(path) raise NotImplementedError end |
#delete_item(path) ⇒ Object
45 46 47 |
# File 'lib/protocol/caldav/storage.rb', line 45 def delete_item(path) raise NotImplementedError end |
#etag(path) ⇒ Object
67 68 69 |
# File 'lib/protocol/caldav/storage.rb', line 67 def etag(path) raise NotImplementedError end |
#exists?(path) ⇒ Boolean
— General —
63 64 65 |
# File 'lib/protocol/caldav/storage.rb', line 63 def exists?(path) raise NotImplementedError end |
#get_collection(path) ⇒ Object
15 16 17 |
# File 'lib/protocol/caldav/storage.rb', line 15 def get_collection(path) raise NotImplementedError end |
#get_item(path) ⇒ Object
— Items —
37 38 39 |
# File 'lib/protocol/caldav/storage.rb', line 37 def get_item(path) raise NotImplementedError end |
#get_multi(paths) ⇒ Object
57 58 59 |
# File 'lib/protocol/caldav/storage.rb', line 57 def get_multi(paths) raise NotImplementedError end |
#list_collections(parent_path) ⇒ Object
23 24 25 |
# File 'lib/protocol/caldav/storage.rb', line 23 def list_collections(parent_path) raise NotImplementedError end |
#list_items(collection_path) ⇒ Object
49 50 51 |
# File 'lib/protocol/caldav/storage.rb', line 49 def list_items(collection_path) raise NotImplementedError end |
#move_item(from_path, to_path) ⇒ Object
53 54 55 |
# File 'lib/protocol/caldav/storage.rb', line 53 def move_item(from_path, to_path) raise NotImplementedError end |
#put_item(path, body, content_type) ⇒ Object
41 42 43 |
# File 'lib/protocol/caldav/storage.rb', line 41 def put_item(path, body, content_type) raise NotImplementedError end |
#snapshot_sync(collection_path) ⇒ Object
Snapshot the current item state for a collection and return a sync token. Subsequent calls to sync_changes with this token return the diff.
75 76 77 |
# File 'lib/protocol/caldav/storage.rb', line 75 def snapshot_sync(collection_path) raise NotImplementedError end |
#sync_changes(collection_path, token) ⇒ Object
Return [new_token, changes] where changes is an array of [path, status] status is :modified (200) or :deleted (404). Returns nil if the token is invalid/unknown.
82 83 84 |
# File 'lib/protocol/caldav/storage.rb', line 82 def sync_changes(collection_path, token) raise NotImplementedError end |
#update_collection(path, props) ⇒ Object
27 28 29 |
# File 'lib/protocol/caldav/storage.rb', line 27 def update_collection(path, props) raise NotImplementedError end |