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