|
1 /* |
|
2 * Copyright (c) 2010 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: Secui Dialog notifier entry point |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "secuidialognotifier.h" // CSecuiDialogNotifier |
|
19 #include <ecom/implementationproxy.h> // TImplementationProxy definition |
|
20 |
|
21 const TInt KNumberOfImplementations = 1; |
|
22 |
|
23 |
|
24 // ---------------------------------------------------------------------------- |
|
25 // CreateNotifiersL() |
|
26 // ---------------------------------------------------------------------------- |
|
27 // |
|
28 void CreateNotifiersL( CArrayPtr<MEikSrvNotifierBase2>& aNotifierArray ) |
|
29 { |
|
30 CSecuiDialogNotifier* notifier = CSecuiDialogNotifier::NewL(); |
|
31 CleanupStack::PushL( notifier ); |
|
32 aNotifierArray.AppendL( notifier ); |
|
33 CleanupStack::Pop( notifier ); |
|
34 } |
|
35 |
|
36 // ---------------------------------------------------------------------------- |
|
37 // NotifierArray() |
|
38 // ---------------------------------------------------------------------------- |
|
39 // |
|
40 CArrayPtr<MEikSrvNotifierBase2>* NotifierArray() |
|
41 { |
|
42 |
|
43 CArrayPtr<MEikSrvNotifierBase2>* notifierArray = |
|
44 new CArrayPtrFlat<MEikSrvNotifierBase2>( KNumberOfImplementations ); |
|
45 if( notifierArray ) |
|
46 { |
|
47 TRAPD( err, CreateNotifiersL( *notifierArray ) ); |
|
48 |
|
49 |
|
50 if( err ) |
|
51 { |
|
52 TInt count = notifierArray->Count(); |
|
53 while( count-- ) |
|
54 { |
|
55 (*notifierArray)[ count ]->Release(); |
|
56 } |
|
57 delete notifierArray; |
|
58 notifierArray = NULL; |
|
59 } |
|
60 } |
|
61 return notifierArray; |
|
62 } |
|
63 |
|
64 // ---------------------------------------------------------------------------- |
|
65 // Provides a key value pair table, that ECOM uses to identify |
|
66 // the correct construction function for the requested interface. |
|
67 // ---------------------------------------------------------------------------- |
|
68 // |
|
69 const TImplementationProxy ImplementationTable[] = |
|
70 { |
|
71 // UID is the implementation uid defined in .rss file |
|
72 IMPLEMENTATION_PROXY_ENTRY( 0x102071FB, NotifierArray ) |
|
73 }; |
|
74 |
|
75 // ---------------------------------------------------------------------------- |
|
76 // Main entry function used to return an instance of the proxy table. |
|
77 // ---------------------------------------------------------------------------- |
|
78 // |
|
79 EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount ) |
|
80 { |
|
81 aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy ); |
|
82 return ImplementationTable; |
|
83 } |