|
1 // Copyright (c) 1997-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 "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 // source code for the top level of the server-side DLL |
|
15 // $Workfile: DLL.CPP $ |
|
16 // $Revision: 1.5 $ |
|
17 // $Author: chrisd $ |
|
18 // $Date: 14 Dec 1998 11:42:18 $ |
|
19 // |
|
20 // |
|
21 |
|
22 #include "CL_STD.H" |
|
23 |
|
24 // put the uids in the WINS builds |
|
25 |
|
26 // the only exported function in the DLL |
|
27 |
|
28 IMPORT_C CAnimDll* CreateCAnimDllL(); |
|
29 EXPORT_C CAnimDll* CreateCAnimDllL() |
|
30 { |
|
31 return new(ELeave) DClockDll; |
|
32 } |
|
33 |
|
34 // global functions |
|
35 |
|
36 |
|
37 GLDEF_C void Panic(TClockServerPanic aReason) |
|
38 { |
|
39 _LIT(KPanicClockServer,"Clock-server"); |
|
40 User::Panic(KPanicClockServer, aReason); |
|
41 } |
|
42 |
|
43 GLDEF_C void PanicClientFromServer() |
|
44 { |
|
45 User::Leave(KPanicClientFromServer); |
|
46 } |
|
47 |
|
48 // DClockDll |
|
49 |
|
50 DClockDll::DClockDll() |
|
51 { |
|
52 __DECLARE_NAME(_S("DClockDll")); |
|
53 } |
|
54 |
|
55 CAnim* DClockDll::CreateInstanceL(TInt aType) |
|
56 { |
|
57 switch(aType) |
|
58 { |
|
59 case EAnimClock: |
|
60 return new(ELeave) DClock; |
|
61 case EAnimMessageWindow: |
|
62 return new(ELeave) DMessageWindow; |
|
63 default: |
|
64 User::Leave(KErrArgument); |
|
65 return NULL; // dummy return to prevent compiler error |
|
66 } |
|
67 } |
|
68 |