creator/engine/inc/creator_phonebookbase.h
changeset 55 2d9cac8919d3
parent 53 819e59dfc032
child 56 392f7045e621
equal deleted inserted replaced
53:819e59dfc032 55:2d9cac8919d3
     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 
       
    20 
       
    21 #ifndef __CCREATORPHONEBOOKBASE_H_
       
    22 #define __CCREATORPHONEBOOKBASE_H_
       
    23 
       
    24 #include "creator_modulebase.h"
       
    25 
       
    26 static const TInt KPhonebookFieldLength = 128;
       
    27 static const TInt KCreateRandomAmountOfGroups = 1;
       
    28 
       
    29 class CCreatorModuleBaseParameters;
       
    30 
       
    31 class CCreatorPhonebookBase : public CCreatorModuleBase
       
    32 {
       
    33 enum TCreatorPhonebookStatus{
       
    34     ECreatorPhonebookDelete = 0,
       
    35     ECreatorPhonebookStart,
       
    36     ECreatorPhonebookGetContactFields,
       
    37     ECreatorPhonebookGetPhoneNumbersCount,
       
    38     ECreatorPhonebookGetUrlsCount,
       
    39     ECreatorPhonebookGetEmailsCount,
       
    40     ECreatorPhonebookContactsAllFields,
       
    41     ECreatorPhonebookGetGroupFields,
       
    42     ECreatorPhonebookGetContactsInGroup
       
    43 };
       
    44 
       
    45 public:
       
    46 
       
    47     virtual TInt CreateContactEntryL(CCreatorModuleBaseParameters *aParameters) = 0;    
       
    48     virtual TInt CreateGroupEntryL(CCreatorModuleBaseParameters *aParameters) = 0;
       
    49     virtual TInt CreateSubscribedContactEntryL(CCreatorModuleBaseParameters *aParameters) = 0;
       
    50     virtual TBool AskDataFromUserL( TInt aCommand ); // from MCreatorModuleBase
       
    51     virtual void QueryDialogClosedL(TBool aPositiveAction, TInt aUserData); //from MUIObserver
       
    52 
       
    53 //    virtual TBool IsActive() = 0;
       
    54 //    virtual void CancelOperation() = 0;
       
    55     virtual void DeleteAllGroupsL() = 0;
       
    56     virtual void DeleteAllGroupsCreatedByCreatorL() = 0;
       
    57     
       
    58 protected:
       
    59 
       
    60     virtual void SetDefaultParameters();    
       
    61     TInt iNumberOfPhoneNumberFields;
       
    62     TInt iNumberOfURLFields;
       
    63     TInt iNumberOfEmailAddressFields;
       
    64     TInt iContactsInGroup;    
       
    65     TBool iDefaultFieldsSelected;
       
    66     TBool iAddAllFields;
       
    67 };
       
    68 
       
    69 
       
    70 #endif /*__CCREATORPHONEBOOKBASE_H_*/