vmbx/vmbxengine/inc/vmbxuiutilities.h
changeset 12 ae8abd0db65c
child 19 e44a8c097b15
equal deleted inserted replaced
0:ff3b6d0fd310 12:ae8abd0db65c
       
     1 /*
       
     2 * Copyright (c) 2009 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:  Utility methods for universal usage
       
    15 *  Interface   : Private, CVmbxUiUtilities
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef C_VMBXUIUTILITIES_H
       
    20 #define C_VMBXUIUTILITIES_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <cvoicemailbox.h>
       
    25 
       
    26 #include "mvmbxuiutilities.h"
       
    27 #include "vmbxuihandler.h"
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 
       
    31 
       
    32 // CLASS DECLARATION
       
    33 /**
       
    34 *  Implementation of the auxiliary methods for the VMBX engine classes
       
    35 *
       
    36 *  @lib vmbxengine.lib
       
    37 *  @since S60 v5.2
       
    38 */
       
    39 NONSHARABLE_CLASS( CVmbxUiUtilities ): public CBase,
       
    40                                        public MVmbxUiUtilities
       
    41     {
       
    42 
       
    43 public:
       
    44 
       
    45     /**
       
    46      * Two-phased constructor
       
    47      * @since S60 v5.2
       
    48      */
       
    49     static CVmbxUiUtilities* NewL();
       
    50 
       
    51     /**
       
    52      * Destructor.
       
    53      * @since S60 v5.2
       
    54      */
       
    55     ~CVmbxUiUtilities();
       
    56 
       
    57     /**
       
    58      * Show mailbox query
       
    59      *
       
    60      * @since S60 v5.2
       
    61      * @param in aType TVmbxType type
       
    62      * @param in aMode TVmbxQueryMode mode
       
    63      * @param out aNumber the voice mailbox number
       
    64      */
       
    65     void ShowQueryL( const TVmbxType& aType,
       
    66                     const TVmbxQueryMode& aMode,
       
    67                     TDes& aNumber );
       
    68 
       
    69     /**
       
    70      * Show mailbox query dialog
       
    71      * Leaves if user cancel selected.
       
    72      *
       
    73      * @since S60 v5.2
       
    74      * @param aType in TVmbxType type
       
    75      * @param aMode Tin VmbxQueryMode mode
       
    76      * @param aNumber the voice mailbox number
       
    77      * @param aResult out the result of dialog
       
    78      */
       
    79     void ShowQueryDialogL( const TVmbxType& aType,
       
    80         const TVmbxQueryMode & aMode, TDes& aNumber, TInt& aResult );
       
    81 
       
    82     /**
       
    83      * Show confirmation dialog when save number to phone
       
    84      *
       
    85      * @since S60 v5.2
       
    86      */
       
    87     void ShowSaveToPhoneNote();
       
    88 
       
    89     /**
       
    90      * Show confirmation dialog when save number to SIM
       
    91      *
       
    92      * @since S60 v5.2
       
    93      */
       
    94     void ShowSaveToSimNote();
       
    95 
       
    96     /**
       
    97      * Show confirmation dialog when save video number
       
    98      *
       
    99      * @since S60 v5.2
       
   100      */
       
   101     void ShowVideoSavedNote();
       
   102 
       
   103     /**
       
   104      * Show define number in selection dialog
       
   105      * Leaves if user cancel selected.
       
   106      *
       
   107      * @since S60 v5.2
       
   108      * @param in aType vmbx type
       
   109      * @param out aResult the result of dialog
       
   110      */
       
   111     void ShowDefineSelectionDialogL( TVmbxType& aType, TInt& aResult );
       
   112 
       
   113     /**
       
   114      * Show call number in selection dialog
       
   115      * Leaves if user cancel selected.
       
   116      *
       
   117      * @since S60 v5.2
       
   118      * @param in aArray array of the defined voice mailbox entry
       
   119      * @param in aIcons icons of the defined voice mailbox
       
   120      * @param out aParams the type TVoiceMailboxParams which should include
       
   121      *          the service id and the type of seclected TVmbxType
       
   122      * @param out aResult the result user seclected
       
   123      */
       
   124     void ShowCallSelectionDialogL(
       
   125                 const RPointerArray<CVoiceMailboxEntry>& aArray,
       
   126                 //CArrayPtr<CGulIcon>* aIcons,
       
   127                 TVoiceMailboxParams& aParams, TInt& aResult );
       
   128 
       
   129     /**
       
   130      * Tries to close all open dialogs
       
   131      *
       
   132      * @since S60 v5.2
       
   133      */
       
   134     void DismissDialogL();
       
   135 
       
   136     /**
       
   137      * To get mailbox entry value
       
   138      * Leaves if Symbian OS error code
       
   139      *
       
   140      * @since S60 v5.2
       
   141      * @param aType TVmbxType type
       
   142      */
       
   143     void ShowSaveEmptyNoteL( const TVmbxType& aType );
       
   144 
       
   145     /**
       
   146      * Get Mailbox type default image.
       
   147      * If get unseccessful, Leaves with Symbian OS error code
       
   148      *
       
   149      * @since S60 v5.2
       
   150      * @param aParams Mailbox type for which image is needed.
       
   151      * @return aImage New image. Ownership is transferred.
       
   152      */
       
   153     //CGulIcon* GetVmbxImageL( const TVoiceMailboxParams& aParams );
       
   154 
       
   155     /**
       
   156      * Show error dialog
       
   157      *
       
   158      * @since S60 v5.2
       
   159      */
       
   160     void ShowErrorDialogL();
       
   161 
       
   162     /**
       
   163      * Show invalid or warning dialog
       
   164      *
       
   165      * @since S60 v5.2
       
   166      */
       
   167     void ShowInvalidWarningDialogL();
       
   168 
       
   169 
       
   170 private: // data
       
   171 
       
   172     /**
       
   173      * C++ default constructor.
       
   174      */
       
   175     CVmbxUiUtilities();
       
   176 
       
   177     /**
       
   178      * C++  Two-phased constructor.
       
   179      * @since S60 v5.2
       
   180      */
       
   181     void ConstructL();
       
   182 
       
   183 
       
   184     /**
       
   185     * Open phonebook's Single Fetch Dialog
       
   186     * @since S60 v5.2
       
   187     * @param aPhoneNumber Phone number
       
   188     */
       
   189     void FetchNumberFromPhonebook2L( TDes& aPhoneNumber );
       
   190 
       
   191 private:
       
   192 
       
   193     /**
       
   194      * Ui handler
       
   195      * Own.
       
   196      */
       
   197     CVmbxUiHandler* iUiHandler;
       
   198     };
       
   199 
       
   200 #endif  // C_VMBXUIUTILITIES_H