equal
deleted
inserted
replaced
32 // Two-phase constructor. |
32 // Two-phase constructor. |
33 // ----------------------------------------------------------------------------- |
33 // ----------------------------------------------------------------------------- |
34 // |
34 // |
35 CCapList* CCapList::NewL() |
35 CCapList* CCapList::NewL() |
36 { |
36 { |
37 TRACE_FUNC_ENTRY; |
|
38 CCapList* self = new(ELeave) CCapList(); |
37 CCapList* self = new(ELeave) CCapList(); |
39 CleanupStack::PushL( self ); |
38 CleanupStack::PushL( self ); |
40 self->ConstructL(); |
39 self->ConstructL(); |
41 CleanupStack::Pop( self ); |
40 CleanupStack::Pop( self ); |
42 TRACE_FUNC_EXIT; |
|
43 return self; |
41 return self; |
44 } |
42 } |
45 |
43 |
46 // ----------------------------------------------------------------------------- |
44 // ----------------------------------------------------------------------------- |
47 // CCapList::~CCapList() |
45 // CCapList::~CCapList() |
48 // Gets phone serial number from etel. |
46 // Gets phone serial number from etel. |
49 // ----------------------------------------------------------------------------- |
47 // ----------------------------------------------------------------------------- |
50 // |
48 // |
51 CCapList::~CCapList() |
49 CCapList::~CCapList() |
52 { |
50 { |
53 TRACE_FUNC_ENTRY; |
|
54 delete iList; |
51 delete iList; |
55 TRACE_FUNC_EXIT; |
|
56 } |
52 } |
57 |
53 |
58 // ----------------------------------------------------------------------------- |
54 // ----------------------------------------------------------------------------- |
59 // CCapList::CCapList() |
55 // CCapList::CCapList() |
60 // Constructor |
56 // Constructor |
69 // Initializes the member data |
65 // Initializes the member data |
70 // ----------------------------------------------------------------------------- |
66 // ----------------------------------------------------------------------------- |
71 // |
67 // |
72 void CCapList::ConstructL() |
68 void CCapList::ConstructL() |
73 { |
69 { |
74 TRACE_FUNC_ENTRY; |
|
75 iList = CStringList::NewL(); |
70 iList = CStringList::NewL(); |
76 TRACE_FUNC_EXIT; |
|
77 } |
71 } |
78 |
72 |
79 // ----------------------------------------------------------------------------- |
73 // ----------------------------------------------------------------------------- |
80 // CCapList::List() |
74 // CCapList::List() |
81 // Returns the list |
75 // Returns the list |
92 // Find from mark |
86 // Find from mark |
93 // ----------------------------------------------------------------------------- |
87 // ----------------------------------------------------------------------------- |
94 // |
88 // |
95 TInt CCapList::FindFromMark(TInt aId, TInt aType) |
89 TInt CCapList::FindFromMark(TInt aId, TInt aType) |
96 { |
90 { |
97 TRACE_FUNC_ENTRY; |
|
98 TInt mark = List()->Mark(); |
91 TInt mark = List()->Mark(); |
99 TInt count= List()->Count(); |
92 TInt count= List()->Count(); |
100 |
93 |
101 if ( mark >= count ) |
94 if ( mark >= count ) |
102 { |
95 { |
104 } |
97 } |
105 |
98 |
106 TInt index=Find(aId, aType, mark); |
99 TInt index=Find(aId, aType, mark); |
107 if ( index == KErrNotFound ) |
100 if ( index == KErrNotFound ) |
108 { |
101 { |
109 LOGGER_WRITE_1( "CCapList::FindFromMark(TInt aId, TInt aType) returned : %d", KErrNotFound ); |
|
110 return KErrNotFound; |
102 return KErrNotFound; |
111 } |
103 } |
112 |
104 |
113 |
105 |
114 __ASSERT_DEBUG(index>=mark, CapUtil::Panic(KErrGeneral)); |
106 __ASSERT_DEBUG(index>=mark, CapUtil::Panic(KErrGeneral)); |
115 |
107 |
116 List()->SetMark(index+1); |
108 List()->SetMark(index+1); |
117 LOGGER_WRITE_1( "CCapList::FindFromMark(TInt aId, TInt aType) returned : %d", index ); |
|
118 return index; |
109 return index; |
119 } |
110 } |
120 |
111 |
121 // ----------------------------------------------------------------------------- |
112 // ----------------------------------------------------------------------------- |
122 // CCapList::FindServiceHeader() |
113 // CCapList::FindServiceHeader() |