equal
deleted
inserted
replaced
63 // --------------------------------------------------------------------------- |
63 // --------------------------------------------------------------------------- |
64 // |
64 // |
65 |
65 |
66 EXPORT_C bool ConnectionManager::isIapDefault(TUint32 aMatchIapId, TUint32 aDestId, bool aDefault) |
66 EXPORT_C bool ConnectionManager::isIapDefault(TUint32 aMatchIapId, TUint32 aDestId, bool aDefault) |
67 { |
67 { |
68 LOG(ESOCKET,EInfo,"+ConnectionManager::getDefualtId"); |
68 LOG(ESOCKET,EInfo,"+ConnectionManager::isIapDefault"); |
|
69 bool retVal = false; |
|
70 TRAPD(err,retVal = checkIapDefaultL(aMatchIapId,aDestId,aDefault)); |
|
71 if(err!=KErrNone) |
|
72 { |
|
73 // error occured |
|
74 return false; |
|
75 } |
|
76 return retVal; |
|
77 } |
|
78 |
|
79 bool ConnectionManager::checkIapDefaultL(TUint32 aMatchIapId, TUint32 aDestId, bool aDefault) |
|
80 { |
|
81 |
|
82 LOG(ESOCKET,EInfo,"+ConnectionManager::checkIapDefaultL"); |
69 TUint32 id = aDestId; |
83 TUint32 id = aDestId; |
70 TUint32 tmpapId; |
84 TUint32 tmpapId; |
71 TCmDefConnType type; |
85 TCmDefConnType type; |
72 |
86 |
73 RCmManager * mgr = new(ELeave) RCmManager(); |
87 RCmManager * mgr = new(ELeave) RCmManager(); |
77 { |
91 { |
78 TCmDefConnValue obj; |
92 TCmDefConnValue obj; |
79 mgr->ReadDefConnL(obj); |
93 mgr->ReadDefConnL(obj); |
80 id = obj.iId; |
94 id = obj.iId; |
81 type = obj.iType; |
95 type = obj.iType; |
82 if ((type ==ECmDefConnConnectionMethod) && (type == aMatchIapId)) |
96 if ((type ==ECmDefConnConnectionMethod) && (id == aMatchIapId)) |
83 { |
97 { |
84 return true; |
98 return true; |
85 } |
99 } |
86 else if (type != ECmDefConnDestination) |
100 else if (type != ECmDefConnDestination) |
87 { |
101 { |
102 if (tmpapId == aMatchIapId) |
116 if (tmpapId == aMatchIapId) |
103 { |
117 { |
104 return true; |
118 return true; |
105 } |
119 } |
106 } |
120 } |
107 return false; |
121 return false; |
108 |
122 |
|
123 |
109 } |
124 } |
110 |
125 |
111 // --------------------------------------------------------------------------- |
126 // --------------------------------------------------------------------------- |
112 // JavaNetworkAccessRepository::GetDeviceDefaultAccessPointL |
127 // JavaNetworkAccessRepository::GetDeviceDefaultAccessPointL |
113 // --------------------------------------------------------------------------- |
128 // --------------------------------------------------------------------------- |