42 |
42 |
43 public: |
43 public: |
44 |
44 |
45 static QSharedPointer<CaService> instance(); |
45 static QSharedPointer<CaService> instance(); |
46 |
46 |
47 CaEntry * getEntry(int entryId) const; |
47 QSharedPointer<CaEntry> getEntry(int entryId) const; |
48 QList<CaEntry *> getEntries(const QList<int> &entryIdList) const; |
48 QList< QSharedPointer<CaEntry> > getEntries(const QList<int> &entryIdList) const; |
49 QList<CaEntry *> getEntries(const CaQuery &query) const; |
49 QList< QSharedPointer<CaEntry> > getEntries(const CaQuery &query) const; |
50 QList<int> getEntryIds(const CaQuery &query) const; |
50 QList<int> getEntryIds(const CaQuery &query) const; |
51 |
51 |
52 CaEntry *createEntry(const CaEntry &entry) const; |
52 QSharedPointer<CaEntry> createEntry(const CaEntry &entry) const; |
53 |
53 |
54 bool removeEntry(int entryId) const; |
54 bool removeEntry(int entryId) const; |
55 bool removeEntry(const CaEntry &entry) const; |
55 bool removeEntry(const CaEntry &entry) const; |
56 bool removeEntries(const QList<int> &entryIdList) const; |
56 bool removeEntries(const QList<int> &entryIdList) const; |
57 bool removeEntries(const QList<CaEntry *> &entryList) const; |
57 bool removeEntries(const QList< QSharedPointer<CaEntry> > &entryList) const; |
58 |
58 |
59 bool updateEntry(const CaEntry &entry) const; |
59 bool updateEntry(const CaEntry &entry) const; |
60 bool touch(const CaEntry &entry) const; |
60 bool touch(const CaEntry &entry) const; |
61 |
61 |
62 bool insertEntryIntoGroup(int groupId, int entryId, |
62 bool insertEntryIntoGroup(int groupId, int entryId, |
64 bool insertEntryIntoGroup(const CaEntry &group, const CaEntry &entry, |
64 bool insertEntryIntoGroup(const CaEntry &group, const CaEntry &entry, |
65 int beforeEntryId) const; |
65 int beforeEntryId) const; |
66 bool insertEntriesIntoGroup(int groupId, const QList<int> &entryIdList, |
66 bool insertEntriesIntoGroup(int groupId, const QList<int> &entryIdList, |
67 int beforeEntryId) const; |
67 int beforeEntryId) const; |
68 bool insertEntriesIntoGroup(const CaEntry &group, |
68 bool insertEntriesIntoGroup(const CaEntry &group, |
69 const QList<CaEntry *> &entryList, int beforeEntryId) const; |
69 const QList< QSharedPointer<CaEntry> > &entryList, int beforeEntryId) const; |
70 |
70 |
71 bool removeEntryFromGroup(int groupId, int entryId) const; |
71 bool removeEntryFromGroup(int groupId, int entryId) const; |
72 bool removeEntryFromGroup(const CaEntry &group, |
72 bool removeEntryFromGroup(const CaEntry &group, |
73 const CaEntry &entry) const; |
73 const CaEntry &entry) const; |
74 bool removeEntriesFromGroup(int groupId, |
74 bool removeEntriesFromGroup(int groupId, |
75 const QList<int> &entryIdList) const; |
75 const QList<int> &entryIdList) const; |
76 bool removeEntriesFromGroup(const CaEntry &group, |
76 bool removeEntriesFromGroup(const CaEntry &group, |
77 const QList<CaEntry *> &entryList) const; |
77 const QList< QSharedPointer<CaEntry> > &entryList) const; |
78 |
78 |
79 bool appendEntryToGroup(int groupId, int entryId) const; |
79 bool appendEntryToGroup(int groupId, int entryId) const; |
80 bool appendEntryToGroup(const CaEntry &group, |
80 bool appendEntryToGroup(const CaEntry &group, |
81 const CaEntry &entry) const; |
81 const CaEntry &entry) const; |
82 bool appendEntriesToGroup(int groupId, |
82 bool appendEntriesToGroup(int groupId, |
83 const QList<int> &entryIdList) const; |
83 const QList<int> &entryIdList) const; |
84 bool appendEntriesToGroup(const CaEntry &group, |
84 bool appendEntriesToGroup(const CaEntry &group, |
85 const QList<CaEntry *> &entryList) const; |
85 const QList< QSharedPointer<CaEntry> > &entryList) const; |
86 |
86 |
87 bool prependEntryToGroup(int groupId, int entryId) const; |
87 bool prependEntryToGroup(int groupId, int entryId) const; |
88 bool prependEntryToGroup(const CaEntry &group, |
88 bool prependEntryToGroup(const CaEntry &group, |
89 const CaEntry &entry) const; |
89 const CaEntry &entry) const; |
90 bool prependEntriesToGroup(int groupId, |
90 bool prependEntriesToGroup(int groupId, |
91 const QList<int> &entryIdList) const; |
91 const QList<int> &entryIdList) const; |
92 bool prependEntriesToGroup(const CaEntry &group, |
92 bool prependEntriesToGroup(const CaEntry &group, |
93 const QList<CaEntry *> &entryList) const; |
93 const QList< QSharedPointer<CaEntry> > &entryList) const; |
94 |
94 |
95 bool executeCommand(int entryId, const QString &command = |
95 bool executeCommand(int entryId, const QString &command = |
96 caCmdOpen) const; |
96 caCmdOpen) const; |
97 bool executeCommand(const CaEntry &entry, const QString &command = |
97 bool executeCommand(const CaEntry &entry, const QString &command = |
98 caCmdOpen) const; |
98 caCmdOpen) const; |