|
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 // The DHCP IPv4 Control header file |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file DHCPIP4Control.h |
|
20 */ |
|
21 |
|
22 #ifndef __DHCPIP4CONTROL_H__ |
|
23 #define __DHCPIP4CONTROL_H__ |
|
24 |
|
25 #include <e32base.h> |
|
26 #include "DHCPControl.h" |
|
27 #include "DHCPIP4StateMachine.h" |
|
28 |
|
29 class RSocketServ; |
|
30 class CDHCPIP4Control : public CDHCPControl |
|
31 /** |
|
32 * Implements the DHCP IP4 control plain |
|
33 * class owns DHCP IP4 state machine (CDHCPIP4StateMachine) |
|
34 * |
|
35 * @internalTechnology |
|
36 * |
|
37 */ |
|
38 { |
|
39 public: |
|
40 CDHCPIP4Control(RSocketServ& aEsock, TConfigType aConfigType); |
|
41 virtual ~CDHCPIP4Control(); |
|
42 |
|
43 virtual void ConfigureL(const TConnectionInfo& aInfo, const RMessage2* aMessage); |
|
44 virtual void Cancel(); |
|
45 virtual void TimerExpired(); //timer callback |
|
46 |
|
47 virtual TInt HandleClientRequestL(TUint aName); |
|
48 virtual TInt HandleClientRequestL(TUint aName, TInt aValue); |
|
49 |
|
50 virtual void TaskCompleteL( TInt aError ); |
|
51 |
|
52 virtual void LinkLocalCreated(); |
|
53 |
|
54 protected: |
|
55 CDHCPIP4StateMachine* DhcpStateMachine(); |
|
56 virtual void HandleGetRawOptionDataL(TDes8* aDes); |
|
57 virtual void HandleGetSipServerAddrL(TDes8* aDes); |
|
58 virtual void HandleGetSipServerDomainL(TDes8* aDes); |
|
59 void GetRawOptionDataL(TUint aOpCode, TPtr8& aPtr ); |
|
60 virtual void BindingFinishedL(); |
|
61 virtual TBool ShouldInformAfterFailedInit(void); |
|
62 #ifdef SYMBIAN_NETWORKING_DHCPSERVER |
|
63 virtual void HandleSetRawOptionCodeL(TDes8* aDes); |
|
64 void GetRawOptionDataFromDNSBufL(TPtr8& aPtr); |
|
65 void SetRawOptionCodeL(TDes8* aDes); |
|
66 #endif // SYMBIAN_NETWORKING_DHCPSERVER |
|
67 #ifdef SYMBIAN_NETWORKING_DHCP_MSG_HEADERS |
|
68 virtual void HandleGetTftpServerAddrL(TDes8& aDes) ; |
|
69 virtual void HandleGetTftpServerNameL(TDes8& aDes) ; |
|
70 virtual void HandleGetMultipleParamsL(TDes8& aReqList); |
|
71 virtual TInt InformCompleteRequestHandlerL(); |
|
72 void RequestInformOrCompleteCallL(TPtr8& aOpcode); |
|
73 virtual void GetDhcpHdrSiaddrL(TDes8& aNxtAddress); |
|
74 virtual void GetDhcpHdrSnameL(TDes8& aHdrSvrName); |
|
75 #endif // SYMBIAN_NETWORKING_DHCP_MSG_HEADERS |
|
76 |
|
77 private: |
|
78 |
|
79 TBool iStaticAddress; |
|
80 TBool iClientShouldCompleteWhenLinkLocalCreated; |
|
81 }; |
|
82 |
|
83 inline CDHCPIP4Control::CDHCPIP4Control(RSocketServ& aEsock, TConfigType aConfigType) : |
|
84 CDHCPControl(aEsock,aConfigType) |
|
85 { |
|
86 } |
|
87 |
|
88 inline CDHCPIP4StateMachine* CDHCPIP4Control::DhcpStateMachine() |
|
89 { |
|
90 return static_cast<CDHCPIP4StateMachine*>(iDhcpStateMachine); |
|
91 } |
|
92 |
|
93 #endif |
|
94 |