1 /* |
|
2 * Copyright (c) 2002-2005 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: Sub Session Notifier. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPHSRVSUBSESSIONNOTIFIER_H |
|
20 #define CPHSRVSUBSESSIONNOTIFIER_H |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include "cphsrvsubsessionbase.h" |
|
26 #include "mphsrvobjectinitiators.h" |
|
27 #include "cphsrvsubsessionnotifier.h" |
|
28 #include "mphsrvcomhandinitiators.h" |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Call Notifier Subsession. |
|
34 * |
|
35 * @since 1.0 |
|
36 */ |
|
37 class CPhSrvSubSessionNotifier : |
|
38 public CPhSrvSubSessionBase, |
|
39 public MPhSrvInitiatorCall, |
|
40 public MPhSrvComHandInitiator |
|
41 { |
|
42 private: |
|
43 |
|
44 |
|
45 public: // Constructors and destructor |
|
46 |
|
47 /** |
|
48 * Constructor |
|
49 * |
|
50 * @param aSession The session where this subsession belongs. |
|
51 */ |
|
52 CPhSrvSubSessionNotifier( CPhSrvSession& aSession ); |
|
53 |
|
54 /** |
|
55 * Destructor |
|
56 */ |
|
57 ~CPhSrvSubSessionNotifier(); |
|
58 |
|
59 /** |
|
60 * Symbian 2nd phase constructor. |
|
61 */ |
|
62 void ConstructL(); |
|
63 |
|
64 |
|
65 private: // Functions from base classes |
|
66 |
|
67 /** |
|
68 * @see MPhSrvMessageDecoder |
|
69 */ |
|
70 TBool PhSrvMessageDecoderCanProcessMessage( TInt aFunction ); |
|
71 |
|
72 /** |
|
73 * @see MPhSrvMessageProcessor |
|
74 */ |
|
75 void PhSrvMessageProcessorHandleMessageL( const RMessage2& aMessage ); |
|
76 |
|
77 /** |
|
78 * Called by the notification manager when the phone app engine should |
|
79 * be informed that it needs to make a call. |
|
80 * |
|
81 * @see MPhSrvInitiatorCall |
|
82 */ |
|
83 void InitiatorMakeAsynchronousCall( const TPhCltCallArgs& aArgs ); |
|
84 |
|
85 /** |
|
86 * Does this subsession have a pending request? |
|
87 * |
|
88 * @see MPhSrvInitiatorCall |
|
89 */ |
|
90 TBool InitiatorIsReadyToMakeCall() const; |
|
91 |
|
92 /** |
|
93 * @see MPhSrvComHandInitiator |
|
94 */ |
|
95 void InitiatorMakeAsynchronousComHandRequest( |
|
96 const TPhCltComHandCommandParameters& |
|
97 aParams ); |
|
98 |
|
99 |
|
100 /** |
|
101 * @see MPhSrvComHandInitiator |
|
102 */ |
|
103 TBool InitiatorIsReadyToPerformRequest() const; |
|
104 |
|
105 private: // SubSession function handlers |
|
106 |
|
107 void CmdSubSessionCloseL( const RMessage2& aMessage ); |
|
108 |
|
109 void CmdSubSessionNotifyCallRequestL( const RMessage2& aMessage ); |
|
110 |
|
111 void CmdSubSessionNotifyCallRequestCancelL( const RMessage2& aMessage ); |
|
112 |
|
113 void CmdSubSessionReportCallResultL( const RMessage2& aMessage ); |
|
114 |
|
115 void CmdSubSessionComHandNotifyRequestL( |
|
116 const RMessage2& aMessage ); |
|
117 |
|
118 void CmdSubSessionComHandNotifyRequestCancelL( |
|
119 const RMessage2& aMessage ); |
|
120 |
|
121 void CmdSubSessionComHandNotifyReportL( |
|
122 const RMessage2& aMessage ); |
|
123 |
|
124 private: // Data |
|
125 |
|
126 // Indicates whether we have an pending request |
|
127 TBool iHavePendingDialRequestPointer; |
|
128 |
|
129 // Initialized when the phone app engine is |
|
130 // ready to handle dial requests. |
|
131 RMessage2 iPendingDialRequestPointer; |
|
132 |
|
133 // Indicates whether we have an pending request |
|
134 TBool iHavePendingComHandRequestPointer; |
|
135 |
|
136 // Initialized when the phone app engine is |
|
137 // ready to handle command handler requests. |
|
138 RMessage2 iPendingComHandRequestPointer; |
|
139 |
|
140 |
|
141 }; |
|
142 |
|
143 #endif // CPHSRVSUBSESSIONNOTIFIER_H |
|
144 |
|
145 |
|
146 // End of File |
|