2
|
1 |
/**
|
|
2 |
* Copyright (c) 2006-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 |
* Header file declaring the RawIP Provisioning structures.
|
|
16 |
*
|
|
17 |
*
|
|
18 |
*/
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
/**
|
|
23 |
@file
|
|
24 |
@internalTechnology
|
|
25 |
*/
|
|
26 |
|
|
27 |
#ifndef WINSOCKAGENTHANDLER_H_
|
|
28 |
#define WINSOCKAGENTHANDLER_H_
|
|
29 |
|
|
30 |
#include <comms-infras/agentmessages.h>
|
|
31 |
#include <comms-infras/linkmessages.h>
|
|
32 |
#include <in_sock.h>
|
|
33 |
#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
|
|
34 |
#include <comms-infras/nifprvar_internal.h>
|
|
35 |
#endif
|
|
36 |
|
|
37 |
struct TWinsockInfo;
|
|
38 |
|
|
39 |
NONSHARABLE_CLASS(CWinsockAgentHandler) : public CAgentNotificationHandler
|
|
40 |
{
|
|
41 |
public:
|
|
42 |
CWinsockAgentHandler(const TWinsockInfo& aTunnelInfo);
|
|
43 |
|
|
44 |
private:
|
|
45 |
virtual void ServiceStarted();
|
|
46 |
virtual TInt NotificationFromAgent(TAgentToFlowEventType aEvent, TAny* aInfo);
|
|
47 |
|
|
48 |
private:
|
|
49 |
// Pointer to Tunnel provisioning information in AccessPointConfig. Should remain valid
|
|
50 |
// whilst TunnelMCPr instance is valid - TunnelMCPr has a longer lifetime that this
|
|
51 |
// Tunnel Agent Handler class (which TunnelMCPr created/deletes).
|
|
52 |
const TWinsockInfo& iTunnelInfo;
|
|
53 |
};
|
|
54 |
|
|
55 |
class TSigTunnelAddressParams : public Messages::TSignatureBase
|
|
56 |
/**
|
|
57 |
Parameters that communicate the IP Address that the Tunnel CFProtocol should use.
|
|
58 |
|
|
59 |
iIsUpdate is EFalse when the address is setup for the first time. Address changes are
|
|
60 |
signified by iIsUpdate being set to ETrue. This replaces the old notifications
|
|
61 |
EAgentToNifEventTypeSetAddress and EAgentToNifEventTypeUpdateAddress in the old
|
|
62 |
Networking architecture.
|
|
63 |
*/
|
|
64 |
{
|
|
65 |
protected:
|
|
66 |
inline TSigTunnelAddressParams() {}
|
|
67 |
explicit TSigTunnelAddressParams(const Messages::TNodeSignal::TMessageId& aMessageId,
|
|
68 |
TBool aIsUpdate, TInetAddr aAddress, TInetAddr aNameSer1, TInetAddr aNameSer2)
|
|
69 |
: Messages::TSignatureBase(aMessageId), iIsUpdate(aIsUpdate), iAddress(aAddress),
|
|
70 |
iNameSer1(aNameSer1), iNameSer2(aNameSer2)
|
|
71 |
{}
|
|
72 |
|
|
73 |
public:
|
|
74 |
DECLARE_MVIP_CTR( TSigTunnelAddressParams )
|
|
75 |
DATA_VTABLE
|
|
76 |
|
|
77 |
TInetAddr iAddress;
|
|
78 |
TInetAddr iNameSer1;
|
|
79 |
TInetAddr iNameSer2;
|
|
80 |
TBool iIsUpdate;
|
|
81 |
|
|
82 |
};
|
|
83 |
|
|
84 |
template<TInt id, TInt32 realm>
|
|
85 |
struct TWinsockAddressMessage : public TSigTunnelAddressParams, public Messages::TSignatureBase::TTypeToMessageId<id, realm>
|
|
86 |
/**
|
|
87 |
Template class specialising TCFUmtsIfMessageSig against the operation subid.
|
|
88 |
|
|
89 |
@internalComponent
|
|
90 |
*/
|
|
91 |
{
|
|
92 |
explicit TWinsockAddressMessage(
|
|
93 |
TBool aIsUpdate, TInetAddr aAddress, TInetAddr aNameSer1, TInetAddr aNameSer2)
|
|
94 |
:TSigTunnelAddressParams(Messages::TNodeSignal::TMessageId(id, realm),
|
|
95 |
aIsUpdate, aAddress, aNameSer1, aNameSer2)
|
|
96 |
{}
|
|
97 |
};
|
|
98 |
|
|
99 |
class TWinsockAgentMessage
|
|
100 |
{
|
|
101 |
public:
|
|
102 |
enum { ERealmId = 0x10281DF6 };
|
|
103 |
|
|
104 |
private:
|
|
105 |
enum
|
|
106 |
{
|
|
107 |
ETunnelSetAddress = Messages::KNullMessageId + 1,
|
|
108 |
};
|
|
109 |
public:
|
|
110 |
typedef TWinsockAddressMessage<ETunnelSetAddress, TWinsockAgentMessage::ERealmId> TTunnelSetAddress;
|
|
111 |
|
|
112 |
static void RegisterL();
|
|
113 |
static void DeRegister();
|
|
114 |
};
|
|
115 |
|
|
116 |
|
|
117 |
#endif
|
|
118 |
|