qtmobility/plugins/contacts/symbiansim/inc/cntsimstore.h
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 14 6fbed849b4f4
equal deleted inserted replaced
1:2b40d63a9c3d 4:90517678cc4f
    51 #include <QObject>
    51 #include <QObject>
    52 #include <qcontactmanager.h>
    52 #include <qcontactmanager.h>
    53 
    53 
    54 QTM_USE_NAMESPACE
    54 QTM_USE_NAMESPACE
    55 
    55 
       
    56 #ifdef SYMBIANSIM_BACKEND_PHONEBOOKINFOV1    
       
    57 typedef RMobilePhoneBookStore::TMobilePhoneBookInfoV1 TSimStoreInfo;
       
    58 typedef RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg TSimStoreInfoPckg;
       
    59 #else
       
    60 typedef RMobilePhoneBookStore::TMobilePhoneBookInfoV5 TSimStoreInfo;
       
    61 typedef RMobilePhoneBookStore::TMobilePhoneBookInfoV5Pckg TSimStoreInfoPckg;
       
    62 #endif
       
    63 
    56 class CntSimStorePrivate;
    64 class CntSimStorePrivate;
    57 class CntSymbianSimEngine;
    65 class CntSymbianSimEngine;
    58 
    66 
    59 class CntSimStore : public QObject
    67 class CntSimStore : public QObject
    60 {
    68 {
    61 Q_OBJECT
    69 Q_OBJECT
    62 public:
    70 public:
    63     CntSimStore(CntSymbianSimEngine* engine, QString storeName);
    71     CntSimStore(CntSymbianSimEngine* engine, QString storeName, QContactManager::Error* error);
    64     ~CntSimStore();
    72     ~CntSimStore();
    65     
    73     
    66     QString storeName();
    74     QString storeName();
    67     RMobilePhoneBookStore::TMobilePhoneBookInfoV5 storeInfo();
    75     TSimStoreInfo storeInfo();
    68     
    76     
    69     QContactManager::Error getInfo();
    77     bool read(int index, int numSlots, QContactManager::Error* error);
    70     QContactManager::Error read(int index, int numSlots);
    78     bool write(const QContact &contact, QContactManager::Error* error);
    71     QContactManager::Error write(const QContact &contact);
    79     bool remove(int index, QContactManager::Error* error);
    72     QContactManager::Error remove(int index);
    80     bool getReservedSlots(QContactManager::Error* error);
       
    81     
    73     void cancel();
    82     void cancel();
    74     bool isBusy();
    83     bool isBusy();
       
    84     
       
    85     TInt lastAsyncError();
    75 
    86 
    76 signals:
    87 signals:
    77     // NOTE: Use Qt::QueuedConnection as connection type to make signals asynchronous.
    88     // NOTE: Use Qt::QueuedConnection as connection type to make signals asynchronous.
    78     // CntSimStorePrivate emitting these signals is an active object and emitting
    89     // CntSimStorePrivate emitting these signals is an active object and emitting
    79     // signals synchronously will corrupt the AO state.
    90     // signals synchronously will corrupt the AO state.
    80     void getInfoComplete(RMobilePhoneBookStore::TMobilePhoneBookInfoV5 info, QContactManager::Error error);
       
    81     void readComplete(QList<QContact> contacts, QContactManager::Error error);
    91     void readComplete(QList<QContact> contacts, QContactManager::Error error);
    82     void writeComplete(QContact contacts, QContactManager::Error error);
    92     void writeComplete(QContact contacts, QContactManager::Error error);
    83     void removeComplete(QContactManager::Error error);
    93     void removeComplete(QContactManager::Error error);
       
    94     void getReservedSlotsComplete(QList<int> reservedSlots, QContactManager::Error error);
    84     
    95     
    85 private:
    96 private:
    86     CntSimStorePrivate *d_ptr;
    97     CntSimStorePrivate *d_ptr;
    87     friend class CntSimStorePrivate;    
    98     friend class CntSimStorePrivate;    
    88 };
    99 };
    89 
   100 
    90 
       
    91 #endif // CNTSIMSTORE_H_
   101 #endif // CNTSIMSTORE_H_