|
1 /* |
|
2 * Copyright (c) 2006-2007 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: The session object for DUN server |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "DunServer.h" |
|
20 |
|
21 #ifndef C_CDUNSESSION_H |
|
22 #define C_CDUNSESSION_H |
|
23 |
|
24 /** |
|
25 * Manages separate DUN server sessions for client(s) |
|
26 * |
|
27 * @since S60 v3.2 |
|
28 */ |
|
29 NONSHARABLE_CLASS( CDunSession ) : public CSession2 |
|
30 { |
|
31 |
|
32 public: |
|
33 |
|
34 CDunSession( CDunServer* aDunServer ); |
|
35 |
|
36 /** |
|
37 * Destructor. |
|
38 */ |
|
39 virtual ~CDunSession(); |
|
40 |
|
41 /** |
|
42 * Return the version number |
|
43 * |
|
44 * @since S60 3.2 |
|
45 * @return Version number |
|
46 */ |
|
47 TVersion Version() const; |
|
48 |
|
49 // from base class CSession2 |
|
50 |
|
51 /** |
|
52 * From CSession2. |
|
53 * Handles the servicing of client requests passed to the server |
|
54 * |
|
55 * @since S60 3.2 |
|
56 * @param aMessage Message containing the client request |
|
57 * @return None |
|
58 */ |
|
59 void ServiceL( const RMessage2 &aMessage ); |
|
60 |
|
61 /** |
|
62 * From CSession2. |
|
63 * Return a reference to DUN server |
|
64 * |
|
65 * @since S60 3.2 |
|
66 * @return Server reference |
|
67 */ |
|
68 CDunServer& Server() const; |
|
69 |
|
70 private: |
|
71 |
|
72 /** |
|
73 * Handles incoming service messages |
|
74 * |
|
75 * @since S60 3.2 |
|
76 * @param aMessage Message containing the client request |
|
77 * @return Symbian error code on error, KErrNone otherwise |
|
78 */ |
|
79 TInt DoService( const RMessage2& aMessage ); |
|
80 |
|
81 /** |
|
82 * Handles incoming test service messages |
|
83 * |
|
84 * @since S60 5.0 |
|
85 * @param aMessage Message containing the client request |
|
86 * @return Symbian error code on error, KErrNone otherwise |
|
87 */ |
|
88 TInt DoTestService( const RMessage2& aMessage ); |
|
89 |
|
90 private: // data |
|
91 |
|
92 /** |
|
93 * Message containing the client request |
|
94 */ |
|
95 RMessage2 iMessage; |
|
96 |
|
97 /** |
|
98 * Pointer to DUN server |
|
99 * Not own. |
|
100 */ |
|
101 CDunServer* iDunServer; |
|
102 |
|
103 }; |
|
104 |
|
105 #endif // C_CDUNSESSION_H |