sl@0: // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @internalTechnology sl@0: */ sl@0: sl@0: #ifndef MSCUTILS_H sl@0: #define MSCUTILS_H sl@0: sl@0: /** sl@0: Inserts and extracts integers in big-endian format. sl@0: */ sl@0: class BigEndian sl@0: { sl@0: public: sl@0: static TUint32 Get32(const TUint8* aPtr); sl@0: static TUint16 Get16(const TUint8* aPtr); sl@0: static void Put32(TUint8* aPtr, TUint32 aVal); sl@0: static void Put16(TUint8* aPtr, TUint16 aVal); sl@0: }; sl@0: sl@0: /** sl@0: Inserts and extracts integers in little-endian format. sl@0: */ sl@0: class LittleEndian sl@0: { sl@0: public: sl@0: static TUint32 Get32(const TUint8* aPtr); sl@0: static TUint16 Get16(const TUint8* aPtr); sl@0: static void Put32(TUint8* aPtr, TUint32 aVal); sl@0: static void Put16(TUint8* aPtr, TUint16 aVal); sl@0: }; sl@0: sl@0: #include "mscutils.inl" sl@0: sl@0: #endif // MSCUTILS_H sl@0: