42 #ifndef CNTSIMCONTACTSAVEREQUEST_H_ |
42 #ifndef CNTSIMCONTACTSAVEREQUEST_H_ |
43 #define CNTSIMCONTACTSAVEREQUEST_H_ |
43 #define CNTSIMCONTACTSAVEREQUEST_H_ |
44 |
44 |
45 #include "cntabstractsimrequest.h" |
45 #include "cntabstractsimrequest.h" |
46 |
46 |
47 #ifdef SYMBIANSIM_BACKEND_USE_ETEL_TESTSERVER |
|
48 #include <mpbutil_etel_test_server.h> |
|
49 #else |
|
50 #include <mpbutil.h> |
|
51 #endif |
|
52 #include <qcontactmanager.h> |
|
53 |
|
54 QTM_BEGIN_NAMESPACE |
|
55 class QContactSaveRequest; |
|
56 QTM_END_NAMESPACE |
|
57 class CntSymbianSimEngine; |
|
58 |
|
59 QTM_USE_NAMESPACE |
47 QTM_USE_NAMESPACE |
60 |
48 |
61 class CntSimContactSaveRequest : public CntAbstractSimRequest |
49 class CntSimContactSaveRequest : public CntAbstractSimRequest |
62 { |
50 { |
63 Q_OBJECT |
51 Q_OBJECT |
64 public: |
52 public: |
65 CntSimContactSaveRequest(CntSymbianSimEngine *engine, QContactSaveRequest *req); |
53 CntSimContactSaveRequest(CntSymbianSimEngine *engine, QContactSaveRequest *req); |
66 virtual ~CntSimContactSaveRequest(); |
54 virtual ~CntSimContactSaveRequest(); |
67 bool start(); |
|
68 bool cancel(); |
|
69 |
55 |
70 public Q_SLOTS: |
56 public Q_SLOTS: |
|
57 // from CntAbstractSimRequest |
|
58 void run(); |
|
59 |
|
60 private Q_SLOTS: |
71 void writeComplete(QContact contact, QContactManager::Error error); |
61 void writeComplete(QContact contact, QContactManager::Error error); |
72 void writeNext(); |
62 void writeNext(); |
73 |
63 |
74 private: |
64 private: |
75 QContactSaveRequest *m_req; |
|
76 QList<QContact> m_contacts; |
65 QList<QContact> m_contacts; |
77 int m_index; |
66 int m_index; |
78 QMap<int, QContactManager::Error> m_errorMap; |
67 QMap<int, QContactManager::Error> m_errorMap; |
79 }; |
68 }; |
80 |
69 |