os/kernelhwsrv/kernel/eka/include/e32wins.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // e32\include\e32wins.h
    15 // 
    16 // WARNING: This file contains some APIs which are internal and are subject
    17 //          to change without notice. Such APIs should therefore not be used
    18 //          outside the Kernel and Hardware Services package.
    19 //
    20 
    21 #ifndef __E32WINS_H__
    22 #define __E32WINS_H__
    23 
    24 /** @file
    25 	@internalTechnology
    26 */
    27 
    28 #include <u32std.h>
    29 #include <e32svr.h>
    30 #include <winsdef.h>
    31 
    32 #define MAX_PATH          260
    33 
    34 IMPORT_C void BootEpoc(TBool aAutoRun);
    35 
    36 inline TInt MapEmulatedFileName(TDes& aBuffer, const TDesC& aFilename)
    37 	{
    38 	TPtr8 ptrBuffer((TUint8*)aBuffer.Ptr(),aBuffer.MaxLength()<<1);
    39 	TPtrC8 ptrFilename((TUint8*)aFilename.Ptr(), aFilename.Size());
    40 	TInt r = UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalMapFilename,(TAny*)&ptrFilename,&ptrBuffer);
    41 	aBuffer.SetLength(ptrBuffer.Length()>>1);
    42 	return r;
    43 	}
    44 
    45 inline TInt EmulatorFlip(TEmulatorFlip aFlip)
    46 	{return UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalSetFlip,(TAny*)aFlip,0);}
    47 
    48 inline TInt EmulatorFlip(TEmulatorFlip aFlip, TInt aScreenNo)
    49 	{return UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalSetFlip,(TAny*)aFlip,(TAny*)aScreenNo);}
    50 
    51 inline void EmulatorColorDepth(TUint& aDepths)
    52 	{UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalColorDepth,(TAny*)&aDepths,0);}
    53 
    54 inline void EmulatorColorDepth(TUint& aDepths, TInt aScreenNo)
    55 	{UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalColorDepth,(TAny*)&aDepths,(TAny*)aScreenNo);}
    56 
    57 inline void EmulatorDiskSpeed(TInt& aReadSpeed, TInt& aWriteSpeed)
    58 	{
    59 	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalIntProperty,(TAny*)"DiskRead",&aReadSpeed);
    60 	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalIntProperty,(TAny*)"DiskWrite",&aWriteSpeed);
    61 	}
    62 
    63 inline TBool EmulatorTextShell()
    64 	{
    65 	TBool val = EFalse;
    66 	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalBoolProperty,(TAny*)"TextShell",&val);
    67 	return val;
    68 	}
    69 
    70 inline TBool EmulatorNoGui()
    71 	{
    72 	TBool val = EFalse;
    73 	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalBoolProperty,(TAny*)"NoGui",&val);
    74 	return val;
    75 	}
    76 
    77 inline TBool EmulatorMiniGui()
    78 	{
    79 	TBool minigui = EFalse;
    80 	TInt startupmode = 0;
    81 	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalBoolProperty,(TAny*)"MiniGui",&minigui);
    82 	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalIntProperty,(TAny*)"StartupMode",&startupmode);
    83 	return minigui || startupmode == 8;
    84 	}
    85 
    86 inline const char* EmulatorAutoRun()
    87 	{
    88 	const char* val = NULL;
    89 	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalStringProperty,(TAny*)"AutoRun",&val);
    90 	return val;
    91 	}
    92 
    93 inline const char* EmulatorCommandLine()
    94 	{
    95 	const char* val = NULL;
    96 	UserSvr::HalFunction(EHalGroupEmulator,EEmulatorHalStringProperty,(TAny*)"CommandLine",&val);
    97 	return val;
    98 	}
    99 
   100 #endif
   101