3
|
1 |
/*
|
|
2 |
* Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
* CreateStaticDLL.h*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
#include <e32cons.h>
|
|
24 |
|
|
25 |
extern "C" {
|
|
26 |
|
|
27 |
extern int IMPORT_C myfoo();
|
|
28 |
|
|
29 |
}
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
IMPORT_C int bar();
|
|
34 |
|
|
35 |
class CMessenger : public CBase
|
|
36 |
|
|
37 |
{
|
|
38 |
|
|
39 |
public:
|
|
40 |
|
|
41 |
// Construction
|
|
42 |
|
|
43 |
IMPORT_C static CMessenger* NewLC(CConsoleBase& aConsole, const TDesC& aString);
|
|
44 |
|
|
45 |
// Destructor - virtual and class not intended
|
|
46 |
|
|
47 |
// for derivation, so not exported
|
|
48 |
|
|
49 |
~CMessenger();
|
|
50 |
|
|
51 |
// general functions - exported
|
|
52 |
|
|
53 |
IMPORT_C void ShowMessage();
|
|
54 |
|
|
55 |
private:
|
|
56 |
|
|
57 |
// C++ constructor - not exported;
|
|
58 |
|
|
59 |
// implicitly called from NewLC()
|
|
60 |
|
|
61 |
CMessenger(CConsoleBase& aConsole);
|
|
62 |
|
|
63 |
// 2nd phase construction, called by NewLC()
|
|
64 |
|
|
65 |
void ConstructL(const TDesC& aString); // second-phase constructor
|
|
66 |
|
|
67 |
private:
|
|
68 |
|
|
69 |
CConsoleBase& iConsole; // Use the console (but not owned)
|
|
70 |
|
|
71 |
HBufC* iString; // Allocated container for string data (destructor destroys)
|
|
72 |
|
|
73 |
};
|
|
74 |
|