author | mikaruus <mika.a.ruuskanen@nokia.com> |
Wed, 21 Apr 2010 14:29:55 +0300 | |
changeset 8 | 6295dc2169f3 |
parent 0 | 63b37f68c1ce |
child 9 | 8486d82aef45 |
permissions | -rw-r--r-- |
0 | 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 the License "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 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
||
20 |
#ifndef CMODEMATSESSION_H |
|
21 |
#define CMODEMATSESSION_H |
|
22 |
||
23 |
#include <e32svr.h> |
|
24 |
||
25 |
class CModemAtSrv; |
|
26 |
class RModemAtController; |
|
27 |
||
28 |
// CLASS DECLARATION |
|
29 |
||
30 |
/** |
|
31 |
* CModemAtSession receives and completes client's requests. CModemAtSession forwards |
|
32 |
* requests to the CModemAtSrv. |
|
33 |
*/ |
|
34 |
||
35 |
NONSHARABLE_CLASS( CModemAtSession ) : public CSession2 |
|
36 |
{ |
|
37 |
||
38 |
public: |
|
39 |
||
40 |
/** |
|
41 |
* Two-phased constructor. |
|
42 |
* @param aServer |
|
43 |
* @return Instance of self |
|
44 |
*/ |
|
45 |
static CModemAtSession* NewL( CModemAtSrv& aServer, const TVersion& aVersion ); |
|
46 |
||
47 |
/** |
|
48 |
* Destructor. |
|
49 |
*/ |
|
50 |
~CModemAtSession(); |
|
51 |
||
52 |
/** |
|
53 |
* Called by CModemAtHandler, when Unsolicitated data ind is received |
|
54 |
*/ |
|
55 |
void UnsolicitedData( const TDesC8& aData ); |
|
56 |
||
57 |
/** |
|
58 |
* Called by CModemAtHandler, when signal ind is received |
|
59 |
*/ |
|
60 |
void SignalIndReceived( ); |
|
61 |
||
62 |
/** |
|
63 |
* Returns name of current session |
|
64 |
* @return Session name |
|
65 |
*/ |
|
66 |
TDesC8& GetName(); |
|
67 |
||
68 |
/** |
|
69 |
* Returns plugin type (common/atext) |
|
70 |
* @return Plugintype |
|
71 |
*/ |
|
72 |
TATPluginInterface GetPluginType(); |
|
73 |
||
74 |
/** |
|
75 |
* Modem-Connected-callback. Called when modem is connected. |
|
76 |
* @param aDteId DteId |
|
77 |
* @param aErr Error code |
|
78 |
* @return |
|
79 |
*/ |
|
80 |
void ModemConnected( const TInt aErr ); |
|
81 |
||
82 |
/** |
|
83 |
* CommandModeChanged. Called when pipe handle indicates that mode is changed. |
|
84 |
* @param aMode TCommandMode aMode |
|
85 |
* @return |
|
86 |
*/ |
|
87 |
void CommandModeChanged( TCommandMode aMode ) ; |
|
88 |
||
89 |
/** |
|
90 |
* IsUnsolicitedDataReqActive |
|
91 |
* @return ETrue if request is active, otherwise EFalse |
|
92 |
*/ |
|
93 |
TBool IsUnsolicitedDataReqActive(); |
|
94 |
||
95 |
/** |
|
96 |
* IsSignalIndReqActive |
|
97 |
* @return ETrue if request is active, otherwise EFalse |
|
98 |
*/ |
|
99 |
TBool IsSignalIndReqActive(); |
|
100 |
||
101 |
/** |
|
102 |
* IsCommandModeReqActive |
|
103 |
* @return ETrue if request is active, otherwise EFalse |
|
104 |
*/ |
|
105 |
TBool IsCommandModeReqActive(); |
|
106 |
||
107 |
/** |
|
108 |
* IsConnectReqActive |
|
109 |
* @return ETrue if request is active, otherwise EFalse |
|
110 |
*/ |
|
111 |
TBool IsConnectReqActive(); |
|
112 |
||
113 |
private: |
|
114 |
||
115 |
// from base class CSession2 |
|
116 |
void ServiceL( const RMessage2& aMessage ); |
|
117 |
void DoServiceL( const RMessage2& aMessage ); |
|
118 |
||
119 |
/** |
|
120 |
* Checks if there is existing request and completes it. |
|
121 |
* @param aMessage Message to be checked. |
|
122 |
* @return ETrue if there was request already pending. |
|
123 |
*/ |
|
124 |
TBool CheckAndCompleteExistingRequest( const RMessage2& aMessage ); |
|
125 |
||
126 |
||
127 |
private: |
|
128 |
||
129 |
/** |
|
130 |
* Default C++ constructor. |
|
131 |
* @param aServer Reference to the CModemAtsrv |
|
132 |
* @param aVersion Version of client |
|
133 |
* @param aHandler Reference to the CModemAtHandler |
|
134 |
*/ |
|
135 |
CModemAtSession( CModemAtSrv& aServer, const TVersion& aVersion ); |
|
136 |
||
137 |
// data |
|
138 |
CModemAtSrv& iServer; |
|
139 |
RMessage2 iConnectReq; |
|
140 |
RMessage2 iSignalIndReq; |
|
141 |
RMessage2 iUnsolicitedDataReq; |
|
142 |
RMessage2 iCommandModeReq; |
|
143 |
||
144 |
TVersion iVersion; |
|
145 |
HBufC8* iClientName; |
|
146 |
TATPluginInterface iPluginType; |
|
147 |
TPtr8 iClientNamePtr; |
|
148 |
}; |
|
149 |
||
150 |
#endif // CMODEMATSESSION_H |
|
8
6295dc2169f3
New release based on our 2010wk15 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
151 |
|
6295dc2169f3
New release based on our 2010wk15 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
152 |