|
1 /* |
|
2 * Copyright (c) 2005 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 "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: Printing Framework DM Adapter. |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 |
|
20 #include <eikenv.h> |
|
21 #include <implementationproxy.h> |
|
22 |
|
23 #include "DevEncUids.hrh" |
|
24 #include "DevEncPasswdDlg.h" |
|
25 #include "DevEncLog.h" |
|
26 |
|
27 // CONSTANTS |
|
28 |
|
29 |
|
30 |
|
31 // ================= EXPORTED FUNCTIONS ======================================= |
|
32 |
|
33 // ---------------------------------------------------------------------------- |
|
34 // |
|
35 // Instantiate notifiers |
|
36 // |
|
37 // ---------------------------------------------------------------------------- |
|
38 |
|
39 LOCAL_C void CreateNotifiersL( CArrayPtrFlat<MEikSrvNotifierBase2>* aNotifiers ) |
|
40 { |
|
41 CDevEncPasswdDlg* passWdDlg = CDevEncPasswdDlg::NewLC(); |
|
42 aNotifiers->AppendL( passWdDlg ); |
|
43 CleanupStack::Pop( passWdDlg ); |
|
44 } |
|
45 |
|
46 // ---------------------------------------------------------------------------- |
|
47 // |
|
48 // Lib main entry point: Creates a notifiers array. |
|
49 // |
|
50 // ---------------------------------------------------------------------------- |
|
51 |
|
52 EXPORT_C CArrayPtr<MEikSrvNotifierBase2>* NotifierArray() |
|
53 { |
|
54 CArrayPtrFlat<MEikSrvNotifierBase2>* notifiers = NULL; |
|
55 |
|
56 TRAPD( err, notifiers = new (ELeave)CArrayPtrFlat<MEikSrvNotifierBase2>( 1 )); |
|
57 |
|
58 if ( err == KErrNone ) |
|
59 { |
|
60 if( notifiers ) |
|
61 { |
|
62 TRAPD( err, CreateNotifiersL( notifiers )); |
|
63 if( err ) |
|
64 { |
|
65 TInt count = notifiers->Count(); |
|
66 while(count--) |
|
67 { |
|
68 (*notifiers)[count]->Release(); |
|
69 } |
|
70 delete notifiers; |
|
71 notifiers = NULL; |
|
72 } |
|
73 } |
|
74 } |
|
75 else |
|
76 { |
|
77 DFLOG( "NotifierArray: CArrayPtrFlat: error" ); |
|
78 } |
|
79 |
|
80 return notifiers; |
|
81 } |
|
82 |
|
83 // ---------------------------------------------------------------------------- |
|
84 // |
|
85 // DLL entry point |
|
86 // |
|
87 // ---------------------------------------------------------------------------- |
|
88 #ifndef EKA2 |
|
89 GLDEF_C TInt E32Dll( TDllReason /* aReason */) |
|
90 { |
|
91 return( KErrNone ); |
|
92 } |
|
93 #endif |
|
94 |
|
95 // ---------------------------------------------------------------------------- |
|
96 // |
|
97 // ECOM |
|
98 // |
|
99 // ---------------------------------------------------------------------------- |
|
100 |
|
101 const TImplementationProxy ImplementationTable[] = |
|
102 { |
|
103 #ifdef __EABI__ |
|
104 {{KDevEncNotifPluginImplUid},(TFuncPtr)NotifierArray}, |
|
105 #else |
|
106 IMPLEMENTATION_PROXY_ENTRY( KDevEncNotifPluginImplUid, NotifierArray ), |
|
107 #endif |
|
108 }; |
|
109 |
|
110 EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount ) |
|
111 { |
|
112 aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy ); |
|
113 return ImplementationTable; |
|
114 } |
|
115 |
|
116 // End of file |
|
117 |