66 { |
66 { |
67 Q_OBJECT |
67 Q_OBJECT |
68 |
68 |
69 public: |
69 public: |
70 MaliciousAsyncManagerEngine(); |
70 MaliciousAsyncManagerEngine(); |
71 void deref(); |
71 |
72 |
72 QString synthesizedDisplayLabel(const QContact& contact, QContactManager::Error* error) const; |
73 QString synthesizedDisplayLabel(const QContact& contact, QContactManager::Error& error) const; |
|
74 QString managerName() const; |
73 QString managerName() const; |
75 bool startRequest(QContactAbstractRequest* req); |
74 bool startRequest(QContactAbstractRequest* req); |
76 bool cancelRequest(QContactAbstractRequest *req); |
75 bool cancelRequest(QContactAbstractRequest *req); |
|
76 |
|
77 QMap<QString, QString> managerParameters() const {return QMap<QString, QString>();} |
|
78 int managerVersion() const {return 0;} |
|
79 |
|
80 QList<QContactLocalId> contactIds(const QContactFilter& filter, const QList<QContactSortOrder>& sort, QContactManager::Error* error) const |
|
81 { |
|
82 return QContactManagerEngine::contactIds(filter, sort, error); |
|
83 } |
|
84 |
|
85 QList<QContact> contacts(const QContactFilter& filter, const QList<QContactSortOrder>& sort, const QContactFetchHint& fetch, QContactManager::Error* error) const |
|
86 { |
|
87 return QContactManagerEngine::contacts(filter, sort, fetch, error); |
|
88 } |
|
89 |
|
90 QContact contact(const QContactLocalId& id, const QContactFetchHint& fetch, QContactManager::Error* error) const |
|
91 { |
|
92 return QContactManagerEngine::contact(id, fetch, error); |
|
93 } |
|
94 |
|
95 bool saveContacts(QList<QContact>* contacts, QMap<int, QContactManager::Error>* errorMap, QContactManager::Error* error) |
|
96 { |
|
97 return QContactManagerEngine::saveContacts(contacts, errorMap, error); |
|
98 } |
|
99 |
|
100 bool removeContacts(const QList<QContactLocalId>& contacts, QMap<int, QContactManager::Error>* errorMap, QContactManager::Error* error) |
|
101 { |
|
102 return QContactManagerEngine::removeContacts(contacts, errorMap, error); |
|
103 } |
|
104 |
|
105 /* "Self" contact id (MyCard) */ |
|
106 bool setSelfContactId(const QContactLocalId& id, QContactManager::Error* error) |
|
107 { |
|
108 return QContactManagerEngine::setSelfContactId(id, error); |
|
109 } |
|
110 |
|
111 QContactLocalId selfContactId(QContactManager::Error* error) const |
|
112 { |
|
113 return QContactManagerEngine::selfContactId(error); |
|
114 } |
|
115 |
|
116 /* Relationships between contacts */ |
|
117 QList<QContactRelationship> relationships(const QString& relType, const QContactId& id, QContactRelationship::Role role, QContactManager::Error* error) const |
|
118 { |
|
119 return QContactManagerEngine::relationships(relType, id, role, error); |
|
120 } |
|
121 |
|
122 bool saveRelationships(QList<QContactRelationship>* relationships, QMap<int, QContactManager::Error>* errorMap, QContactManager::Error* error) |
|
123 { |
|
124 return QContactManagerEngine::saveRelationships(relationships, errorMap, error); |
|
125 } |
|
126 |
|
127 bool removeRelationships(const QList<QContactRelationship>& relationships, QMap<int, QContactManager::Error>* errorMap, QContactManager::Error* error) |
|
128 { |
|
129 return QContactManagerEngine::removeRelationships(relationships, errorMap, error); |
|
130 } |
|
131 |
|
132 /* Validation for saving */ |
|
133 QContact compatibleContact(const QContact& contact, QContactManager::Error* error) const |
|
134 { |
|
135 return QContactManagerEngine::compatibleContact(contact, error); |
|
136 } |
|
137 |
|
138 bool validateContact(const QContact& contact, QContactManager::Error* error) const |
|
139 { |
|
140 return QContactManagerEngine::validateContact(contact, error); |
|
141 } |
|
142 |
|
143 bool validateDefinition(const QContactDetailDefinition& def, QContactManager::Error* error) const |
|
144 { |
|
145 return QContactManagerEngine::validateDefinition(def, error); |
|
146 } |
|
147 |
|
148 /* Definitions - Accessors and Mutators */ |
|
149 QMap<QString, QContactDetailDefinition> detailDefinitions(const QString& contactType, QContactManager::Error* error) const |
|
150 { |
|
151 return QContactManagerEngine::detailDefinitions(contactType, error); |
|
152 } |
|
153 |
|
154 QContactDetailDefinition detailDefinition(const QString& definitionId, const QString& contactType, QContactManager::Error* error) const |
|
155 { |
|
156 return QContactManagerEngine::detailDefinition(definitionId, contactType, error); |
|
157 } |
|
158 |
|
159 bool saveDetailDefinition(const QContactDetailDefinition& def, const QString& contactType, QContactManager::Error* error) |
|
160 { |
|
161 return QContactManagerEngine::saveDetailDefinition(def, contactType, error); |
|
162 } |
|
163 |
|
164 bool removeDetailDefinition(const QString& defName, const QString& contactType, QContactManager::Error* error) |
|
165 { |
|
166 return QContactManagerEngine::removeDetailDefinition(defName, contactType, error); |
|
167 } |
|
168 |
|
169 /* Asynchronous Request Support */ |
|
170 void requestDestroyed(QContactAbstractRequest* req) {QContactManagerEngine::requestDestroyed(req);} |
|
171 bool waitForRequestFinished(QContactAbstractRequest* req, int msecs) {return QContactManagerEngine::waitForRequestFinished(req, msecs);} |
|
172 |
|
173 /* Capabilities reporting */ |
|
174 bool hasFeature(QContactManager::ManagerFeature feat, const QString& contactType) const |
|
175 { |
|
176 return QContactManagerEngine::hasFeature(feat, contactType); |
|
177 } |
|
178 |
|
179 bool isRelationshipTypeSupported(const QString& relType, const QString& ctype) const |
|
180 { |
|
181 return QContactManagerEngine::isRelationshipTypeSupported(relType, ctype); |
|
182 } |
|
183 |
|
184 bool isFilterSupported(const QContactFilter& fil) const |
|
185 { |
|
186 return QContactManagerEngine::isFilterSupported(fil); |
|
187 } |
|
188 |
|
189 QList<QVariant::Type> supportedDataTypes() const |
|
190 { |
|
191 return QContactManagerEngine::supportedDataTypes(); |
|
192 } |
|
193 QStringList supportedContactTypes() const |
|
194 { |
|
195 return QContactManagerEngine::supportedContactTypes(); |
|
196 } |
|
197 |
77 }; |
198 }; |
78 |
199 |
79 class Q_DECL_EXPORT MaliciousEngineFactory : public QObject, public QContactManagerEngineFactory |
200 class Q_DECL_EXPORT MaliciousEngineFactory : public QObject, public QContactManagerEngineFactory |
80 { |
201 { |
81 Q_OBJECT |
202 Q_OBJECT |
82 Q_INTERFACES(QtMobility::QContactManagerEngineFactory) |
203 Q_INTERFACES(QtMobility::QContactManagerEngineFactory) |
83 |
204 |
84 public: |
205 public: |
85 QContactManagerEngine* engine(const QMap<QString, QString>& parameters, QContactManager::Error& error); |
206 QContactManagerEngine* engine(const QMap<QString, QString>& parameters, QContactManager::Error* error); |
86 QString managerName() const; |
207 QString managerName() const; |
87 |
208 |
88 private: |
209 private: |
89 MaliciousAsyncManagerEngine mame; |
210 MaliciousAsyncManagerEngine mame; |
90 }; |
211 }; |