37 #include "eap_am_tools_symbian.h" |
37 #include "eap_am_tools_symbian.h" |
38 #include "eap_state_notification.h" |
38 #include "eap_state_notification.h" |
39 #include "EapSimDbDefaults.h" |
39 #include "EapSimDbDefaults.h" |
40 #include "EapSimDbParameterNames.h" |
40 #include "EapSimDbParameterNames.h" |
41 #include "EapSimDbUtils.h" |
41 #include "EapSimDbUtils.h" |
42 #include "EapTraceSymbian.h" |
42 #include "eap_am_trace_symbian.h" |
43 |
43 |
44 #include <d32dbms.h> // For DBMS |
44 #include <d32dbms.h> // For DBMS |
45 #include <s32strm.h> // For RReadStream |
45 #include <s32strm.h> // For RReadStream |
46 |
46 |
47 #if defined (USE_EAP_GSMSIM_INTERFACE) && !defined(__WINS__) |
47 #if defined (USE_EAP_GSMSIM_INTERFACE) && !defined(__WINS__) |
106 , m_do_rand_uniqueness_check(true) |
106 , m_do_rand_uniqueness_check(true) |
107 , m_max_session_time(0) |
107 , m_max_session_time(0) |
108 { |
108 { |
109 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
109 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
110 |
110 |
|
111 #ifdef USE_EAP_EXPANDED_TYPES |
|
112 |
|
113 m_tunneling_vendor_type = m_tunneling_type.get_vendor_type(); |
|
114 |
|
115 #else |
|
116 |
|
117 m_tunneling_vendor_type = static_cast<TUint>(m_tunneling_type); |
|
118 |
|
119 #endif //#ifdef USE_EAP_EXPANDED_TYPES |
|
120 |
111 if (receive_network_id != 0 |
121 if (receive_network_id != 0 |
112 && receive_network_id->get_is_valid_data() == true) |
122 && receive_network_id->get_is_valid_data() == true) |
113 { |
123 { |
114 eap_status_e status = m_receive_network_id.set_copy_of_network_id( |
124 eap_status_e status = m_receive_network_id.set_copy_of_network_id( |
115 receive_network_id); |
125 receive_network_id); |
129 |
139 |
130 //-------------------------------------------------- |
140 //-------------------------------------------------- |
131 |
141 |
132 void eap_am_type_gsmsim_symbian_c::ConstructL() |
142 void eap_am_type_gsmsim_symbian_c::ConstructL() |
133 { |
143 { |
134 TInt error = m_session.Connect(); |
|
135 EAP_TRACE_DEBUG_SYMBIAN((_L("eap_am_type_gsmsim_symbian_c::ConstructL(): - m_session.Connect(), error=%d\n"), error)); |
|
136 User::LeaveIfError(error); |
|
137 |
|
138 // Open/create database |
144 // Open/create database |
139 EapSimDbUtils::OpenDatabaseL(m_database, m_session, m_index_type, m_index, m_tunneling_type); |
145 EapSimDbUtils::OpenDatabaseL(m_database, m_session, m_index_type, m_index, m_tunneling_type); |
140 |
146 |
141 // SIM IMSI, Kc and SRES are queried from SIM using SIM interface. |
147 // SIM IMSI, Kc and SRES are queried from SIM using SIM interface. |
142 // If this is not used then Nokia test algorithms and test IMSI is used. |
148 // If this is not used then Nokia test algorithms and test IMSI is used. |
282 |
288 |
283 // Form the insertion command |
289 // Form the insertion command |
284 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
290 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
285 TPtr sqlStatement = buf->Des(); |
291 TPtr sqlStatement = buf->Des(); |
286 |
292 |
287 _LIT(KSQLInsert, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d"); |
293 _LIT(KSQLInsert, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d"); |
288 sqlStatement.Format( |
294 sqlStatement.Format(KSQLInsert, &KXKey, &KK_aut, &KK_encr, &KReauthCounter, &KSimTableName, |
289 KSQLInsert, |
295 &KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type); |
290 &KXKey, |
|
291 &KK_aut, |
|
292 &KK_encr, |
|
293 &KReauthCounter, |
|
294 &KSimTableName, |
|
295 &KServiceType, |
|
296 m_index_type, |
|
297 &KServiceIndex, |
|
298 m_index, |
|
299 &KTunnelingTypeVendorId, |
|
300 m_tunneling_type.get_vendor_id(), |
|
301 &KTunnelingType, |
|
302 m_tunneling_type.get_vendor_type()); |
|
303 |
296 |
304 // Evaluate view |
297 // Evaluate view |
305 RDbView view; |
298 RDbView view; |
306 User::LeaveIfError(view.Prepare(m_database,TDbQuery(sqlStatement), TDbWindow::EUnlimited)); |
299 User::LeaveIfError(view.Prepare(m_database,TDbQuery(sqlStatement), TDbWindow::EUnlimited)); |
307 CleanupClosePushL(view); |
300 CleanupClosePushL(view); |
359 } |
352 } |
360 |
353 |
361 |
354 |
362 //-------------------------------------------------- |
355 //-------------------------------------------------- |
363 |
356 |
364 EAP_FUNC_EXPORT eap_status_e eap_am_type_gsmsim_symbian_c::authentication_finished( |
357 eap_status_e eap_am_type_gsmsim_symbian_c::authentication_finished( |
365 const bool true_when_successful, |
358 const bool true_when_successful, |
366 const eap_gsmsim_authentication_type_e authentication_type, |
359 const eap_gsmsim_authentication_type_e authentication_type, |
367 const eap_type_gsmsim_identity_type identity_type) |
360 const eap_type_gsmsim_identity_type identity_type) |
368 { |
361 { |
369 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
362 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
432 |
425 |
433 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
426 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
434 TPtr sqlStatement = buf->Des(); |
427 TPtr sqlStatement = buf->Des(); |
435 |
428 |
436 // Form the query |
429 // Form the query |
437 _LIT(KSQLQuery, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d"); |
430 _LIT(KSQLQuery, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d"); |
438 sqlStatement.Format( |
431 sqlStatement.Format(KSQLQuery, &KXKey, &KK_aut, &KK_encr, &KReauthCounter, &KSimTableName, |
439 KSQLQuery, |
432 &KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type); |
440 &KXKey, |
|
441 &KK_aut, |
|
442 &KK_encr, |
|
443 &KReauthCounter, |
|
444 &KSimTableName, |
|
445 &KServiceType, |
|
446 m_index_type, |
|
447 &KServiceIndex, |
|
448 m_index, |
|
449 &KTunnelingTypeVendorId, |
|
450 m_tunneling_type.get_vendor_id(), |
|
451 &KTunnelingType, |
|
452 m_tunneling_type.get_vendor_type()); |
|
453 |
433 |
454 RDbView view; |
434 RDbView view; |
455 // Evaluate view |
435 // Evaluate view |
456 User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement))); |
436 User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement))); |
457 CleanupClosePushL(view); |
437 CleanupClosePushL(view); |
551 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
531 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
552 |
532 |
553 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
533 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
554 TPtr sqlStatement = buf->Des(); |
534 TPtr sqlStatement = buf->Des(); |
555 |
535 |
556 _LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d"); |
536 _LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d"); |
557 sqlStatement.Format( |
537 sqlStatement.Format(KSQLInsert, &KReauthCounter, &KSimTableName, |
558 KSQLInsert, |
538 &KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type); |
559 &KReauthCounter, |
|
560 &KSimTableName, |
|
561 &KServiceType, |
|
562 m_index_type, |
|
563 &KServiceIndex, |
|
564 m_index, |
|
565 &KTunnelingTypeVendorId, |
|
566 m_tunneling_type.get_vendor_id(), |
|
567 &KTunnelingType, |
|
568 m_tunneling_type.get_vendor_type()); |
|
569 |
539 |
570 // Evaluate view |
540 // Evaluate view |
571 RDbView view; |
541 RDbView view; |
572 User::LeaveIfError(view.Prepare(m_database,TDbQuery(sqlStatement), TDbWindow::EUnlimited)); |
542 User::LeaveIfError(view.Prepare(m_database,TDbQuery(sqlStatement), TDbWindow::EUnlimited)); |
573 CleanupClosePushL(view); |
543 CleanupClosePushL(view); |
661 // Needed only for test environment. |
631 // Needed only for test environment. |
662 |
632 |
663 { |
633 { |
664 eap_variable_data_c simulator_sim_algorithm(m_am_tools); |
634 eap_variable_data_c simulator_sim_algorithm(m_am_tools); |
665 |
635 |
666 eap_status_e status = type_configure_read( |
636 eap_status_e status = m_partner->read_configure( |
667 cf_str_EAP_GSMSIM_simulator_sim_algorithm.get_field(), |
637 cf_str_EAP_GSMSIM_simulator_sim_algorithm.get_field(), |
668 &simulator_sim_algorithm); |
638 &simulator_sim_algorithm); |
669 if (status == eap_status_ok |
639 if (status == eap_status_ok |
670 && simulator_sim_algorithm.get_is_valid_data() == true |
640 && simulator_sim_algorithm.get_is_valid_data() == true |
671 && simulator_sim_algorithm.get_data_length() > 0ul |
641 && simulator_sim_algorithm.get_data_length() > 0ul |
698 } |
668 } |
699 } |
669 } |
700 } |
670 } |
701 |
671 |
702 { |
672 { |
703 eap_status_e status = type_configure_read( |
673 eap_status_e status = m_partner->read_configure( |
704 cf_str_EAP_GSMSIM_simulator_sim_ki.get_field(), |
674 cf_str_EAP_GSMSIM_simulator_sim_ki.get_field(), |
705 &m_simulator_sim_ki); |
675 &m_simulator_sim_ki); |
706 if (status == eap_status_ok |
676 if (status == eap_status_ok |
707 && m_simulator_sim_ki.get_is_valid_data() == true |
677 && m_simulator_sim_ki.get_is_valid_data() == true |
708 && m_simulator_sim_ki.get_data_length() > 0ul |
678 && m_simulator_sim_ki.get_data_length() > 0ul |
747 |
717 |
748 { |
718 { |
749 // Read Maximum Session Validity Time from the config file |
719 // Read Maximum Session Validity Time from the config file |
750 eap_variable_data_c sessionTimeFromFile(m_am_tools); |
720 eap_variable_data_c sessionTimeFromFile(m_am_tools); |
751 |
721 |
752 eap_status_e status = type_configure_read( |
722 eap_status_e status = m_partner->read_configure( |
753 cf_str_EAP_GSMSIM_max_session_validity_time.get_field(), |
723 cf_str_EAP_GSMSIM_max_session_validity_time.get_field(), |
754 &sessionTimeFromFile); |
724 &sessionTimeFromFile); |
755 |
725 |
756 if (status == eap_status_ok |
726 if (status == eap_status_ok |
757 && sessionTimeFromFile.get_is_valid_data() == true |
727 && sessionTimeFromFile.get_is_valid_data() == true |
932 |
902 |
933 // Form the insertion command |
903 // Form the insertion command |
934 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
904 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
935 TPtr sqlStatement = buf->Des(); |
905 TPtr sqlStatement = buf->Des(); |
936 |
906 |
937 _LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d"); |
907 _LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d"); |
938 sqlStatement.Format( |
908 sqlStatement.Format(KSQLInsert, &KPseudonymId, &KSimTableName, |
939 KSQLInsert, |
909 &KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type); |
940 &KPseudonymId, |
|
941 &KSimTableName, |
|
942 &KServiceType, |
|
943 m_index_type, |
|
944 &KServiceIndex, |
|
945 m_index, |
|
946 &KTunnelingTypeVendorId, |
|
947 m_tunneling_type.get_vendor_id(), |
|
948 &KTunnelingType, |
|
949 m_tunneling_type.get_vendor_type()); |
|
950 |
910 |
951 // Evaluate view |
911 // Evaluate view |
952 RDbView view; |
912 RDbView view; |
953 User::LeaveIfError(view.Prepare(m_database,TDbQuery(sqlStatement), TDbWindow::EUnlimited)); |
913 User::LeaveIfError(view.Prepare(m_database,TDbQuery(sqlStatement), TDbWindow::EUnlimited)); |
954 CleanupClosePushL(view); |
914 CleanupClosePushL(view); |
1039 |
999 |
1040 // Form the insertion command |
1000 // Form the insertion command |
1041 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
1001 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
1042 TPtr sqlStatement = buf->Des(); |
1002 TPtr sqlStatement = buf->Des(); |
1043 |
1003 |
1044 _LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d"); |
1004 _LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d"); |
1045 sqlStatement.Format( |
1005 sqlStatement.Format(KSQLInsert, &KReauthId, &KSimTableName, |
1046 KSQLInsert, |
1006 &KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type); |
1047 &KReauthId, |
|
1048 &KSimTableName, |
|
1049 &KServiceType, |
|
1050 m_index_type, |
|
1051 &KServiceIndex, |
|
1052 m_index, |
|
1053 &KTunnelingTypeVendorId, |
|
1054 m_tunneling_type.get_vendor_id(), |
|
1055 &KTunnelingType, |
|
1056 m_tunneling_type.get_vendor_type()); |
|
1057 |
1007 |
1058 // Evaluate view |
1008 // Evaluate view |
1059 RDbView view; |
1009 RDbView view; |
1060 User::LeaveIfError(view.Prepare(m_database,TDbQuery(sqlStatement), TDbWindow::EUnlimited)); |
1010 User::LeaveIfError(view.Prepare(m_database,TDbQuery(sqlStatement), TDbWindow::EUnlimited)); |
1061 CleanupClosePushL(view); |
1011 CleanupClosePushL(view); |
1141 |
1091 |
1142 // Form the insertion command |
1092 // Form the insertion command |
1143 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
1093 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
1144 TPtr sqlStatement = buf->Des(); |
1094 TPtr sqlStatement = buf->Des(); |
1145 |
1095 |
1146 _LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d"); |
1096 _LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d"); |
1147 sqlStatement.Format( |
1097 sqlStatement.Format(KSQLInsert, &KPreviousIMSI, &KSimTableName, |
1148 KSQLInsert, |
1098 &KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type); |
1149 &KPreviousIMSI, |
|
1150 &KSimTableName, |
|
1151 &KServiceType, |
|
1152 m_index_type, |
|
1153 &KServiceIndex, |
|
1154 m_index, |
|
1155 &KTunnelingTypeVendorId, |
|
1156 m_tunneling_type.get_vendor_id(), |
|
1157 &KTunnelingType, |
|
1158 m_tunneling_type.get_vendor_type()); |
|
1159 |
|
1160 // Evaluate view |
1099 // Evaluate view |
1161 RDbView view; |
1100 RDbView view; |
1162 |
1101 |
1163 User::LeaveIfError(view.Prepare(m_database,TDbQuery(sqlStatement), TDbWindow::EUnlimited)); |
1102 User::LeaveIfError(view.Prepare(m_database,TDbQuery(sqlStatement), TDbWindow::EUnlimited)); |
1164 CleanupClosePushL(view); |
1103 CleanupClosePushL(view); |
1276 m_stored_reauth_id.reset(); |
1215 m_stored_reauth_id.reset(); |
1277 m_previous_imsi.reset(); |
1216 m_previous_imsi.reset(); |
1278 |
1217 |
1279 // Query all the relevant parameters |
1218 // Query all the relevant parameters |
1280 |
1219 |
1281 _LIT(KSQLQuery, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d"); |
1220 _LIT(KSQLQuery, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d"); |
1282 sqlStatement.Format( |
1221 sqlStatement.Format(KSQLQuery, &KReauthId, &KReauthCounter, &KPseudonymId, |
1283 KSQLQuery, |
1222 &KPreviousIMSI, &KSimTableName, |
1284 &KReauthId, |
1223 &KServiceType, m_index_type, |
1285 &KReauthCounter, |
1224 &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type); |
1286 &KPseudonymId, |
|
1287 &KPreviousIMSI, |
|
1288 &KSimTableName, |
|
1289 &KServiceType, |
|
1290 m_index_type, |
|
1291 &KServiceIndex, |
|
1292 m_index, |
|
1293 &KTunnelingTypeVendorId, |
|
1294 m_tunneling_type.get_vendor_id(), |
|
1295 &KTunnelingType, |
|
1296 m_tunneling_type.get_vendor_type()); |
|
1297 |
1225 |
1298 RDbView view; |
1226 RDbView view; |
1299 // Evaluate view |
1227 // Evaluate view |
1300 User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement))); |
1228 User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement))); |
1301 CleanupClosePushL(view); |
1229 CleanupClosePushL(view); |
1646 } |
1574 } |
1647 |
1575 |
1648 //-------------------------------------------------- |
1576 //-------------------------------------------------- |
1649 |
1577 |
1650 // |
1578 // |
1651 EAP_FUNC_EXPORT eap_status_e eap_am_type_gsmsim_symbian_c::cancel_SIM_IMSI_or_pseudonym_or_reauthentication_id_query() |
1579 eap_status_e eap_am_type_gsmsim_symbian_c::cancel_SIM_IMSI_or_pseudonym_or_reauthentication_id_query() |
1652 { |
1580 { |
1653 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
1581 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
1654 #if defined (USE_EAP_GSMSIM_INTERFACE) && !defined(__WINS__) |
1582 #if defined (USE_EAP_GSMSIM_INTERFACE) && !defined(__WINS__) |
1655 if (m_is_client == true) |
1583 if (m_is_client == true) |
1656 { |
1584 { |
2010 } |
1938 } |
2011 |
1939 |
2012 //------------------------------------------------- |
1940 //------------------------------------------------- |
2013 |
1941 |
2014 // |
1942 // |
2015 EAP_FUNC_EXPORT eap_status_e eap_am_type_gsmsim_symbian_c::cancel_SIM_kc_sres_query() |
1943 eap_status_e eap_am_type_gsmsim_symbian_c::cancel_SIM_kc_sres_query() |
2016 { |
1944 { |
2017 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
1945 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
2018 |
1946 |
2019 #if defined (USE_EAP_GSMSIM_INTERFACE) && !defined(__WINS__) |
1947 #if defined (USE_EAP_GSMSIM_INTERFACE) && !defined(__WINS__) |
2020 if (m_is_client == true) |
1948 if (m_is_client == true) |
2144 |
2072 |
2145 // Now do the database query |
2073 // Now do the database query |
2146 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
2074 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
2147 TPtr sqlStatement = buf->Des(); |
2075 TPtr sqlStatement = buf->Des(); |
2148 |
2076 |
2149 _LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d"); |
2077 _LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d"); |
2150 sqlStatement.Format( |
2078 sqlStatement.Format(KSQLQueryRow, &unicodeString, &KSimTableName, |
2151 KSQLQueryRow, |
2079 &KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type); |
2152 &unicodeString, |
|
2153 &KSimTableName, |
|
2154 &KServiceType, |
|
2155 m_index_type, |
|
2156 &KServiceIndex, |
|
2157 m_index, |
|
2158 &KTunnelingTypeVendorId, |
|
2159 m_tunneling_type.get_vendor_id(), |
|
2160 &KTunnelingType, |
|
2161 m_tunneling_type.get_vendor_type()); |
|
2162 |
2080 |
2163 RDbView view; |
2081 RDbView view; |
2164 User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement), TDbWindow::EUnlimited)); |
2082 User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement), TDbWindow::EUnlimited)); |
2165 CleanupClosePushL(view); |
2083 CleanupClosePushL(view); |
2166 User::LeaveIfError(view.EvaluateAll()); |
2084 User::LeaveIfError(view.EvaluateAll()); |
2541 #endif //#if defined(USE_EAP_TYPE_SERVER_GSMSIM) |
2459 #endif //#if defined(USE_EAP_TYPE_SERVER_GSMSIM) |
2542 |
2460 |
2543 //-------------------------------------------------- |
2461 //-------------------------------------------------- |
2544 |
2462 |
2545 // |
2463 // |
2546 EAP_FUNC_EXPORT eap_status_e eap_am_type_gsmsim_symbian_c::cancel_imsi_from_username_query() |
2464 eap_status_e eap_am_type_gsmsim_symbian_c::cancel_imsi_from_username_query() |
2547 { |
2465 { |
2548 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
2466 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
2549 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
2467 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
2550 return EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported); |
2468 return EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported); |
2551 } |
2469 } |
2708 |
2626 |
2709 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
2627 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
2710 TPtr sqlStatement = buf->Des(); |
2628 TPtr sqlStatement = buf->Des(); |
2711 |
2629 |
2712 // Query all the relevant parameters |
2630 // Query all the relevant parameters |
2713 _LIT(KSQLQuery, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d"); |
2631 _LIT(KSQLQuery, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d"); |
2714 sqlStatement.Format( |
2632 sqlStatement.Format(KSQLQuery, &cf_str_EAP_GSMSIM_max_session_validity_time_literal, |
2715 KSQLQuery, |
2633 &KGSMSIMLastFullAuthTime, &KSimTableName, |
2716 &cf_str_EAP_GSMSIM_max_session_validity_time_literal, |
2634 &KServiceType, m_index_type, |
2717 &KGSMSIMLastFullAuthTime, |
2635 &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type); |
2718 &KSimTableName, |
|
2719 &KServiceType, |
|
2720 m_index_type, |
|
2721 &KServiceIndex, |
|
2722 m_index, |
|
2723 &KTunnelingTypeVendorId, |
|
2724 m_tunneling_type.get_vendor_id(), |
|
2725 &KTunnelingType, |
|
2726 m_tunneling_type.get_vendor_type()); |
|
2727 |
2636 |
2728 RDbView view; |
2637 RDbView view; |
2729 // Evaluate view |
2638 // Evaluate view |
2730 User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement))); |
2639 User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement))); |
2731 CleanupClosePushL(view); |
2640 CleanupClosePushL(view); |
2839 |
2748 |
2840 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
2749 HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength); |
2841 TPtr sqlStatement = buf->Des(); |
2750 TPtr sqlStatement = buf->Des(); |
2842 |
2751 |
2843 // Query all the relevant parameters |
2752 // Query all the relevant parameters |
2844 _LIT(KSQLQuery, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d"); |
2753 _LIT(KSQLQuery, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d"); |
2845 sqlStatement.Format( |
2754 sqlStatement.Format(KSQLQuery, &KGSMSIMLastFullAuthTime, &KSimTableName, |
2846 KSQLQuery, |
2755 &KServiceType, m_index_type, |
2847 &KGSMSIMLastFullAuthTime, |
2756 &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type); |
2848 &KSimTableName, |
|
2849 &KServiceType, |
|
2850 m_index_type, |
|
2851 &KServiceIndex, |
|
2852 m_index, |
|
2853 &KTunnelingTypeVendorId, |
|
2854 m_tunneling_type.get_vendor_id(), |
|
2855 &KTunnelingType, |
|
2856 m_tunneling_type.get_vendor_type()); |
|
2857 |
2757 |
2858 RDbView view; |
2758 RDbView view; |
2859 // Evaluate view |
2759 // Evaluate view |
2860 User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement), TDbWindow::EUnlimited)); |
2760 User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement), TDbWindow::EUnlimited)); |
2861 CleanupClosePushL(view); |
2761 CleanupClosePushL(view); |