sbsv1/buildsystem/test/binaryvariation/InvariantStaticDLL.cpp
author Ross Qin <ross.qin@nokia.com>
Thu, 28 Oct 2010 11:34:42 +0800
changeset 668 fb8810d63524
parent 599 fa7a3cc6effd
permissions -rw-r--r--
remove the emulatorlauncher
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
599
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     1
// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     2
// All rights reserved.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     3
// This component and the accompanying materials are made available
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     5
// which accompanies this distribution, and is available
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     7
//
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     8
// Initial Contributors:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    10
//
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    11
// Contributors:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    12
//
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    13
// Description:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    14
// This program creates a dll.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    15
// 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    16
//
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    17
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    18
#include "InvariantStaticDLL.h"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    19
#include <e32uid.h>
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    20
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    21
// construct/destruct
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    22
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    23
EXPORT_C CInvMessenger* CInvMessenger::NewLC(CConsoleBase& aConsole, const TDesC& aString)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    24
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    25
	CInvMessenger* self=new (ELeave) CInvMessenger(aConsole);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    26
	CleanupStack::PushL(self);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    27
	self->ConstructL(aString);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    28
	return self;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    29
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    30
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    31
CInvMessenger::~CInvMessenger() // destruct - virtual, so no export
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    32
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    33
	delete iString;
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    34
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    35
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    36
// useful functions
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    37
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    38
EXPORT_C void CInvMessenger::ShowMessage()
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    39
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    40
	_LIT(KFormat1,"FEATURE INVARIANT %S\n");
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    41
	iConsole.Printf(KFormat1, iString); // notify completion
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    42
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    43
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    44
// constructor support
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    45
// don't export these, because used only by functions in this DLL, eg our NewLC()
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    46
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    47
CInvMessenger::CInvMessenger(CConsoleBase& aConsole) // first-phase C++ constructor
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    48
	: iConsole(aConsole)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    49
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    50
	}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    51
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    52
void CInvMessenger::ConstructL(const TDesC& aString) // second-phase constructor
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    53
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    54
	iString=aString.AllocL(); // copy given string into own descriptor
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    55
    }
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    56
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    57
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    58
GLDEF_C TInt E32Dll(TInt /*aReason*/)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    59
// DLL entry point
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    60
	{
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    61
	return(KErrNone);
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    62
	}