equal
deleted
inserted
replaced
|
1 // Copyright (c) 2000-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 // CreateStaticDLL.h |
|
15 // Statically linked dll example |
|
16 // |
|
17 // |
|
18 |
|
19 |
|
20 #include <e32cons.h> |
|
21 extern "C" { |
|
22 extern int IMPORT_C myfoo(); |
|
23 } |
|
24 |
|
25 IMPORT_C int bar(); |
|
26 class CMessenger : public CBase |
|
27 { |
|
28 public: |
|
29 // Construction |
|
30 IMPORT_C static CMessenger* NewLC(CConsoleBase& aConsole, const TDesC& aString); |
|
31 // Destructor - virtual and class not intended |
|
32 // for derivation, so not exported |
|
33 ~CMessenger(); |
|
34 // general functions - exported |
|
35 IMPORT_C void ShowMessage(); |
|
36 private: |
|
37 // C++ constructor - not exported; |
|
38 // implicitly called from NewLC() |
|
39 CMessenger(CConsoleBase& aConsole); |
|
40 // 2nd phase construction, called by NewLC() |
|
41 void ConstructL(const TDesC& aString); // second-phase constructor |
|
42 private: |
|
43 CConsoleBase& iConsole; // Use the console (but not owned) |
|
44 HBufC* iString; // Allocated container for string data (destructor destroys) |
|
45 }; |