equal
deleted
inserted
replaced
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of the License "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 // |
7 // |
8 // Initial Contributors: |
8 // Initial Contributors: |
9 // Nokia Corporation - initial contribution. |
9 // Nokia Corporation - initial contribution. |
11 // Contributors: |
11 // Contributors: |
12 // |
12 // |
13 // Description: |
13 // Description: |
14 // The main startup of the AppArc server |
14 // The main startup of the AppArc server |
15 // |
15 // |
|
16 // apsmain.cpp |
16 // |
17 // |
17 |
18 |
|
19 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
20 #if !defined(__APA_INTERNAL_H__) |
|
21 #include "apainternal.h" |
|
22 #endif |
|
23 #else |
18 #include "APASVST.H" |
24 #include "APASVST.H" |
|
25 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS |
19 |
26 |
20 |
|
21 #ifdef APA_SERVER_IN_THREAD |
|
22 // The server binary is an "EPOCEXE" target type |
|
23 // Thus the server parameter passing and startup code for WINS and EPOC are |
|
24 // significantly different. |
|
25 // |
|
26 // In EKA1 WINS, the EPOCEXE target is a DLL with an entry point called WinsMain, |
|
27 // taking no parameters and returning TInt. This is not really valid as a thread |
|
28 // function which takes a TAny* parameter which we need. |
|
29 // |
|
30 // So the DLL entry-point WinsMain() is used to return a TInt representing the |
|
31 // real thread function within the DLL. This is good as long as |
|
32 // sizeof(TInt)>=sizeof(ApaServThreadStart). |
|
33 // |
|
34 |
|
35 IMPORT_C TInt WinsMain(); |
|
36 EXPORT_C TInt WinsMain() |
|
37 // |
|
38 // WINS DLL entry-point. Just return the real thread function |
|
39 // cast to TInt |
|
40 // |
|
41 { |
|
42 return reinterpret_cast<TInt>(&ApaServThreadStart); |
|
43 } |
|
44 |
|
45 GLDEF_C TInt E32Dll(TDllReason /*aReason*/) |
|
46 // |
|
47 // DLL entry point |
|
48 // |
|
49 { |
|
50 return(KErrNone); |
|
51 } |
|
52 |
|
53 #else |
|
54 |
|
55 TInt E32Main() |
|
56 // |
27 // |
57 // EXE entry point |
28 // EXE entry point |
58 // |
29 // |
|
30 TInt E32Main() |
59 { |
31 { |
60 return ApaServThreadStart(NULL); |
32 return ApaServThreadStart(); |
61 } |
33 } |
62 |
34 |
63 #endif |
|