cbs/cbsui/UiInc/CbsUiUtility.h
branchRCL_3
changeset 19 7d48bed6ce0c
parent 18 594d59766373
child 20 987c9837762f
equal deleted inserted replaced
18:594d59766373 19:7d48bed6ce0c
     1 /*
       
     2 * Copyright (c) 2002 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 *    Provides different utility functions for CBSUI.
       
    16 *
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef __CBS_UI_CLEANUP_HANDLER_H
       
    22 #define __CBS_UI_CLEANUP_HANDLER_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include    <aknnotedialog.h> // CAknNoteDialog
       
    26 
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class MSaveMessageController;
       
    30 class MCbs;
       
    31 
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 * Offers utility functions for CBSUI.
       
    37 *
       
    38 */
       
    39 class CbsUiUtility
       
    40     {
       
    41 
       
    42     public: // New functions
       
    43         
       
    44         /**
       
    45         * Shows confirmation note with text accordingly to aResourceId.
       
    46         *
       
    47         * @param aResourceId resource id
       
    48         * @param aWaitingDialog if ETrue dialog waits before continues
       
    49         */
       
    50         LOCAL_C void ShowConfirmationNoteL(
       
    51             const TInt aResourceId, TBool aWaitingDialog = EFalse );
       
    52 
       
    53         /**
       
    54         * Shows error note with text accordingly to aResourceId.
       
    55         *
       
    56         * @param aResourceId resource id
       
    57         */
       
    58         LOCAL_C void ShowErrorNoteL( const TInt aResourceId );
       
    59 
       
    60         /**
       
    61         * Shows warning note with text accordingly to aResourceId.
       
    62         *
       
    63         * @param aResourceId resource id
       
    64         */
       
    65         LOCAL_C void ShowWarningNoteL( const TInt aResourceId );
       
    66 
       
    67         /**
       
    68         * Shows a note accordingly to parameters.
       
    69         * 
       
    70         * @param aResource note resource id
       
    71         * @param aTimeout duration
       
    72         * @param aTone sound
       
    73         */
       
    74         LOCAL_C void ShowNoteL( const TInt aResource, 
       
    75                                 const CAknNoteDialog::TTimeout aTimeout,
       
    76                                 const CAknNoteDialog::TTone aTone );
       
    77 
       
    78         /**
       
    79         * Returns a new navigation pane. Remember to delete a memory area!
       
    80         *
       
    81         * @return new empty decorated label
       
    82         */
       
    83         LOCAL_C CAknNavigationDecorator* CreateEmptyNavigationPaneL();
       
    84 
       
    85         /**
       
    86         * Returns ETrue if message is saved
       
    87         *
       
    88         * @param aHandle message to be checked
       
    89         * @param aServer is needed to get information
       
    90         * @return ETrue if current message is saved
       
    91         */
       
    92         LOCAL_C TBool IsSavedL( const TCbsMessageHandle aHandle, MCbs& aServer );
       
    93 
       
    94         /**
       
    95         * Saves the message and shows a error message in case
       
    96         * something went wrong.
       
    97         *
       
    98         * @param aHandle message to be saved
       
    99         * @param aSaver saves the message and shows global error note if needed
       
   100         * @return Error code
       
   101         */
       
   102         LOCAL_C TInt SaveCurrentMessageL(
       
   103             const TCbsMessageHandle aHandle, 
       
   104             MSaveMessageController& aSaver );
       
   105 
       
   106     };
       
   107 
       
   108 #endif      // __CBS_UI_CLEANUP_HANDLER_H
       
   109             
       
   110 // End of File