|
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: Template of the Server request handler implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <e32std.h> |
|
22 #include "CPEngRequestHandler.h" |
|
23 |
|
24 // Debug prints |
|
25 #include "PresenceDebugPrint.h" |
|
26 |
|
27 |
|
28 |
|
29 // ============================ MEMBER FUNCTIONS =============================== |
|
30 |
|
31 // ----------------------------------------------------------------------------- |
|
32 // CPEngRequestHandler::CPEngRequestHandler |
|
33 // C++ default constructor can NOT contain any code, that |
|
34 // might leave. |
|
35 // ----------------------------------------------------------------------------- |
|
36 // |
|
37 CPEngRequestHandler::CPEngRequestHandler( |
|
38 TPEngStorageServerMessages aRequestFunction, |
|
39 TUint32 aSessionID, |
|
40 TInt aSubSessionID ) |
|
41 : iSessionID( aSessionID ), |
|
42 iSubSessionID( aSubSessionID ), |
|
43 iRequestFunction( aRequestFunction ) |
|
44 |
|
45 { |
|
46 } |
|
47 |
|
48 // ----------------------------------------------------------------------------- |
|
49 // CPEngRequestHandler::ConstructL |
|
50 // Symbian 2nd phase constructor can leave. |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 void CPEngRequestHandler::ConstructL() |
|
54 { |
|
55 // nothing here, client is listening all events |
|
56 } |
|
57 |
|
58 |
|
59 // Destructor |
|
60 CPEngRequestHandler::~CPEngRequestHandler() |
|
61 { |
|
62 // might be that it left before arra was created |
|
63 iRequestMessage.Complete( KErrCancel ); |
|
64 // base class will delete itself from container of the folder class |
|
65 } |
|
66 |
|
67 |
|
68 // ============================================================================= |
|
69 // ================= new functions from the MPEngRequestHandler ================ |
|
70 // ============================================================================= |
|
71 |
|
72 // ----------------------------------------------------------------------------- |
|
73 // CPEngRequestHandler::SessionId |
|
74 // ----------------------------------------------------------------------------- |
|
75 // |
|
76 TUint32 CPEngRequestHandler::SessionId() const |
|
77 { |
|
78 return iSessionID; |
|
79 } |
|
80 |
|
81 // ----------------------------------------------------------------------------- |
|
82 // CPEngRequestHandler::SubSessionId |
|
83 // ----------------------------------------------------------------------------- |
|
84 // |
|
85 TInt CPEngRequestHandler::SubSessionId() const |
|
86 { |
|
87 return iSubSessionID; |
|
88 } |
|
89 |
|
90 // ----------------------------------------------------------------------------- |
|
91 // CPEngRequestHandler::RequestFunction |
|
92 // ----------------------------------------------------------------------------- |
|
93 // |
|
94 TPEngStorageServerMessages CPEngRequestHandler::RequestFunction() const |
|
95 { |
|
96 return iRequestFunction; |
|
97 } |
|
98 |
|
99 // ----------------------------------------------------------------------------- |
|
100 // CPEngRequestHandler::CancelRequest |
|
101 // ----------------------------------------------------------------------------- |
|
102 // |
|
103 void CPEngRequestHandler::CancelRequestD() |
|
104 { |
|
105 PENG_DP( D_PENG_LIT( "CPEngRequestHandler::CancelRequest" ) ); |
|
106 // In that case nothing much to do, just complete request with KErrCanceled |
|
107 // and remove request from the list of request handlers of the state machine |
|
108 iRequestMessage.Complete( KErrCancel ); |
|
109 // now delet me, destructor will remove class from the list of State machine |
|
110 this->Close(); |
|
111 } |
|
112 |
|
113 // End of File |