|
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 CNetworkInfoKey. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "NetworkInfoKey.h" |
|
21 #include "NetworkInfoArray.h" |
|
22 #include "NetworkInfoBase.h" |
|
23 #include "ConnectionDialogsLogger.h" |
|
24 |
|
25 |
|
26 // ================= MEMBER FUNCTIONS ======================= |
|
27 // |
|
28 // --------------------------------------------------------- |
|
29 // CNetworkInfoKey::CNetworkInfoKey() |
|
30 // --------------------------------------------------------- |
|
31 // |
|
32 CNetworkInfoKey::CNetworkInfoKey() |
|
33 : TKeyArrayFix( 0, ECmpNormal ) |
|
34 { |
|
35 } |
|
36 |
|
37 |
|
38 // --------------------------------------------------------- |
|
39 // CNetworkInfoKey::~CNetworkInfoKey() |
|
40 // --------------------------------------------------------- |
|
41 // |
|
42 CNetworkInfoKey::~CNetworkInfoKey() |
|
43 { |
|
44 } |
|
45 |
|
46 |
|
47 // --------------------------------------------------------- |
|
48 // CNetworkInfoKey::SetPtr( CArrayPtrFlat<CNetworkInfoBase>* aPtr ) |
|
49 // --------------------------------------------------------- |
|
50 // |
|
51 void CNetworkInfoKey::SetPtr( CNetworkInfoArray* aPtr ) |
|
52 { |
|
53 CLOG_ENTERFN( "CNetworkInfoKey::SetPtr" ); |
|
54 |
|
55 iPtr = aPtr; |
|
56 |
|
57 CLOG_LEAVEFN( "CNetworkInfoKey::SetPtr" ); |
|
58 } |
|
59 |
|
60 |
|
61 // --------------------------------------------------------- |
|
62 // CNetworkInfoKey::Compare( TInt aLeft, TInt aRight ) const |
|
63 // --------------------------------------------------------- |
|
64 // |
|
65 TInt CNetworkInfoKey::Compare( TInt aLeft, TInt aRight ) const |
|
66 { |
|
67 CLOG_ENTERFN( "CNetworkInfoKey::Compare" ); |
|
68 |
|
69 TInt retval( 0 ); |
|
70 |
|
71 CNetworkInfoArray* array = ( CNetworkInfoArray* )iPtr; |
|
72 retval = array->At( aLeft )->NetworkName().CompareC( |
|
73 array->At( aRight )->NetworkName() ); |
|
74 |
|
75 CLOG_WRITEF( _L( "aLeft %d" ), aLeft ); |
|
76 CLOG_WRITEF( _L( "aRight %d" ), aRight ); |
|
77 CLOG_WRITEF( _L( "retval %d" ), retval ); |
|
78 |
|
79 CLOG_LEAVEFN( "CNetworkInfoKey::Compare" ); |
|
80 |
|
81 return retval; |
|
82 } |
|
83 |
|
84 |
|
85 // End of File |