|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * CPDAsyMainService class implementation. |
|
16 * |
|
17 */ |
|
18 |
|
19 // SYSTEM INCLUDES |
|
20 |
|
21 // USER INCLUDES |
|
22 #include "pdengine.h" |
|
23 #include "pdasymainservice.h" |
|
24 #include "trace.h" |
|
25 |
|
26 // ======== MEMBER FUNCTIONS ======== |
|
27 |
|
28 // --------------------------------------------------------------------------- |
|
29 // C++ constructor. |
|
30 // --------------------------------------------------------------------------- |
|
31 // |
|
32 CPDAsyMainService::CPDAsyMainService() |
|
33 { |
|
34 FUNC_LOG; |
|
35 } |
|
36 |
|
37 // --------------------------------------------------------------------------- |
|
38 // Symbian 2nd phase constructor. |
|
39 // --------------------------------------------------------------------------- |
|
40 // |
|
41 void CPDAsyMainService::ConstructL() |
|
42 { |
|
43 FUNC_LOG; |
|
44 } |
|
45 |
|
46 // --------------------------------------------------------------------------- |
|
47 // Symbian two phased constructor. |
|
48 // --------------------------------------------------------------------------- |
|
49 // |
|
50 CPDAsyMainService* CPDAsyMainService::NewL() |
|
51 { |
|
52 FUNC_LOG; |
|
53 |
|
54 CPDAsyMainService* self = CPDAsyMainService::NewLC(); |
|
55 CleanupStack::Pop( self ); |
|
56 return self; |
|
57 } |
|
58 |
|
59 // --------------------------------------------------------------------------- |
|
60 // Symbian two phased constructor. |
|
61 // Leaves pointer in the cleanup stack. |
|
62 // --------------------------------------------------------------------------- |
|
63 // |
|
64 CPDAsyMainService* CPDAsyMainService::NewLC() |
|
65 { |
|
66 FUNC_LOG; |
|
67 |
|
68 CPDAsyMainService* self = new ( ELeave ) CPDAsyMainService; |
|
69 CleanupStack::PushL( self ); |
|
70 self->ConstructL(); |
|
71 return self; |
|
72 } |
|
73 |
|
74 // --------------------------------------------------------------------------- |
|
75 // C++ destructor. |
|
76 // --------------------------------------------------------------------------- |
|
77 // |
|
78 CPDAsyMainService::~CPDAsyMainService() |
|
79 { |
|
80 FUNC_LOG; |
|
81 |
|
82 delete iEngine; |
|
83 } |
|
84 |
|
85 //------------------------------------------------------------------------------ |
|
86 // CPDAsyMainService::Engine |
|
87 //------------------------------------------------------------------------------ |
|
88 // |
|
89 CPDEngine& CPDAsyMainService::Engine() const |
|
90 { |
|
91 FUNC_LOG; |
|
92 |
|
93 return *iEngine; |
|
94 } |
|
95 |
|
96 //------------------------------------------------------------------------------ |
|
97 // CPDAsyMainService::StartL |
|
98 //------------------------------------------------------------------------------ |
|
99 // |
|
100 TInt CPDAsyMainService::StartL() |
|
101 { |
|
102 FUNC_LOG; |
|
103 |
|
104 // Create Plugged Display Engine |
|
105 TRAPD( err, iEngine = CPDEngine::NewL( Session() ) ); |
|
106 if( err != KErrNone ) |
|
107 { |
|
108 ERROR( err, "Failed to load Plugged Display Engine." ); |
|
109 User::Leave( err ); |
|
110 } |
|
111 INFO( "Plugged Display Engine instance created" ); |
|
112 |
|
113 // Plugged Display ASY is ready to receive commands |
|
114 Signal(); |
|
115 |
|
116 return KErrNone; |
|
117 } |
|
118 |
|
119 // End of file |