|
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 "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 #ifndef __LEGACY_LOOPBACK_PROVISION_H__ |
|
18 #define __LEGACY_LOOPBACK_PROVISION_H__ |
|
19 |
|
20 #include <comms-infras/metadata.h> |
|
21 #include <in_sock.h> // TIp6Addr |
|
22 #include <metadatabase.h> // for TMDBElementId |
|
23 |
|
24 namespace ESock |
|
25 { |
|
26 class CCommsDatIapView; |
|
27 } |
|
28 |
|
29 class TLegacyLoopbackIp6Provision |
|
30 /** |
|
31 Provisioning information for CIPv4Binder |
|
32 */ |
|
33 { |
|
34 friend class CLegacyLoopbackProvision; |
|
35 |
|
36 public: |
|
37 inline const TIp6Addr& Ip6NameServer1() const; |
|
38 inline const TIp6Addr& Ip6NameServer2() const; |
|
39 inline TBool Ip6DNSAddrFromServer() const; |
|
40 |
|
41 private: |
|
42 void InitialiseConfigL(ESock::CCommsDatIapView* aIapView); |
|
43 inline void SetIp6NameServer1(const TIp6Addr& aIp6NameServer1); |
|
44 inline void SetIp6NameServer2(const TIp6Addr& aIp6NameServer2); |
|
45 inline void SetIp6DNSAddrFromServer(TBool aValue); |
|
46 void GetIp6AddrL(ESock::CCommsDatIapView* aIapView, CommsDat::TMDBElementId aElementId, TIp6Addr& aAddr); |
|
47 |
|
48 private: |
|
49 TIp6Addr iIp6NameServer1; |
|
50 TIp6Addr iIp6NameServer2; |
|
51 TUint iIp6DNSAddrFromServer : 1; |
|
52 }; |
|
53 |
|
54 |
|
55 class TLegacyLoopBackAgentProvision : public Meta::SMetaData |
|
56 /** |
|
57 Provisioning information that is retrieved dynamically from the Agent on ConnectComplete |
|
58 |
|
59 Historically used to be a member of CLegacyLoopbackProvision, but split off into an SMetaData |
|
60 provisioning structure of its own right. |
|
61 */ |
|
62 { |
|
63 public: |
|
64 enum |
|
65 { |
|
66 EUid = 0x10286A08, |
|
67 ETypeId = 2 |
|
68 }; |
|
69 |
|
70 public: |
|
71 inline TInt IsDialIn() const; |
|
72 inline void SetIsDialIn(TInt aValue); |
|
73 |
|
74 DATA_VTABLE |
|
75 |
|
76 private: |
|
77 TInt iDialIn; |
|
78 }; |
|
79 |
|
80 |
|
81 class CLegacyLoopbackProvision : public CBase, public Meta::SMetaData |
|
82 /** |
|
83 Main provisioning info class that aggregates specific provisioning classes. |
|
84 */ |
|
85 { |
|
86 public: |
|
87 enum |
|
88 { |
|
89 EUid = 0x10286A08, |
|
90 ETypeId = 1 |
|
91 }; |
|
92 |
|
93 public: |
|
94 void InitialiseConfigL(ESock::CCommsDatIapView* aIapView); |
|
95 |
|
96 public: |
|
97 TLegacyLoopbackIp6Provision iIp6Provision; |
|
98 |
|
99 DATA_VTABLE |
|
100 }; |
|
101 |
|
102 |
|
103 // |
|
104 // TLegacyLoopBackAgentProvision inlines |
|
105 // |
|
106 |
|
107 TInt TLegacyLoopBackAgentProvision::IsDialIn() const { return iDialIn; } |
|
108 |
|
109 void TLegacyLoopBackAgentProvision::SetIsDialIn(TInt aValue) { iDialIn = aValue; } |
|
110 |
|
111 // |
|
112 // TLegacyLoopbackIp6Provision inline functions |
|
113 // |
|
114 |
|
115 const TIp6Addr& TLegacyLoopbackIp6Provision::Ip6NameServer1() const { return iIp6NameServer1; } |
|
116 |
|
117 const TIp6Addr& TLegacyLoopbackIp6Provision::Ip6NameServer2() const { return iIp6NameServer2; } |
|
118 |
|
119 TBool TLegacyLoopbackIp6Provision::Ip6DNSAddrFromServer() const { return iIp6DNSAddrFromServer; } |
|
120 |
|
121 void TLegacyLoopbackIp6Provision::SetIp6NameServer1(const TIp6Addr& aIp6NameServer1) |
|
122 { |
|
123 iIp6NameServer1 = aIp6NameServer1; |
|
124 } |
|
125 |
|
126 void TLegacyLoopbackIp6Provision::SetIp6NameServer2(const TIp6Addr& aIp6NameServer2) |
|
127 { |
|
128 iIp6NameServer2 = aIp6NameServer2; |
|
129 } |
|
130 |
|
131 void TLegacyLoopbackIp6Provision::SetIp6DNSAddrFromServer(TBool aIp6DNSAddrFromServer) |
|
132 { |
|
133 iIp6DNSAddrFromServer = aIp6DNSAddrFromServer; |
|
134 } |
|
135 |
|
136 #endif // __LEGACY_LOOPBACK_PROVISION_H__ |