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
28 29 30 |
# File 'lib/protocol/caldav/storage.rb', line 28 def collection_exists?(path) raise NotImplementedError end |
#create_collection(path, props = {}) ⇒ Object
--- Collections ---
8 9 10 |
# File 'lib/protocol/caldav/storage.rb', line 8 def create_collection(path, props = {}) raise NotImplementedError end |
#delete_collection(path) ⇒ Object
16 17 18 |
# File 'lib/protocol/caldav/storage.rb', line 16 def delete_collection(path) raise NotImplementedError end |
#delete_item(path) ⇒ Object
42 43 44 |
# File 'lib/protocol/caldav/storage.rb', line 42 def delete_item(path) raise NotImplementedError end |
#etag(path) ⇒ Object
64 65 66 |
# File 'lib/protocol/caldav/storage.rb', line 64 def etag(path) raise NotImplementedError end |
#exists?(path) ⇒ Boolean
--- General ---
60 61 62 |
# File 'lib/protocol/caldav/storage.rb', line 60 def exists?(path) raise NotImplementedError end |
#get_collection(path) ⇒ Object
12 13 14 |
# File 'lib/protocol/caldav/storage.rb', line 12 def get_collection(path) raise NotImplementedError end |
#get_item(path) ⇒ Object
--- Items ---
34 35 36 |
# File 'lib/protocol/caldav/storage.rb', line 34 def get_item(path) raise NotImplementedError end |
#get_multi(paths) ⇒ Object
54 55 56 |
# File 'lib/protocol/caldav/storage.rb', line 54 def get_multi(paths) raise NotImplementedError end |
#list_collections(parent_path) ⇒ Object
20 21 22 |
# File 'lib/protocol/caldav/storage.rb', line 20 def list_collections(parent_path) raise NotImplementedError end |
#list_items(collection_path) ⇒ Object
46 47 48 |
# File 'lib/protocol/caldav/storage.rb', line 46 def list_items(collection_path) raise NotImplementedError end |
#move_item(from_path, to_path) ⇒ Object
50 51 52 |
# File 'lib/protocol/caldav/storage.rb', line 50 def move_item(from_path, to_path) raise NotImplementedError end |
#put_item(path, body, content_type) ⇒ Object
38 39 40 |
# File 'lib/protocol/caldav/storage.rb', line 38 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.
72 73 74 |
# File 'lib/protocol/caldav/storage.rb', line 72 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.
79 80 81 |
# File 'lib/protocol/caldav/storage.rb', line 79 def sync_changes(collection_path, token) raise NotImplementedError end |
#update_collection(path, props) ⇒ Object
24 25 26 |
# File 'lib/protocol/caldav/storage.rb', line 24 def update_collection(path, props) raise NotImplementedError end |