|
1 /* |
|
2 * Copyright (c) 2002 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: Implementation of class CConnectionInfo. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "ConnectionInfo.h" |
|
21 |
|
22 |
|
23 // ================= MEMBER FUNCTIONS ======================= |
|
24 // |
|
25 // --------------------------------------------------------- |
|
26 // CConnectionInfo::CConnectionInfo |
|
27 // --------------------------------------------------------- |
|
28 // |
|
29 CConnectionInfo::CConnectionInfo( TUint32 aId, TBool aIsVPN, |
|
30 TUint32 aVPN_iap_id, TUint32 aDestinationId ) |
|
31 : iName( NULL ), |
|
32 iId( aId ), |
|
33 iListItem( NULL ), |
|
34 iIsVPN( aIsVPN ), |
|
35 iVPN_iap_id( aVPN_iap_id ), |
|
36 iDestinationId( aDestinationId ) |
|
37 { |
|
38 } |
|
39 |
|
40 |
|
41 // --------------------------------------------------------- |
|
42 // CConnectionInfo::~CConnectionInfo |
|
43 // --------------------------------------------------------- |
|
44 // |
|
45 CConnectionInfo::~CConnectionInfo() |
|
46 { |
|
47 delete iName; |
|
48 delete iListItem; |
|
49 } |
|
50 |
|
51 |
|
52 // --------------------------------------------------------- |
|
53 // CConnectionInfo::NewL( TDesC &aName, TUint32 aId, |
|
54 // TDesC &aListItem ) |
|
55 // --------------------------------------------------------- |
|
56 // |
|
57 CConnectionInfo* CConnectionInfo::NewL( TDesC &aName, TUint32 aId, |
|
58 TDesC &aListItem ) |
|
59 { |
|
60 CConnectionInfo* self = new (ELeave) CConnectionInfo( aId ); |
|
61 CleanupStack::PushL( self ); |
|
62 self->ConstructL( aName, aListItem ); |
|
63 CleanupStack::Pop( self ); |
|
64 |
|
65 return self; |
|
66 } |
|
67 |
|
68 |
|
69 // --------------------------------------------------------- |
|
70 // CConnectionInfo::NewL() |
|
71 // --------------------------------------------------------- |
|
72 // |
|
73 CConnectionInfo* CConnectionInfo::NewL( TDesC &aName, TUint32 aId, |
|
74 TUint32 vpn_iap_id, TDesC &aListItem ) |
|
75 { |
|
76 CConnectionInfo* self = new( ELeave )CConnectionInfo( aId, ETrue, |
|
77 vpn_iap_id ); |
|
78 CleanupStack::PushL( self ); |
|
79 self->ConstructL( aName, aListItem ); |
|
80 CleanupStack::Pop( self ); |
|
81 |
|
82 return self; |
|
83 } |
|
84 |
|
85 |
|
86 // --------------------------------------------------------- |
|
87 // CConnectionInfo::NewL() |
|
88 // --------------------------------------------------------- |
|
89 // |
|
90 CConnectionInfo* CConnectionInfo::NewL( TUint32 aId, TUint32 aDestId, |
|
91 TDesC &aListItem ) |
|
92 { |
|
93 CConnectionInfo* self = new( ELeave )CConnectionInfo( aId, EFalse, 0, |
|
94 aDestId ); |
|
95 CleanupStack::PushL( self ); |
|
96 self->ConstructL( aListItem ); |
|
97 CleanupStack::Pop( self ); |
|
98 |
|
99 return self; |
|
100 } |
|
101 |
|
102 |
|
103 // --------------------------------------------------------- |
|
104 // CConnectionInfo::ConstructL() |
|
105 // --------------------------------------------------------- |
|
106 // |
|
107 void CConnectionInfo::ConstructL( TDesC &aName, TDesC &aListItem ) |
|
108 { |
|
109 iName = aName.AllocL(); |
|
110 iListItem = aListItem.AllocL(); |
|
111 } |
|
112 |
|
113 |
|
114 // --------------------------------------------------------- |
|
115 // CConnectionInfo::ConstructL() |
|
116 // --------------------------------------------------------- |
|
117 // |
|
118 void CConnectionInfo::ConstructL( TDesC &aListItem ) |
|
119 { |
|
120 iListItem = aListItem.AllocL(); |
|
121 } |
|
122 |
|
123 |
|
124 // End of File |