Update contrib.
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 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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
21 EXPORT_C CMessenger* CMessenger::NewLC(CConsoleBase& aConsole, const TDesC& aString)
23 CMessenger* self=new (ELeave) CMessenger(aConsole);
24 CleanupStack::PushL(self);
25 self->ConstructL(aString);
29 CMessenger::~CMessenger() // destruct - virtual, so no export
34 EXPORT_C void CMessenger::ShowMessage()
36 _LIT(KFormat1,"%S\n");
37 iConsole.Printf(KFormat1, iString); // notify completion
40 // constructor support
41 // don't export these, because used only by functions in this DLL, eg our NewLC()
43 CMessenger::CMessenger(CConsoleBase& aConsole) // first-phase C++ constructor
48 void CMessenger::ConstructL(const TDesC& aString) // second-phase constructor
50 iString=aString.AllocL(); // copy given string into own descriptor
56 MY_MY(int aA){iA = aA;}
58 int get() { return iA;}
64 MY_TYPE(MY_MY& aA){memcpy(&iA, &aA, sizeof(iA));}
66 int get() { return iA;}
72 static MY_TYPE mytype(amymy);