OpenAB  1.0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CalendarStorage.hpp
Go to the documentation of this file.
1 /*
2  * This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5  */
10 #ifndef CALENDARSTORAGE_H_
11 #define CALENDARSTORAGE_H_
12 
13 #include "Storage.hpp"
15 
19 namespace OpenAB_Storage {
20 
21 //TODO: update documentation
28 class CalendarStorage : public Storage
29 {
30  public:
35 
39  virtual ~CalendarStorage();
40 
42  OpenAB::PIMItem::ID & newId,
43  OpenAB::PIMItem::Revision & revision);
44  enum Storage::eAddItem addItems(const std::vector<OpenAB::SmartPtr<OpenAB::PIMItem> > & items,
45  OpenAB::PIMItem::IDs & newIds,
46  OpenAB::PIMItem::Revisions & revisions);
48  const OpenAB::PIMItem::ID & id,
49  OpenAB::PIMItem::Revision & revision);
51  const OpenAB::PIMItem::IDs & ids,
52  OpenAB::PIMItem::Revisions & revisions);
57 
66  virtual enum Storage::eAddItem addObject( const std::string& iCal,
67  OpenAB::PIMItem::ID& newId,
68  OpenAB::PIMItem::Revision& revision) = 0;
69 
79  virtual enum Storage::eAddItem addObjects( const std::vector<std::string> &iCals,
80  OpenAB::PIMItem::IDs& newIds,
81  OpenAB::PIMItem::Revisions& revisions) = 0;
82 
91  virtual enum Storage::eModifyItem modifyObject ( const std::string& iCal,
92  const OpenAB::PIMItem::ID& id,
93  OpenAB::PIMItem::Revision& revision) = 0;
94 
103  virtual enum Storage::eModifyItem modifyObjects( const std::vector<std::string> &iCals,
104  const OpenAB::PIMItem::IDs& ids,
105  OpenAB::PIMItem::Revisions& revisions) = 0;
112  virtual enum Storage::eRemoveItem removeObject( const OpenAB::PIMItem::ID& id) = 0;
113 
120  virtual enum Storage::eRemoveItem removeObjects( const OpenAB::PIMItem::IDs& ids) = 0;
121 
129  virtual enum Storage::eGetItem getEvent(const OpenAB::PIMItem::ID & id,
131 
139  virtual enum eGetItem getEvents(const OpenAB::PIMItem::IDs & ids,
140  std::vector<OpenAB::SmartPtr<OpenAB::PIMCalendarEventItem> > & items) = 0;
141 
149  virtual enum Storage::eGetItem getTask(const OpenAB::PIMItem::ID & id,
151 
159  virtual enum eGetItem getTasks(const OpenAB::PIMItem::IDs & ids,
160  std::vector<OpenAB::SmartPtr<OpenAB::PIMCalendarTaskItem> > & items) = 0;
161 
162  private:
166  CalendarStorage(CalendarStorage const &other);
167 
171  CalendarStorage& operator=(CalendarStorage const &other);
172 };
173 
174 } // namespace OpenAB_Storage
175 
176 #endif // CALENDARSTORAGE_H_
std::string Revision
Definition: PIMItem.hpp:89
virtual enum eGetItem getTasks(const OpenAB::PIMItem::IDs &ids, std::vector< OpenAB::SmartPtr< OpenAB::PIMCalendarTaskItem > > &items)=0
Get the contacts from the Storage.
virtual enum Storage::eGetItem getEvent(const OpenAB::PIMItem::ID &id, OpenAB::SmartPtr< OpenAB::PIMCalendarEventItem > &item)=0
Get the contact from the Storage.
eModifyItem
Definition: Storage.hpp:164
enum Storage::eModifyItem modifyItem(const OpenAB::SmartPtr< OpenAB::PIMItem > &item, const OpenAB::PIMItem::ID &id, OpenAB::PIMItem::Revision &revision)
Modifies item (OpenAB::PIMItem) in the Storage.
Definition: CalendarStorage.cpp:73
std::vector< OpenAB::PIMItem::Revision > Revisions
Definition: PIMItem.hpp:111
eAddItem
Definition: Storage.hpp:126
Documentation for Storage plugin interface. Generic interface is modeled over Sync Plugin specific re...
Definition: Storage.hpp:106
Documentation for ContactsStorage interface. Provides functionalities specific to Storage of OpenAB::...
Definition: CalendarStorage.hpp:28
virtual enum Storage::eAddItem addObjects(const std::vector< std::string > &iCals, OpenAB::PIMItem::IDs &newIds, OpenAB::PIMItem::Revisions &revisions)=0
Adds new contacts to the ContactsStorage.
virtual enum Storage::eRemoveItem removeObjects(const OpenAB::PIMItem::IDs &ids)=0
Removes contacts from the ContactsStorage.
virtual ~CalendarStorage()
Destructor, virtual by default.
Definition: CalendarStorage.cpp:19
enum Storage::eRemoveItem removeItems(const OpenAB::PIMItem::IDs &ids)
Removes items from the Storage.
Definition: CalendarStorage.cpp:127
std::vector< OpenAB::PIMItem::ID > IDs
Definition: PIMItem.hpp:110
virtual enum Storage::eModifyItem modifyObjects(const std::vector< std::string > &iCals, const OpenAB::PIMItem::IDs &ids, OpenAB::PIMItem::Revisions &revisions)=0
Modifies contacts in the ContactsStorage.
enum Storage::eAddItem addItem(const OpenAB::SmartPtr< OpenAB::PIMItem > &item, OpenAB::PIMItem::ID &newId, OpenAB::PIMItem::Revision &revision)
Adds a new item (OpenAB::PIMItem) to the Storage.
Definition: CalendarStorage.cpp:23
PIMItemType
Definition: PIMItemIndex.hpp:24
eGetItem
Definition: Storage.hpp:226
enum Storage::eRemoveItem removeItem(const OpenAB::PIMItem::ID &id)
Removes item from the Storage.
Definition: CalendarStorage.cpp:122
enum Storage::eGetItem getItems(const OpenAB::PIMItem::IDs &id, std::vector< OpenAB::SmartPtr< OpenAB::PIMItem > > &item)
Get the items from the Storage.
Definition: CalendarStorage.cpp:166
enum Storage::eAddItem addItems(const std::vector< OpenAB::SmartPtr< OpenAB::PIMItem > > &items, OpenAB::PIMItem::IDs &newIds, OpenAB::PIMItem::Revisions &revisions)
Adds new items (OpenAB::PIMItem) to the Storage.
Definition: CalendarStorage.cpp:45
std::string ID
Definition: PIMItem.hpp:64
CalendarStorage(OpenAB::PIMItemType type)
Constructor.
Definition: CalendarStorage.cpp:14
virtual enum Storage::eModifyItem modifyObject(const std::string &iCal, const OpenAB::PIMItem::ID &id, OpenAB::PIMItem::Revision &revision)=0
Modifies contact in the ContactsStorage.
enum Storage::eGetItem getItem(const OpenAB::PIMItem::ID &id, OpenAB::SmartPtr< OpenAB::PIMItem > &item)
Get the item from the Storage.
Definition: CalendarStorage.cpp:132
virtual enum Storage::eAddItem addObject(const std::string &iCal, OpenAB::PIMItem::ID &newId, OpenAB::PIMItem::Revision &revision)=0
Adds a new contact to the ContactsStorage.
virtual enum Storage::eRemoveItem removeObject(const OpenAB::PIMItem::ID &id)=0
Removes contact from the ContactsStorage.
virtual enum eGetItem getEvents(const OpenAB::PIMItem::IDs &ids, std::vector< OpenAB::SmartPtr< OpenAB::PIMCalendarEventItem > > &items)=0
Get the contacts from the Storage.
virtual enum Storage::eGetItem getTask(const OpenAB::PIMItem::ID &id, OpenAB::SmartPtr< OpenAB::PIMCalendarTaskItem > &item)=0
Get the contact from the Storage.
eRemoveItem
Definition: Storage.hpp:201
enum Storage::eModifyItem modifyItems(const std::vector< OpenAB::SmartPtr< OpenAB::PIMItem > > &items, const OpenAB::PIMItem::IDs &ids, OpenAB::PIMItem::Revisions &revisions)
Modifies items (OpenAB::PIMItem) in the Storage.
Definition: CalendarStorage.cpp:95