|
1 /* |
|
2 * Copyright (c) 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: Encapsulates preference settings for ICE prioritization. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef T_TNATFWICEPREFERENCES_H |
|
22 #define T_TNATFWICEPREFERENCES_H |
|
23 |
|
24 #include <mnatfwicesettings.h> |
|
25 |
|
26 /** |
|
27 * Encapsulates preference settings for ICE prioritization. |
|
28 * |
|
29 * @lib natfwnatsettings.dll |
|
30 * @since S60 v3.2 |
|
31 */ |
|
32 class TNATFWIcePreferences |
|
33 { |
|
34 |
|
35 public: |
|
36 |
|
37 TNATFWIcePreferences(); |
|
38 |
|
39 /** |
|
40 * Sets preference value for a specified setting. |
|
41 * |
|
42 * @since S60 v3.2 |
|
43 * @param aSetting Setting for which to set value |
|
44 * @param aValue Preference value |
|
45 * @return KErrNotSupported if setting is not known, KErrNone otherwise |
|
46 */ |
|
47 TInt SetPrefValue( MNATFWIceSettings::TPrefSetting aSetting, |
|
48 TInt aValue ); |
|
49 |
|
50 /** |
|
51 * Returns preference value for a specifed setting. |
|
52 * |
|
53 * @since S60 v3.2 |
|
54 * @param aSetting Setting for which to return preference value |
|
55 * @param aValue Preference value if query was valid |
|
56 * @return KErrNotSupported if setting is not known, KErrNone otherwise |
|
57 */ |
|
58 TInt GetPrefValue( MNATFWIceSettings::TPrefSetting aSetting, |
|
59 TInt& aValue ) const; |
|
60 |
|
61 private: // data |
|
62 |
|
63 /** |
|
64 * Type preference of host candidate. |
|
65 */ |
|
66 TInt iHostPref; |
|
67 |
|
68 /** |
|
69 * Type preference of server-reflexive candidate. |
|
70 */ |
|
71 TInt iServerReflexivePref; |
|
72 |
|
73 /** |
|
74 * Type preference of relay candidate. |
|
75 */ |
|
76 TInt iRelayPref; |
|
77 |
|
78 /** |
|
79 * Type preference of peer-reflexive candidate. |
|
80 */ |
|
81 TInt iPeerReflexivePref; |
|
82 |
|
83 /** |
|
84 * Local preference for candidates from IPv4 'interface'. |
|
85 */ |
|
86 TInt iIpv4AddrFamilyPref; |
|
87 |
|
88 /** |
|
89 * Local preference for candidates from IPv6 'interface'. |
|
90 */ |
|
91 TInt iIpv6AddrFamilyPref; |
|
92 |
|
93 /** |
|
94 * Local preference for candidates from VPN interface. |
|
95 */ |
|
96 TInt iVpnInterfacePref; |
|
97 |
|
98 /** |
|
99 * Transport preference for UDP-based candidates. |
|
100 */ |
|
101 TInt iUdpTransportPref; |
|
102 |
|
103 /** |
|
104 * Transport preference for TCP-based candidates. |
|
105 */ |
|
106 TInt iTcpTransportPref; |
|
107 |
|
108 /** |
|
109 * TCP-active direction preference. |
|
110 */ |
|
111 TInt iTcpDirActivePref; |
|
112 |
|
113 /** |
|
114 * TCP-passive direction preference. |
|
115 */ |
|
116 TInt iTcpDirPassivePref; |
|
117 |
|
118 /** |
|
119 * TCP-simultaneous-open direction preference. |
|
120 */ |
|
121 TInt iTcpDirSimultaneousOpenPref; |
|
122 }; |
|
123 |
|
124 #endif // T_TNATFWICEPREFERENCES_H |