ImagePrint/ImagePrintUI/imgpprintdll/inc/imgpprintapputil.h
branchRCL_3
changeset 20 159fc2f68139
parent 17 26673e532f65
child 21 d59c248c9d36
equal deleted inserted replaced
17:26673e532f65 20:159fc2f68139
     1 /*
       
     2 * Copyright (c) 2004-2007 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 #ifndef IMGPPRINTAPPUTIL_H
       
    20 #define IMGPPRINTAPPUTIL_H
       
    21 
       
    22 #include <e32std.h>
       
    23 
       
    24 /**
       
    25  *
       
    26  *  Utility class that contains small static helper methods to group
       
    27  *  the common functionality
       
    28  *
       
    29  */
       
    30 class IMGPPrintAppUtil
       
    31     {
       
    32     public:
       
    33 
       
    34         /**
       
    35          *  Displays error note using given resource id as the text
       
    36          *
       
    37          *  @param aResourceId  Resource ID for the given error text
       
    38          */
       
    39         static void ShowErrorNoteL( TInt aResourceId );            
       
    40 
       
    41         /**
       
    42          *  Displays information note using given resource id as the text
       
    43          *
       
    44          *  @param aResourceId  Resource ID for the given error text
       
    45          */
       
    46         static void ShowInfoNoteL( TInt aResourceId ); 
       
    47         
       
    48         /**
       
    49          *  Displays error note using given error code as the source
       
    50          *  for the text
       
    51          *
       
    52          *  @param aErrCode Error code
       
    53          */
       
    54         static void ShowErrorMsgL( TInt aErrCode, TInt aErrorStringCode = 0 );
       
    55 
       
    56         /**
       
    57          *  Loads error message specifically created for printer application
       
    58          *
       
    59          *  @param aErrCode Error code
       
    60          */
       
    61         static HBufC* PrintErrorMsgLC( TInt aErrCode, TInt aErrorStringCode = 0 );     
       
    62           
       
    63         /**
       
    64          *  Returns filename with the application path
       
    65          *
       
    66          *  @param aFileName  The filename
       
    67          *  @return filename added to the application path
       
    68          */
       
    69         static TFileName AddApplicationPath( const TDesC& aFileName );
       
    70         
       
    71     private:
       
    72     	static void HandleByStringCodeL( TInt aErrCode, TInt aErrorStringCode, TInt& aResourceId );
       
    73     	static void StringCodeInkL( TInt aErrorStringCode, TInt& aResourceId, TBool& aMatch  );
       
    74     	static void StringCodeHwL( TInt aErrorStringCode, TInt& aResourceId, TBool& aMatch  );    	
       
    75     	static void StringCodePaperL( TInt aErrorStringCode, TInt& aResourceId, TBool& aMatch  );
       
    76     	
       
    77     	static void HandleByErrorCodeL( TInt& aResourceId, TInt& aFinalErrCode, TInt aErrCode );    	
       
    78     	static void ErrorCodeInkL( TInt& aResourceId, TInt aErrCode, TBool& aMatch );
       
    79     	static void ErrorCodeHwL( TInt& aResourceId, TInt aErrCode, TBool& aMatch );
       
    80     	static void ErrorCodePaperL( TInt& aResourceId, TInt aErrCode, TBool& aMatch );
       
    81     	
       
    82     };
       
    83 
       
    84 #endif  //  IMGPPRINTAPPUTIL_H
       
    85 
       
    86 //  End of File