109 class CntSymbianSimEngine : public QContactManagerEngine |
103 class CntSymbianSimEngine : public QContactManagerEngine |
110 { |
104 { |
111 Q_OBJECT |
105 Q_OBJECT |
112 |
106 |
113 public: |
107 public: |
114 CntSymbianSimEngine(const QMap<QString, QString>& parameters, QContactManager::Error& error); |
108 CntSymbianSimEngine(const QMap<QString, QString>& parameters, QContactManager::Error* error); |
115 CntSymbianSimEngine(const CntSymbianSimEngine &other); |
109 CntSymbianSimEngine(const CntSymbianSimEngine &other); |
116 ~CntSymbianSimEngine(); |
110 ~CntSymbianSimEngine(); |
117 void deref(); |
111 |
118 QString managerName() const; |
112 QString managerName() const; |
119 |
113 |
|
114 QMap<QString, QString> managerParameters() const {return QMap<QString, QString>();} |
|
115 int managerVersion() const { return 1;} |
|
116 |
|
117 /* Defaulted functions - XXX check*/ |
|
118 QContact compatibleContact(const QContact&, QContactManager::Error* error) const {*error = QContactManager::NotSupportedError;return QContact();} |
|
119 bool validateContact(const QContact& contact, QContactManager::Error* error) const {return QContactManagerEngine::validateContact(contact, error);} |
|
120 bool validateDefinition(const QContactDetailDefinition& def, QContactManager::Error* error) const {return QContactManagerEngine::validateDefinition(def, error);} |
|
121 QContactDetailDefinition detailDefinition(const QString& definitionId, const QString& contactType, QContactManager::Error* error) const {return QContactManagerEngine::detailDefinition(definitionId, contactType, error);} |
|
122 bool saveDetailDefinition(const QContactDetailDefinition& def, const QString& contactType, QContactManager::Error* error) {return QContactManagerEngine::saveDetailDefinition(def, contactType, error);} |
|
123 bool removeDetailDefinition(const QString& definitionId, const QString& contactType, QContactManager::Error* error) {return QContactManagerEngine::removeDetailDefinition(definitionId, contactType, error);} |
|
124 QList<QContactRelationship> relationships(const QString& relationshipType, const QContactId& participantId, QContactRelationship::Role role, QContactManager::Error* error) const |
|
125 { |
|
126 return QContactManagerEngine::relationships(relationshipType, participantId, role, error); |
|
127 } |
|
128 bool saveRelationships(QList<QContactRelationship>* relationships, QMap<int, QContactManager::Error>* errorMap, QContactManager::Error* error) |
|
129 { |
|
130 return QContactManagerEngine::saveRelationships(relationships, errorMap, error); |
|
131 } |
|
132 bool removeRelationships(const QList<QContactRelationship>& relationships, QMap<int, QContactManager::Error>* errorMap, QContactManager::Error* error) |
|
133 { |
|
134 return QContactManagerEngine::removeRelationships(relationships, errorMap, error); |
|
135 } |
|
136 bool isRelationshipTypeSupported(const QString&, const QString&) const {return false;} |
|
137 bool isFilterSupported(const QContactFilter&) const {return false;} |
|
138 QList<QVariant::Type> supportedDataTypes() const {return QContactManagerEngine::supportedDataTypes();} |
|
139 bool setSelfContactId(const QContactLocalId& contactId, QContactManager::Error* error) {return QContactManagerEngine::setSelfContactId(contactId, error);} |
|
140 QContactLocalId selfContactId(QContactManager::Error* error) const {return QContactManagerEngine::selfContactId(error);} |
|
141 |
120 /* Contacts - Accessors and Mutators */ |
142 /* Contacts - Accessors and Mutators */ |
121 QList<QContactLocalId> contactIds(const QList<QContactSortOrder>& sortOrders, QContactManager::Error& error) const; |
143 QList<QContactLocalId> contactIds(const QContactFilter& filter, const QList<QContactSortOrder>& sortOrders, QContactManager::Error* error) const; |
122 QList<QContactLocalId> contactIds(const QContactFilter& filter, const QList<QContactSortOrder>& sortOrders, QContactManager::Error& error) const; |
144 QList<QContact> contacts(const QContactFilter& filter, const QList<QContactSortOrder>& sortOrders, const QContactFetchHint& fetchHint, QContactManager::Error* error) const; |
123 QList<QContact> contacts(const QList<QContactSortOrder>& sortOrders, const QStringList& definitionRestrictions, QContactManager::Error& error) const; |
145 QContact contact(const QContactLocalId& contactId, const QContactFetchHint& fetchHint, QContactManager::Error* error) const; |
124 QList<QContact> contacts(const QContactFilter& filter, const QList<QContactSortOrder>& sortOrders, const QStringList& definitionRestrictions, QContactManager::Error& error) const; |
|
125 QContact contact(const QContactLocalId& contactId, const QStringList& definitionRestrictions, QContactManager::Error& error) const; |
|
126 |
146 |
127 bool saveContact(QContact* contact, QContactManager::Error& error); |
147 bool saveContacts(QList<QContact>* contacts, QMap<int, QContactManager::Error>* errorMap, QContactManager::Error* error); |
128 bool saveContacts(QList<QContact>* contacts, QMap<int, QContactManager::Error>* errorMap, QContactManager::Error& error); |
148 bool removeContacts(const QList<QContactLocalId>& contactIds, QMap<int, QContactManager::Error>* errorMap, QContactManager::Error* error); |
129 bool removeContact(const QContactLocalId& contactId, QContactManager::Error& error); |
|
130 bool removeContacts(QList<QContactLocalId>* contactIds, QMap<int, QContactManager::Error>* errorMap, QContactManager::Error& error); |
|
131 |
149 |
132 /* Synthesize the display label of a contact */ |
150 /* Synthesize the display label of a contact */ |
133 QString synthesizedDisplayLabel(const QContact& contact, QContactManager::Error& error) const; |
151 QString synthesizedDisplayLabel(const QContact& contact, QContactManager::Error* error) const; |
134 |
152 |
135 /* Definitions - Accessors and Mutators */ |
153 /* Definitions - Accessors and Mutators */ |
136 QMap<QString, QContactDetailDefinition> detailDefinitions(const QString& contactType, QContactManager::Error& error) const; |
154 QMap<QString, QContactDetailDefinition> detailDefinitions(const QString& contactType, QContactManager::Error* error) const; |
137 |
155 |
138 /* Asynchronous Request Support */ |
156 /* Asynchronous Request Support */ |
139 void requestDestroyed(QContactAbstractRequest* req); |
157 void requestDestroyed(QContactAbstractRequest* req); |
140 bool startRequest(QContactAbstractRequest* req); |
158 bool startRequest(QContactAbstractRequest* req); |
141 bool cancelRequest(QContactAbstractRequest* req); |
159 bool cancelRequest(QContactAbstractRequest* req); |
146 QStringList supportedContactTypes() const; |
164 QStringList supportedContactTypes() const; |
147 |
165 |
148 public: |
166 public: |
149 void updateDisplayLabel(QContact& contact) const; |
167 void updateDisplayLabel(QContact& contact) const; |
150 CntSimStore* simStore() { return d->m_simStore; } |
168 CntSimStore* simStore() { return d->m_simStore; } |
|
169 void setReadOnlyAccessConstraint(QContactDetail* detail) const; |
151 |
170 |
152 private: |
171 private: |
153 bool executeRequest(QContactAbstractRequest *req, QContactManager::Error& qtError) const; |
172 bool executeRequest(QContactAbstractRequest *req, QContactManager::Error* qtError) const; |
154 |
173 |
155 private: |
174 private: |
156 QExplicitlySharedDataPointer<CntSymbianSimEngineData> d; |
175 QExplicitlySharedDataPointer<CntSymbianSimEngineData> d; |
157 }; |
176 }; |
158 |
177 |
159 class Q_DECL_EXPORT CntSymbianSimFactory : public QObject, public QContactManagerEngineFactory |
178 class CntSymbianSimFactory : public QObject, public QContactManagerEngineFactory |
160 { |
179 { |
161 Q_OBJECT |
180 Q_OBJECT |
162 Q_INTERFACES(QtMobility::QContactManagerEngineFactory) |
181 Q_INTERFACES(QtMobility::QContactManagerEngineFactory) |
163 public: |
182 public: |
164 QContactManagerEngine* engine(const QMap<QString, QString>& parameters, QContactManager::Error& error); |
183 QContactManagerEngine* engine(const QMap<QString, QString>& parameters, QContactManager::Error* error); |
165 QString managerName() const; |
184 QString managerName() const; |
166 }; |
185 }; |
167 |
186 |
168 #endif //CNTSYMBIANSIMENGINE_H |
187 #endif //CNTSYMBIANSIMENGINE_H |