|
1 /* |
|
2 * Copyright (c) 2009 - 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: 3rd party api testplugin |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <memailobserverlistener.h> |
|
19 #include <memaildata.h> |
|
20 |
|
21 #include "emailtrace.h" |
|
22 #include "t_testpluginimpl.h" |
|
23 #include "emaildataimpl.h" |
|
24 #include "mailboxdataimpl.h" |
|
25 #include "messagedataimpl.h" |
|
26 |
|
27 // --------------------------------------------------------- |
|
28 // --------------------------------------------------------- |
|
29 EmailInterface::CEmailObserverPlugin* CEmailObserverPluginImpl::NewL( |
|
30 EmailInterface::MEmailObserverListener* aListener ) |
|
31 { |
|
32 FUNC_LOG; |
|
33 CEmailObserverPluginImpl* self = new(ELeave) CEmailObserverPluginImpl( aListener ); |
|
34 CleanupStack::PushL( self ); |
|
35 self->ConstructL(); |
|
36 CleanupStack::Pop( self ); |
|
37 return self; |
|
38 } |
|
39 |
|
40 // --------------------------------------------------------- |
|
41 // --------------------------------------------------------- |
|
42 CEmailObserverPluginImpl::~CEmailObserverPluginImpl() |
|
43 { |
|
44 delete iData; |
|
45 } |
|
46 |
|
47 // --------------------------------------------------------- |
|
48 // --------------------------------------------------------- |
|
49 CEmailObserverPluginImpl::CEmailObserverPluginImpl( EmailInterface::MEmailObserverListener* aListener ) : |
|
50 iListener( aListener ), iData( NULL ) |
|
51 { |
|
52 } |
|
53 |
|
54 // --------------------------------------------------------- |
|
55 // --------------------------------------------------------- |
|
56 void CEmailObserverPluginImpl::ConstructL() |
|
57 { |
|
58 iData = CEmailDataImpl::NewL(); |
|
59 } |
|
60 |
|
61 // --------------------------------------------------------- |
|
62 // --------------------------------------------------------- |
|
63 EmailInterface::MEmailData& CEmailObserverPluginImpl::EmailDataL() |
|
64 { |
|
65 FUNC_LOG; |
|
66 return *( static_cast<EmailInterface::MEmailData*>( iData ) ); |
|
67 } |