|
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: MsgNotifiersPlugin implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include <eiknotapi.h> |
|
21 #include <AknNotifyStd.h> |
|
22 |
|
23 #include "MsgConfirmSendNotifier.h" |
|
24 |
|
25 IMPORT_C CArrayPtr<MEikSrvNotifierBase2>* NotifierArray(); |
|
26 |
|
27 void CleanupArray( TAny* aArray ) |
|
28 { |
|
29 CArrayPtrFlat<MEikSrvNotifierBase2>* notifiers = |
|
30 static_cast<CArrayPtrFlat<MEikSrvNotifierBase2>*>( aArray ); |
|
31 notifiers->ResetAndDestroy(); |
|
32 delete notifiers; |
|
33 } |
|
34 |
|
35 CArrayPtr<MEikSrvNotifierBase2>* DoCreateNotifierArrayL() |
|
36 { |
|
37 CArrayPtrFlat<MEikSrvNotifierBase2>* notifiers = |
|
38 new ( ELeave ) CArrayPtrFlat<MEikSrvNotifierBase2>( 1 ); |
|
39 CleanupStack::PushL( TCleanupItem( CleanupArray, notifiers ) ); |
|
40 // SendAs notifier |
|
41 notifiers->AppendL( CMsgConfirmSendNotifier::NewL( ETrue ) ); |
|
42 // SendUi notifier |
|
43 notifiers->AppendL( CMsgConfirmSendNotifier::NewL( EFalse ) ); |
|
44 CleanupStack::Pop(); // array cleanup |
|
45 return( notifiers ); |
|
46 } |
|
47 |
|
48 // |
|
49 // Lib main entry point |
|
50 // |
|
51 EXPORT_C CArrayPtr<MEikSrvNotifierBase2>* NotifierArray() |
|
52 { |
|
53 CArrayPtr<MEikSrvNotifierBase2>* notifiers = NULL; |
|
54 TRAP_IGNORE( notifiers = DoCreateNotifierArrayL() ); |
|
55 return( notifiers ); |
|
56 } |