|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Definitions header file for CDHCPServer |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 */ |
|
21 |
|
22 #ifndef __DHCPSERVER_H__ |
|
23 #define __DHCPSERVER_H__ |
|
24 |
|
25 #include <e32base.h> |
|
26 #include <e32svr.h> |
|
27 #include <es_sock.h> |
|
28 #include "ExpireTimer.h" |
|
29 #include <cflog.h> |
|
30 |
|
31 class CDHCPSession; |
|
32 #ifdef SYMBIAN_NETWORKING_PLATSEC |
|
33 class CDHCPServer : public CPolicyServer, public MExpireTimer |
|
34 #else |
|
35 class CDHCPServer : public CServer2, public MExpireTimer |
|
36 #endif |
|
37 /** |
|
38 * The CDHCPServer class |
|
39 * |
|
40 * Implements a Symbian OS server side DHCP configuration daemon |
|
41 */ |
|
42 { |
|
43 public: |
|
44 static CDHCPServer* NewL(); |
|
45 ~CDHCPServer(); |
|
46 |
|
47 RSocketServ& ESock(); |
|
48 void SessionConnected() const; |
|
49 void Close(CDHCPSession* aDHCPSession); |
|
50 void TimerExpired(); |
|
51 static TInt& DebugFlags(); |
|
52 protected: |
|
53 CDHCPServer(); |
|
54 void ConstructL(); |
|
55 |
|
56 private: |
|
57 CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const; |
|
58 RSocketServ iEsock; |
|
59 CExpireTimer* iTimer; |
|
60 static TInt iDebugFlags; |
|
61 __CFLOG_DECLARATION_MEMBER; |
|
62 |
|
63 #ifdef SYMBIAN_NETWORKING_PLATSEC |
|
64 static const TUint PolicyRangeCount; |
|
65 static const TInt PolicyRanges[]; |
|
66 static const CPolicyServer::TPolicyElement PolicyElements[]; |
|
67 static const TUint8 PolicyElementsIndex[]; |
|
68 static const CPolicyServer::TPolicy Policy; |
|
69 #endif // SYMBIAN_NETWORKING_PLATSEC |
|
70 }; |
|
71 |
|
72 inline RSocketServ& CDHCPServer::ESock() |
|
73 /** |
|
74 * Returns handle to ESock connection |
|
75 * |
|
76 * @internalTechnology |
|
77 * |
|
78 */ |
|
79 { |
|
80 return iEsock; |
|
81 } |
|
82 |
|
83 #endif |
|
84 |