os/ossrv/lowlevellibsandfws/apputils/test/tef/ssnd/src/baflstub.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2006-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 "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 //
    15 
    16 /**
    17  @file
    18  @internalComponent
    19 */
    20 
    21 #include <e32std.h>
    22 
    23 /** The following 3 function are defined so that the functions IdealLanguage,
    24 SetIdealLanguage, ReleaseIdealLanguage will compile as part as an .exe
    25 These functions use a global TAny* to store the data that would have been
    26 stored in the TLS under normal compilation (ie If the BaUtils was compilled 
    27 as part of a DLL).
    28 */
    29 
    30 #ifndef __DLL__
    31 TAny* ptr(NULL); 
    32 
    33 TAny* Dll::Tls()
    34 	{
    35 	return ptr;	
    36 	}
    37 
    38 TInt Dll::SetTls(TAny* aPtr)
    39 	{
    40 	ptr = aPtr;
    41 	return KErrNone;
    42 	}
    43 	
    44 void Dll::FreeTls()
    45 	{
    46 	ptr = NULL;	
    47 	}
    48 #endif