|
1 /* |
|
2 * Copyright (c) 2004 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 * Declares the connection info. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef DDLG_CONNECTIONINFO_H |
|
21 #define DDLG_CONNECTIONINFO_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <gulicon.h> |
|
26 #include <rconnmon.h> |
|
27 #include <apgicnfl.h> |
|
28 |
|
29 // CONSTANTS |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * Contains attributes of connection. |
|
37 */ |
|
38 NONSHARABLE_CLASS( CConnectionInfo ) : public CBase |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Constructor. |
|
44 */ |
|
45 static CConnectionInfo* NewLC(); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~CConnectionInfo(); |
|
51 |
|
52 private: // Constructors |
|
53 |
|
54 /** |
|
55 * Constructor. |
|
56 */ |
|
57 CConnectionInfo(); |
|
58 |
|
59 /** |
|
60 * Constructor. |
|
61 */ |
|
62 void ConstructL(); |
|
63 |
|
64 public: // New functions |
|
65 |
|
66 // Getter functions |
|
67 |
|
68 /** |
|
69 * Returns the connection id |
|
70 * @param - |
|
71 * @return the connection id |
|
72 */ |
|
73 inline TUint GetConnId() const; |
|
74 |
|
75 /** |
|
76 * Returns the application name which uses the connection |
|
77 * @param aUseSharedIcon in Output returns if the connection should use |
|
78 * the shared icon |
|
79 * @return the application name |
|
80 */ |
|
81 TPtrC GetAppNameL( TBool &aUseSharedIcon ); |
|
82 |
|
83 /** |
|
84 * Returns the Internet Accesspoint name through |
|
85 * the connection is estabilished |
|
86 * @param - |
|
87 * @return Internet Accespoint Name |
|
88 */ |
|
89 TPtrC GetIapNameL(); |
|
90 |
|
91 /** |
|
92 * Returns the bearer type of the connection |
|
93 * @param - |
|
94 * @return the bearer type |
|
95 */ |
|
96 inline TInt GetBearerType() const; |
|
97 |
|
98 /** |
|
99 * Returns the IAP id of the connection |
|
100 * @param - |
|
101 * @return the IAP id |
|
102 */ |
|
103 inline TInt GetIAPId() const; |
|
104 |
|
105 /** |
|
106 * Returns the icon of the application which uses the connection |
|
107 * @param aUseSharedIcon Says if the connection should use the shared |
|
108 * icon |
|
109 * @return the application icon |
|
110 */ |
|
111 CGulIcon* GetAppIconL( TBool aUseSharedIcon ); |
|
112 |
|
113 /** |
|
114 * Returns the start time of the connection. |
|
115 * @param - |
|
116 * @return The connection start time. |
|
117 */ |
|
118 inline TTime GetStartTime() const; |
|
119 |
|
120 // Setter functions |
|
121 |
|
122 /** |
|
123 * Set the connection id |
|
124 * @param the connection id |
|
125 * @return - |
|
126 */ |
|
127 inline void SetConnId( TUint aConnId ); |
|
128 |
|
129 /** |
|
130 * Set the Internet Accespoint name |
|
131 * through the connection is estabilish |
|
132 * @param The name of the Internet Accesspoint |
|
133 * @return - |
|
134 */ |
|
135 inline void SetIapNameL( const TDesC& aIapName ); |
|
136 |
|
137 /** |
|
138 * Set the client info of the application which uses the connection |
|
139 * @param the client information |
|
140 * @return - |
|
141 */ |
|
142 inline void SetClientInfo( TConnMonClientEnum aClientInfo ); |
|
143 |
|
144 /** |
|
145 * Set the bearer type of the given connection |
|
146 * @param the bearer type |
|
147 * @return - |
|
148 */ |
|
149 inline void SetBearerType( TInt aBearerType ); |
|
150 |
|
151 /** |
|
152 * Set the IAP id of the given connection |
|
153 * @param the IAP id |
|
154 * @return - |
|
155 */ |
|
156 inline void SetIAPId( TInt aIAPId ); |
|
157 |
|
158 /** |
|
159 * Set the start time of the connection. |
|
160 * @param The start time of the connection. |
|
161 * @return - |
|
162 */ |
|
163 inline void SetStartTime(TTime aTime); |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 private: // data |
|
169 |
|
170 TUint iConnId; ///< id of icon represents connection |
|
171 TInt iBearerType; ///< bearer type of connection |
|
172 TConnMonClientEnum iClientInfo; ///< info from clients, use connection |
|
173 HBufC* iAppName; ///< Owned. Apps which use connection. |
|
174 HBufC* iIapName; ///< Owned. Access point name. |
|
175 CGulIcon* iAppIcon; ///< Owned. Used for icon. |
|
176 TUint iIAPId; ///< Id of AP |
|
177 TTime iStartTime; ///< The start time of the connection |
|
178 |
|
179 }; |
|
180 |
|
181 |
|
182 #include "ConnectionInfo.inl" |
|
183 |
|
184 #endif // DDLG_CONNECTIONINFO_H |
|
185 |
|
186 // End Of File |