|
1 /* |
|
2 * Copyright (c) 2003-2004 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: Command Handler Request. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPHSRVCOMHANDREQUEST_H |
|
20 #define CPHSRVCOMHANDREQUEST_H |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <PhCltTypes.h> |
|
26 #include <CPhCltCommandHandler.h> |
|
27 |
|
28 // CONSTANTS |
|
29 |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CPhSrvSubSessionBase; |
|
33 |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * Command handler request class. |
|
39 * |
|
40 * @since 2.6 |
|
41 */ |
|
42 class CPhSrvComHandRequest : public CBase |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Constructor. For normal requests, i.e. that are reserved when |
|
48 * they arrive. |
|
49 * |
|
50 * @param aMessage The outstanding client request which will be completed |
|
51 * when the command handler initiation outcome is known. |
|
52 * @param aParams The command handler request arguments. |
|
53 * @param aSubSessionHandle The subsession handle. |
|
54 * @return Pointer to created CPhSrvComHandRequest instance. |
|
55 */ |
|
56 static CPhSrvComHandRequest* NewLC( |
|
57 const RMessage2& aMessage, |
|
58 const TPhCltComHandCommandParameters& aParams, |
|
59 TInt aSubSessionHandle ); |
|
60 |
|
61 /** |
|
62 * Constructor for Emergency request object only. |
|
63 * |
|
64 * @return Pointer to created CPhSrvComHandRequest instance. |
|
65 */ |
|
66 static CPhSrvComHandRequest* NewL(); |
|
67 |
|
68 |
|
69 public: // New functions |
|
70 |
|
71 /** |
|
72 * Tell the external client (the requester) the result of their |
|
73 * actions. This information has come via the notifier |
|
74 * (i.e. phone app engine). |
|
75 * |
|
76 * @param aResultOfAttemptingCall |
|
77 * The result of initiating an earlier command handler request. |
|
78 */ |
|
79 void InformOfComHandRequestAttemptResult( |
|
80 TPhCltPhoneResults aResultOfAttemptingRequest ); |
|
81 |
|
82 /** |
|
83 * Cancel the asynchronous command handler process. |
|
84 * Completes client request with KErrCancel. |
|
85 */ |
|
86 void Cancel(); |
|
87 |
|
88 /** |
|
89 * The sub-session handle. |
|
90 * |
|
91 * @return The unique handle associated with the subsession which |
|
92 * initiated a command handler request. |
|
93 */ |
|
94 TInt SubSessionHandle() const; |
|
95 |
|
96 /** |
|
97 * The parameters for the command handler request. |
|
98 * |
|
99 * @return The command handler request parameters. |
|
100 */ |
|
101 const TPhCltComHandCommandParameters& |
|
102 ComHandParameters() const; |
|
103 |
|
104 /** |
|
105 * Update Emergency request status. |
|
106 * |
|
107 * @param aMessage The outstanding client request which will be completed |
|
108 * when the command handler initiation outcome is known. |
|
109 * @param aArguments The command handler request parameters. |
|
110 * @param aSubSessionHandle Subsession handle to emergency request. |
|
111 */ |
|
112 void UpdateEmergencyRequest( |
|
113 const RMessage2& aMessage, |
|
114 const TPhCltComHandCommandParameters& aParams, |
|
115 TInt aSubSessionHandle ); |
|
116 |
|
117 /** |
|
118 * Clear the Emergency request object data. |
|
119 */ |
|
120 void ClearEmergencyRequest(); |
|
121 |
|
122 |
|
123 private: |
|
124 |
|
125 /** |
|
126 * C++ constructor |
|
127 */ |
|
128 CPhSrvComHandRequest( |
|
129 const RMessage2& aMessage, |
|
130 const TPhCltComHandCommandParameters& aParams, |
|
131 TInt aSubSessionHandle ); |
|
132 |
|
133 /** |
|
134 * C++ constructor |
|
135 */ |
|
136 CPhSrvComHandRequest(); |
|
137 |
|
138 |
|
139 private: // Data |
|
140 |
|
141 // A request made by the external command handler interface that the |
|
142 // phone app should handle. It completes them sequentially after its |
|
143 // finished the previous request. |
|
144 RMessage2 iPendingRequestPointer; |
|
145 |
|
146 // The object responsible for processing external client command |
|
147 // handler requests. |
|
148 // This is essentially an interface to the phone app engine. |
|
149 TPhCltComHandCommandParameters iComHandParams; |
|
150 |
|
151 // A handle to the subsession that initiated this request. |
|
152 TInt iSubSessionHandle; |
|
153 }; |
|
154 |
|
155 |
|
156 #endif // CPHSRVCOMHANDREQUEST_H |
|
157 |
|
158 |
|
159 // End of File |