|
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: STUN server item. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef STUNSERVERITEM_H |
|
20 #define STUNSERVERITEM_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 /** |
|
25 * STUN server item |
|
26 * Holds transiently one STUN server item before it is saved to |
|
27 * Central Repository. |
|
28 * |
|
29 * @lib wpnatfwtraversaladapter.lib |
|
30 * @since S60 3.2 |
|
31 */ |
|
32 class CWPStunServerItem : public CBase |
|
33 { |
|
34 |
|
35 /** |
|
36 * For EUnit tests; uncomment when running tests. |
|
37 */ |
|
38 //friend class T_NATFWTraversalAdapter; |
|
39 |
|
40 public: |
|
41 |
|
42 static CWPStunServerItem* NewL(); |
|
43 static CWPStunServerItem* NewLC(); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~CWPStunServerItem(); |
|
49 |
|
50 /** |
|
51 * Setter for STUN server address. |
|
52 * |
|
53 * @since S60 3.2 |
|
54 * @param aStunSrvAddr STUN server address. |
|
55 */ |
|
56 void SetStunSrvAddrL( const TDesC8& aStunSrvAddr ); |
|
57 |
|
58 /** |
|
59 * Setter for STUN server address. |
|
60 * |
|
61 * @since S60 3.2 |
|
62 * @param aStunSrvPort STUN server port. |
|
63 */ |
|
64 void SetStunSrvPort( TInt aStunSrvPort ); |
|
65 |
|
66 /** |
|
67 * Setter for STUN server username. |
|
68 * |
|
69 * @since S60 3.2 |
|
70 * @param aStunUsername STUN server username. |
|
71 */ |
|
72 void SetStunUsernameL( const TDesC8& aStunUsername ); |
|
73 |
|
74 /** |
|
75 * Setter for STUN server password. |
|
76 * |
|
77 * @since S60 3.2 |
|
78 * @param aStunSrvAddr STUN server password. |
|
79 */ |
|
80 void SetStunPasswordL( const TDesC8& aStunPassword ); |
|
81 |
|
82 /** |
|
83 * Getter for STUN server address. |
|
84 * |
|
85 * @since S60 3.2 |
|
86 * @return aStunSrvAddr STUN server address. |
|
87 */ |
|
88 const TDesC8& StunSrvAddr() const; |
|
89 |
|
90 /** |
|
91 * Getter for STUN server address. |
|
92 * |
|
93 * @since S60 3.2 |
|
94 * @return aStunSrvPort STUN server port. |
|
95 */ |
|
96 TInt StunSrvPort() const; |
|
97 |
|
98 /** |
|
99 * Getter for STUN server username. |
|
100 * |
|
101 * @since S60 3.2 |
|
102 * @return aStunUsername STUN server username. |
|
103 */ |
|
104 const TDesC8& StunUsername() const; |
|
105 |
|
106 /** |
|
107 * Getter for STUN server password. |
|
108 * |
|
109 * @since S60 3.2 |
|
110 * @return aStunPassword STUN server password. |
|
111 */ |
|
112 const TDesC8& StunPassword() const; |
|
113 |
|
114 private: |
|
115 |
|
116 CWPStunServerItem(); |
|
117 |
|
118 void ConstructL(); |
|
119 |
|
120 private: // data |
|
121 |
|
122 /** |
|
123 * STUN server address. |
|
124 * OMA CP Parameter: STUNSRVADDR. See w902E.txt for more information. |
|
125 * Own. |
|
126 */ |
|
127 HBufC8* iStunSrvAddr; |
|
128 |
|
129 /** |
|
130 * STUN server port. |
|
131 * OMA CP Parameter: STUNSRVPORT. See w902E.txt for more information. |
|
132 */ |
|
133 TInt iStunSrvPort; |
|
134 |
|
135 /** |
|
136 * STUN server username. |
|
137 * OMA CP Parameter: AAUTHNAME. See w902E.txt for more information. |
|
138 * Own. |
|
139 */ |
|
140 HBufC8* iStunUsername; |
|
141 |
|
142 /** |
|
143 * STUN server password. |
|
144 * OMA CP Parameter: AAUTHSECRET. See w902E.txt for more information. |
|
145 * Own. |
|
146 */ |
|
147 HBufC8* iStunPassword; |
|
148 |
|
149 }; |
|
150 |
|
151 #endif // STUNSERVERITEM_H |
|
152 |