phonebookui/Phonebook2/remotecontactlookup/contactactionservice/inc/cfscactionutils.h
branchRCL_3
changeset 20 f4a778e096c2
parent 0 e686773b3f54
equal deleted inserted replaced
19:5b6f26637ad3 20:f4a778e096c2
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Declaration of CFscActionUtils.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_FSCACTIONUTILS_H
       
    20 #define C_FSCACTIONUTILS_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include "mfscactionutils.h"
       
    24 #include <RPbkViewResourceFile.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CPbkContactItem;
       
    28 class CRepository;
       
    29 class CRCSEProfileRegistry;
       
    30 class CFscContactAction;
       
    31 class MFscReasonCallback;
       
    32 class CVPbkContactManager;
       
    33 class MVPbkStoreContact;
       
    34 class MVPbkStoreContactField;
       
    35 class CFscAddressSelect;
       
    36 
       
    37 /**
       
    38  *  Action utils.
       
    39  *  Implementation of a action utils.
       
    40  *
       
    41  *  @since S60 3.1
       
    42  */
       
    43 class CFscActionUtils : public CBase, public MFscActionUtils
       
    44     {
       
    45 
       
    46 public:
       
    47     // Constructors and destructor
       
    48 
       
    49     /**
       
    50      * Two-phased constructor.
       
    51      *
       
    52      * @param aContactManager Contact Manager
       
    53      * @return New instance of CFscActionUtils
       
    54      */
       
    55     static CFscActionUtils* NewL( CVPbkContactManager& aContactManager );
       
    56 
       
    57     /**
       
    58      * Two-phased constructor.
       
    59      *
       
    60      * @param aContactManager Contact Manager
       
    61      * @return New instance of CFscActionUtils
       
    62      */
       
    63     static CFscActionUtils* NewLC( CVPbkContactManager& aContactManager );
       
    64 
       
    65     /**
       
    66      * Destructor.
       
    67      */
       
    68     virtual ~CFscActionUtils();
       
    69 
       
    70 public:
       
    71     // From base class MFscActionUtils
       
    72 
       
    73     /**
       
    74      * @see MFscActionUtils::ContactEngine
       
    75      */
       
    76     CVPbkContactManager& ContactManager();
       
    77 
       
    78     /**
       
    79      * @see MFscActionUtils::ShowInfoNoteL
       
    80      */
       
    81     void ShowInfoNoteL( TInt aNote, const HBufC* aContactName );
       
    82 
       
    83     /**
       
    84      * @see MFscActionUtils::ShowInfoNoteL
       
    85      */
       
    86     void ShowInfoNoteL( TInt aNote, TInt aCounter );
       
    87     
       
    88     /**
       
    89      * @see MFscActionUtils::ShowCnfNoteL
       
    90      */
       
    91     void ShowCnfNoteL( TInt aNote, const HBufC* aName );
       
    92         
       
    93     /**
       
    94      * @see MFscActionUtils::ShowNumberMissingDialogL
       
    95      */
       
    96     TInt ShowNumberMissingNoteL( TInt aMissingCount, TInt aTotalCount,
       
    97             TInt aNote, TInt aDialog );
       
    98 
       
    99     /**
       
   100      * @see MFscActionUtils::GetContactNameL
       
   101      */
       
   102     HBufC* GetContactNameL( MVPbkStoreContact& aStoreContact );
       
   103 
       
   104     /**
       
   105      * @see MFscActionUtils::GetVoiceCallNumberL
       
   106      */
       
   107     TInt GetVoiceCallNumberL( MVPbkStoreContact& aStoreContact, 
       
   108             TDes& aNumber );
       
   109 
       
   110     /**
       
   111      * @see MFscActionUtils::GetVideoCallNumberL
       
   112      */
       
   113     TInt GetVideoCallNumberL( MVPbkStoreContact& aStoreContact, 
       
   114             TDes& aNumber );
       
   115 
       
   116     /**
       
   117      * @see MFscActionUtils::GetVoipAddressL
       
   118      */
       
   119     TInt GetVoipAddressL( MVPbkStoreContact& aStoreContact, TDes& aNumber );
       
   120 
       
   121     /**
       
   122      * @see MFscActionUtils::GetConfInfoL
       
   123      */
       
   124     TInt GetConfInfoL( MVPbkStoreContact& aStoreContact, TDes& aConfNum,
       
   125             TDes& aConfId, TDes& aConfPin );
       
   126 
       
   127     /**
       
   128      * @see MFscActionUtils::GetPocAddressL
       
   129      */
       
   130     TInt GetPocAddressL( MVPbkStoreContact& aStoreContact, 
       
   131             TDes& aPocAddress );
       
   132 
       
   133     /**
       
   134      * @see MFscActionUtils::GetMessageAddressL
       
   135      */
       
   136     TInt GetMessageAddressL( MVPbkStoreContact& aStoreContact,
       
   137             TDes& aMsgAddress );
       
   138     
       
   139     /**
       
   140      * @see MFscActionUtils::GetEmailAddressL
       
   141      */
       
   142     TInt GetEmailAddressL( MVPbkStoreContact& aStoreContact,
       
   143             TDes& aEmailAddress );
       
   144 
       
   145     /**
       
   146      * @see MFscActionUtils::RemoveInvalidChar
       
   147      */
       
   148     void RemoveInvalidChar( const TDesC& aNumber, const TDesC& aValidChars,
       
   149             TDes& aOutNumber );
       
   150 
       
   151     /**
       
   152      * @see MFscActionUtils::IsContactNumberAvailableL
       
   153      */
       
   154     TBool IsContactNumberAvailableL( MVPbkStoreContact& aStoreContact,
       
   155             TContactNumberType aContactNumberType );
       
   156 
       
   157     /**
       
   158      * @see MFscActionUtils::Is3GNetworkAvailable
       
   159      */
       
   160     TBool Is3GNetworkAvailable();
       
   161 
       
   162     /**
       
   163      * @see MFscActionUtils::IsOfflineModeL
       
   164      */
       
   165     TBool IsOfflineModeL();
       
   166 
       
   167     /**
       
   168      * @see MFscActionUtils::IsPttConfiguredL
       
   169      */
       
   170     TBool IsPttConfiguredL();
       
   171 
       
   172     /**
       
   173      * @see MFscActionUtils::IsVoipConfiguredL
       
   174      */
       
   175     TBool IsVoipConfiguredL();
       
   176 
       
   177     /**
       
   178      * @see MFscActionUtils::SkinIconL
       
   179      */
       
   180     CGulIcon* SkinIconL( TAknsItemID aItemId, const TDesC& aFilename,
       
   181             TInt aFileBitmapId, TInt aFileMaskId );
       
   182 
       
   183     /**
       
   184      * @see MFscActionUtils::ActionPriorityL
       
   185      */
       
   186     TInt ActionPriority( TUint32 aActionPriorityCrKey, 
       
   187             TInt aDefaultPriority );
       
   188 
       
   189     /**
       
   190      * @see MFscActionUtils::CreateActionL
       
   191      */
       
   192     CFscContactAction* CreateActionL( MFscReasonCallback& aReasonCallback,
       
   193             TUid aContactActionUid, TUint64 aActionType,
       
   194             TInt aActionMenuTextResourceId, CGulIcon* aIcon );
       
   195     
       
   196     /**
       
   197      * Closes selection dialog.
       
   198      */
       
   199     void CloseSelectDialogL();
       
   200     
       
   201 protected:
       
   202     
       
   203     /**
       
   204      * Opens selection dialog.
       
   205      * 
       
   206      * @param aResourceId resource identifying type of select dialog.
       
   207      * @param aStoreContact contact for which dialog is opened.
       
   208      * 
       
   209      * @return selected contact field or NULL if canceled. 
       
   210      */
       
   211     MVPbkStoreContactField* OpenSelectDialogL( TInt aResourceId, 
       
   212             MVPbkStoreContact& aStoreContact );    
       
   213 
       
   214 private:
       
   215     // Private constructors
       
   216 
       
   217     /**
       
   218      * Constructor.
       
   219      *
       
   220      * @param aContactManager Contact Manager
       
   221      */
       
   222     CFscActionUtils( CVPbkContactManager& aContactManager );
       
   223 
       
   224     /**
       
   225      * Second phase constructor.
       
   226      */
       
   227     void ConstructL();
       
   228     
       
   229 private:
       
   230     // Private methods
       
   231 
       
   232     /**
       
   233      * Returns full file path with drive.
       
   234      * 
       
   235      * @param aFilePath path to file with filename
       
   236      */
       
   237     TPtrC GetFileDirL( const TDesC& aFilePath );
       
   238     
       
   239     // Fix for EMZG-7M23KX
       
   240     /**
       
   241      * Find and add resource file to the list maintained by CCoeEnv.
       
   242      * Resource file must be deleted (remove from the list) after usage.
       
   243      * @return The offset value defined for this resource file
       
   244      */
       
   245     TInt FindAndAddResourceFileL();
       
   246 
       
   247 private:
       
   248     // Private members
       
   249 
       
   250     /**
       
   251      * Contact Manager.
       
   252      */
       
   253     CVPbkContactManager& iContactManager;
       
   254 
       
   255     /**
       
   256      * Priority cenrep
       
   257      * Own.
       
   258      */
       
   259     CRepository* iRep;
       
   260 
       
   261     /**
       
   262      * CRCSEProfileRegistry for checking voip status
       
   263      */
       
   264     CRCSEProfileRegistry* iRCSEProfileRegistry;
       
   265     
       
   266     /**
       
   267      * Letter drive.
       
   268      */
       
   269     TFileName iLetterDrive;
       
   270     
       
   271     /**
       
   272      * Phone number/address selection dialog.
       
   273      * Own.
       
   274      */
       
   275     CFscAddressSelect* iAddressSelect;
       
   276     };
       
   277 
       
   278 #endif // C_FSCACTIONUTILS_H