--- a/qtmobility/plugins/contacts/symbiansim/inc/cntsimstoreprivate.h Fri Apr 16 15:51:22 2010 +0300
+++ b/qtmobility/plugins/contacts/symbiansim/inc/cntsimstoreprivate.h Mon May 03 13:18:40 2010 +0300
@@ -1,3 +1,4 @@
+
/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
@@ -51,32 +52,36 @@
#include <qcontact.h>
#include "cntsymbiansimengine.h"
+#include "cntsimstore.h"
QTM_USE_NAMESPACE
class CntSimStore;
class CntSymbianSimEngine;
+class CntSimStoreEventListener;
class CntSimStorePrivate : public CActive
{
public:
enum State {
InactiveState,
- GetInfoState,
ReadState,
WriteState,
- DeleteState
+ DeleteState,
+ ReadReservedSlotsState
};
static CntSimStorePrivate* NewL(CntSymbianSimEngine &engine, CntSimStore &simStore, const QString &storeName);
~CntSimStorePrivate();
QString storeName() { return m_storeName; }
- RMobilePhoneBookStore::TMobilePhoneBookInfoV5 storeInfo() { return m_storeInfo; }
+ TSimStoreInfo storeInfo() { return m_storeInfo; }
- QContactManager::Error getInfo();
- QContactManager::Error read(int index, int numSlots);
- QContactManager::Error write(const QContact &contact);
- QContactManager::Error remove(int index);
+ bool read(int index, int numSlots, QContactManager::Error *error);
+ bool write(const QContact &contact, QContactManager::Error *error);
+ bool remove(int index, QContactManager::Error *error);
+ bool getReservedSlots(QContactManager::Error *error);
+
+ TInt lastAsyncError() { return m_asyncError; }
private:
// from CActive
@@ -89,7 +94,9 @@
void ConstructL();
void convertStoreNameL(TDes &storeName);
QList<QContact> decodeSimContactsL(TDes8& rawData) const;
- QContact encodeSimContactL(const QContact* contact, TDes8& rawData) const;
+ void encodeSimContactL(QContact* contact, TDes8& rawData) const;
+ void putTagAndValueL(CPhoneBookBuffer* pbBuffer, TUint8 tag, QString data) const;
+ QList<int> decodeReservedSlotsL(TDes8& rawData) const;
private:
State m_state;
@@ -100,11 +107,14 @@
RMobilePhone m_etelPhone;
RMobilePhoneBookStore m_etelStore;
QString m_storeName;
- RMobilePhoneBookStore::TMobilePhoneBookInfoV5 m_storeInfo;
- RMobilePhoneBookStore::TMobilePhoneBookInfoV5Pckg m_storeInfoPckg;
+ bool m_readOnlyAccess;
+ TSimStoreInfo m_storeInfo;
+ TSimStoreInfoPckg m_storeInfoPckg;
RBuf8 m_buffer;
QContact m_convertedContact;
int m_writeIndex;
+ CntSimStoreEventListener* m_listener;
+ TInt m_asyncError;
};
#endif // CNTSIMSTOREPRIVATE_H_