|
1 /* |
|
2 * Copyright (c) 2002 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: MPXViewPlugin testing implementation (mpxviewplugin.h) |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "commontestclass.h" |
|
20 |
|
21 // Begin CMPXViewPlugin testing implementation (mpxviewplugin.h)======================================= |
|
22 // ----------------------------------------------------------------------------- |
|
23 // CCommonTestClass::CreateCMPXViewPlugin() |
|
24 // Returns: Symbian OS errors. |
|
25 // ----------------------------------------------------------------------------- |
|
26 TInt CCommonTestClass::CreateCMPXViewPlugin() |
|
27 { |
|
28 FTRACE(FPrint(_L("CCommonTestClass::CreateCMPXViewPlugin testing CMPXViewPlugin::NewL begin"))); |
|
29 iLog->Log(_L("CCommonTestClass::CreateCMPXViewPlugin testing CMPXViewPlugin::NewL begin")); |
|
30 TInt err = KErrNone; |
|
31 if ( iViewPlugin != NULL) |
|
32 { |
|
33 delete iViewPlugin; |
|
34 } |
|
35 iViewPlugin = NULL; |
|
36 |
|
37 TUid aUid = TUid::Uid(270531770); |
|
38 |
|
39 TRAP(err,iViewPlugin = CMPXViewPlugin::NewL( aUid, this )); |
|
40 if ( iViewPlugin == NULL) |
|
41 { |
|
42 err = KErrNotFound; |
|
43 } |
|
44 |
|
45 FTRACE(FPrint(_L("CCommonTestClass::CreateCMPXViewPlugin testing CMPXViewPlugin::NewL end err=%d"), err)); |
|
46 iLog->Log(_L("CCommonTestClass::CreateCMPXViewPlugin testing CMPXViewPlugin::NewL end err=%d"), err); |
|
47 return err; |
|
48 } |
|
49 |
|
50 // ----------------------------------------------------------------------------- |
|
51 // CCommonTestClass::DeleteCMPXViewPlugin() |
|
52 // Returns: Symbian OS errors. |
|
53 // ----------------------------------------------------------------------------- |
|
54 TInt CCommonTestClass::DeleteCMPXViewPlugin() |
|
55 { |
|
56 FTRACE(FPrint(_L("CCommonTestClass::DeleteCMPXViewPlugin testing CMPXViewPlugin::~ begin"))); |
|
57 iLog->Log(_L("CCommonTestClass::DeleteCMPXViewPlugin testing CMPXViewPlugin::~ begin")); |
|
58 TInt err = KErrNone; |
|
59 if ( iViewPlugin ) |
|
60 { |
|
61 delete iViewPlugin; |
|
62 REComSession::FinalClose(); |
|
63 iViewPlugin = NULL; |
|
64 } |
|
65 FTRACE(FPrint(_L("CCommonTestClass::DeleteCMPXViewPlugin testing CMPXViewPlugin::~ end err=%d"), err)); |
|
66 iLog->Log(_L("CCommonTestClass::DeleteCMPXViewPlugin testing CMPXViewPlugin::~ end err=%d"), err); |
|
67 return err; |
|
68 } |
|
69 |
|
70 |
|
71 // --------------------------------------------------------------------------- |
|
72 // From MMPXCustomCommandObserver. |
|
73 // Handle custom commands. |
|
74 // --------------------------------------------------------------------------- |
|
75 // |
|
76 void CCommonTestClass::HandleCustomCommand( |
|
77 const TUid& /*aUid*/, |
|
78 const TInt /*aCommand*/, |
|
79 const TDesC8& /*aData*/ ) |
|
80 { |
|
81 FTRACE(FPrint(_L("CCommonTestClass::HandleCustomCommand CMPXViewPlugin::HandleCustomCommand is called"))); |
|
82 iLog->Log(_L("CCommonTestClass::HandleCustomCommand CMPXViewPlugin::HandleCustomCommand is called")); |
|
83 } |
|
84 |
|
85 |
|
86 //end of CMPXViewPlugin (mpxviewplugin.h ============================================= |
|
87 |
|
88 |