|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include "TestUtilityServerObserver.h" |
|
17 |
|
18 |
|
19 /** |
|
20 Function : CTestUtilityServerObserver constructor |
|
21 Description : private constructor |
|
22 @internalTechnology |
|
23 @param : none |
|
24 @return : n/a |
|
25 @pre : |
|
26 @post : |
|
27 */ |
|
28 CTestUtilityServerObserver::CTestUtilityServerObserver() |
|
29 { |
|
30 } |
|
31 |
|
32 |
|
33 /** |
|
34 Function : CTestUtilityServerObserver destructor |
|
35 Description : standard destructor |
|
36 @internalTechnology |
|
37 @param : none |
|
38 @return : n/a |
|
39 @pre : |
|
40 @post : |
|
41 */ |
|
42 CTestUtilityServerObserver::~CTestUtilityServerObserver() |
|
43 { |
|
44 } |
|
45 |
|
46 |
|
47 |
|
48 /** |
|
49 Function : NewLC |
|
50 Description : static interface for symbian standard 2 phase constructor, |
|
51 @internalTechnology |
|
52 @param : none |
|
53 @return : CTestUtilityServerObserver pointer or NULL on failure |
|
54 @pre : |
|
55 @post : A CTestUtilityServerObserver* left on cleanup stack |
|
56 */ |
|
57 CTestUtilityServerObserver* CTestUtilityServerObserver::NewLC() |
|
58 { |
|
59 CTestUtilityServerObserver *self = new (ELeave) CTestUtilityServerObserver; |
|
60 CleanupStack::PushL(self); |
|
61 self->ConstructL(); |
|
62 return self; |
|
63 } |
|
64 |
|
65 |
|
66 /** |
|
67 Function : NewL |
|
68 Description : static interface for symbian standard 2 phase constructor, |
|
69 @internalTechnology |
|
70 @param : none |
|
71 @return : CTestUtilityServerObserver pointer or NULL on failure |
|
72 @pre : |
|
73 @post : |
|
74 */ |
|
75 CTestUtilityServerObserver* CTestUtilityServerObserver::NewL() |
|
76 { |
|
77 CTestUtilityServerObserver *self = CTestUtilityServerObserver::NewLC(); |
|
78 CleanupStack::Pop( self ); |
|
79 return self; |
|
80 } |
|
81 |
|
82 |
|
83 /** |
|
84 Function : ConstructL |
|
85 Description : 2nd Part os Symbian 2 phase constructor - contains construction code |
|
86 that may leave. |
|
87 @internalTechnology |
|
88 @param : none |
|
89 @return : void |
|
90 @pre : |
|
91 @post : |
|
92 */ |
|
93 void CTestUtilityServerObserver::ConstructL() |
|
94 { |
|
95 // add any construction code that may leave here |
|
96 |
|
97 } |
|
98 |
|
99 |
|
100 /** |
|
101 Function : HandleSessionEventL |
|
102 Description : Implementation for MMsvSessionObserver interface. The type of event is indicated by the |
|
103 value of aEvent. The interpretation of the TAny arguments depends on this type. For most |
|
104 event types, the action that is taken, for example, updating the display, is |
|
105 client-specific. All clients though should respond to EMsvCloseSession and |
|
106 EMsvServerTerminated events. |
|
107 @internalTechnology |
|
108 @param : TMsvSessionEvent aEvent Indicates the event type. |
|
109 TAny* aArg1 Event type-specific argument value |
|
110 TAny* aArg2 Event type-specific argument value |
|
111 TAny* aArg3 Event type-specific argument value |
|
112 @return : |
|
113 @pre : |
|
114 @post : |
|
115 */ |
|
116 void CTestUtilityServerObserver::HandleSessionEventL( TMsvSessionEvent aEvent |
|
117 , TAny* //aArg1 |
|
118 , TAny* //aArg2 |
|
119 , TAny* //aArg3 |
|
120 ) |
|
121 { |
|
122 switch( aEvent ) |
|
123 { |
|
124 case EMsvCloseSession: |
|
125 // log server closed message her |
|
126 break; |
|
127 case EMsvServerTerminated: |
|
128 // log server terminated message her |
|
129 break; |
|
130 default: |
|
131 break; |
|
132 }; |
|
133 } |
|
134 |