equal
deleted
inserted
replaced
60 #include <QObject> |
60 #include <QObject> |
61 #include <QString> |
61 #include <QString> |
62 |
62 |
63 QTM_USE_NAMESPACE |
63 QTM_USE_NAMESPACE |
64 |
64 |
|
65 class QThread; |
|
66 class MaliciousThreadObject; |
65 class MaliciousAsyncManagerEngine : public QContactManagerEngine |
67 class MaliciousAsyncManagerEngine : public QContactManagerEngine |
66 { |
68 { |
67 Q_OBJECT |
69 Q_OBJECT |
68 |
70 |
69 public: |
71 public: |
70 MaliciousAsyncManagerEngine(); |
72 MaliciousAsyncManagerEngine(); |
|
73 ~MaliciousAsyncManagerEngine(); |
71 |
74 |
72 QString synthesizedDisplayLabel(const QContact& contact, QContactManager::Error* error) const; |
75 QString synthesizedDisplayLabel(const QContact& contact, QContactManager::Error* error) const; |
73 QString managerName() const; |
76 QString managerName() const; |
74 bool startRequest(QContactAbstractRequest* req); |
77 bool startRequest(QContactAbstractRequest* req); |
75 bool cancelRequest(QContactAbstractRequest *req); |
78 bool cancelRequest(QContactAbstractRequest *req); |
165 { |
168 { |
166 return QContactManagerEngine::removeDetailDefinition(defName, contactType, error); |
169 return QContactManagerEngine::removeDetailDefinition(defName, contactType, error); |
167 } |
170 } |
168 |
171 |
169 /* Asynchronous Request Support */ |
172 /* Asynchronous Request Support */ |
170 void requestDestroyed(QContactAbstractRequest* req) {QContactManagerEngine::requestDestroyed(req);} |
173 void requestDestroyed(QContactAbstractRequest* req); |
171 bool waitForRequestFinished(QContactAbstractRequest* req, int msecs) {return QContactManagerEngine::waitForRequestFinished(req, msecs);} |
174 bool waitForRequestFinished(QContactAbstractRequest* req, int msecs) {return QContactManagerEngine::waitForRequestFinished(req, msecs);} |
172 |
175 |
173 /* Capabilities reporting */ |
176 /* Capabilities reporting */ |
174 bool hasFeature(QContactManager::ManagerFeature feat, const QString& contactType) const |
177 bool hasFeature(QContactManager::ManagerFeature feat, const QString& contactType) const |
175 { |
178 { |
193 QStringList supportedContactTypes() const |
196 QStringList supportedContactTypes() const |
194 { |
197 { |
195 return QContactManagerEngine::supportedContactTypes(); |
198 return QContactManagerEngine::supportedContactTypes(); |
196 } |
199 } |
197 |
200 |
|
201 signals: |
|
202 void doStartRequest(QContactAbstractRequest *req); |
|
203 void doFinishRequest(QContactAbstractRequest *req); |
|
204 private: |
|
205 QThread* thread; |
|
206 MaliciousThreadObject* threadObject; |
198 }; |
207 }; |
199 |
208 |
200 class MaliciousEngineFactory : public QObject, public QContactManagerEngineFactory |
209 class MaliciousEngineFactory : public QObject, public QContactManagerEngineFactory |
201 { |
210 { |
202 Q_OBJECT |
211 Q_OBJECT |