creator/engine/inc/creator_phonebookapi.h
branchRCL_3
changeset 46 fad26422216a
parent 45 b3cee849fa46
child 49 f8280f3bfeb7
equal deleted inserted replaced
45:b3cee849fa46 46:fad26422216a
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CREATOR_PHONEBOOKAPI_H_
       
    20 #define CREATOR_PHONEBOOKAPI_H_
       
    21 
       
    22 #include <QString>
       
    23 #include <qglobal.h>
       
    24 #include <QTime>
       
    25 #include <qtcontacts.h>
       
    26 QTM_USE_NAMESPACE
       
    27 
       
    28 
       
    29 class CCreatorPhonebookAPI
       
    30     {
       
    31 public:
       
    32     CCreatorPhonebookAPI ();
       
    33     ~CCreatorPhonebookAPI ();
       
    34 
       
    35     quint32 saveContact( const QList<QContactDetail>& list );
       
    36     quint32 createGroup( const QString& groupName );
       
    37     int numberOfContacts();
       
    38     int addContactToGroup( QContactLocalId group, QContactLocalId contact );
       
    39     int addToGroup(QContactLocalId group, int amount);
       
    40     bool deleteAllContacts();
       
    41     bool deleteAllContacts( const QString& type );
       
    42     bool deleteContacts( const QList<QContactLocalId>& list );
       
    43     QContact contact( const QContactLocalId& contactId );
       
    44 
       
    45 private:
       
    46     bool IsContactGroupL( const QContact& contact );
       
    47     
       
    48 private:
       
    49     QContactManager* mContactMngr;
       
    50 
       
    51     };
       
    52 
       
    53 #endif /* CREATOR_PHONEBOOKAPI_H_ */