ImagePrint/ImagePrintEngine/DeviceProtocols/btprotocol/inc/rsutils.h
branchRCL_3
changeset 21 d59c248c9d36
parent 0 d11fb78c4374
equal deleted inserted replaced
20:159fc2f68139 21:d59c248c9d36
       
     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 RSUTILS_H
       
    20 #define RSUTILS_H
       
    21 
       
    22 #include <e32std.h>
       
    23 #include <f32file.h>
       
    24 
       
    25 #include "mbtonnotify.h"
       
    26 
       
    27 class CObexBaseObject;
       
    28 
       
    29 /**
       
    30 * \brief Useful utilities
       
    31 *
       
    32 * The RsUtils class contains static utility functions useful to the whole application
       
    33 * such as descriptor manipulations.
       
    34 */
       
    35 class RsUtils
       
    36 	{
       
    37 	public:
       
    38 
       
    39 		static TBool IsBluetoothOn(); // Check comments .cpp file
       
    40 		static HBufC16* MakeXHTMLSafeL(const TDesC16& aString);
       
    41 		static HBufC8* ConvertToUtf8SafeLC(const TDesC16& aUnicode);
       
    42 		static void CleanFileName(const TDesC &aOldFname, TDes& aNewFname);
       
    43 		static void FindWidthHeightForPrinting(TInt &aWidth, TInt &aHeight, const TInt aMaxWidth, const TInt aMaxHeight);
       
    44 		static HBufC8* ConvertFromUnicodeToUtf8LC(const TDesC16& aUnicode); 
       
    45 		static TBool PathIsInRom(const TFileName &aFileName);
       
    46 		static TFileName PathNotRom(const TFileName &aFileName);
       
    47 		static TFileName FileName( const TFileName& aFullName );		
       
    48 		static TBool FileExists(const TDesC& aFileName, RFs& aFs);
       
    49 		static TInt FileSize(const TDesC& aFileName, TInt& aSize, RFs& aFs);				
       
    50 		static TLanguage GetPhoneLanguage();		
       
    51 		static TInt CreateDataFolder( RFs& aSession, TDes& aPath, TDriveNumber aDrive = EDriveC );
       
    52 		static TInt ValidateCacheFile( RFs& aSession, const TDesC& aFileName, 
       
    53 								TTimeIntervalMinutes aValidPeriod, TBool& aDeleted );
       
    54 		static HBufC* ConcatenateStringsLC(const TDesC& aDes1, const TDesC& aDes2);
       
    55 		static HBufC* ConcatenateStringsLC(const TDesC& aDes1, const TDesC& aDes2, const TDesC& aDes3);
       
    56 		static void LogL( const CBufBase& aBuffer );
       
    57 		static void LogL( CObexBaseObject& aBuffer );
       
    58 		static void LogL( const TDesC8& aBuffer );	
       
    59 		static void LogL( const TDesC16& aBuffer );	
       
    60 		static void LogFileL( const TFileName& aName );
       
    61 		static void GetLocalBTNameL(TDes8& aName);
       
    62 	    
       
    63 	};
       
    64 
       
    65 #endif  // RSUTILS_H 
       
    66 
       
    67 //  End of File