--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/eap_am_type_gsmsim_symbian.cpp Thu Aug 19 09:58:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/eap_am_type_gsmsim_symbian.cpp Tue Aug 31 15:16:37 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 50 %
+* %version: 47.1.10 %
*/
// This is enumeration of EAPOL source code.
@@ -39,7 +39,7 @@
#include "EapSimDbDefaults.h"
#include "EapSimDbParameterNames.h"
#include "EapSimDbUtils.h"
-#include "eap_am_trace_symbian.h"
+#include "EapTraceSymbian.h"
#include <d32dbms.h> // For DBMS
#include <s32strm.h> // For RReadStream
@@ -108,16 +108,6 @@
{
EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-#ifdef USE_EAP_EXPANDED_TYPES
-
- m_tunneling_vendor_type = m_tunneling_type.get_vendor_type();
-
-#else
-
- m_tunneling_vendor_type = static_cast<TUint>(m_tunneling_type);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
if (receive_network_id != 0
&& receive_network_id->get_is_valid_data() == true)
{
@@ -141,6 +131,10 @@
void eap_am_type_gsmsim_symbian_c::ConstructL()
{
+ TInt error = m_session.Connect();
+ EAP_TRACE_DEBUG_SYMBIAN((_L("eap_am_type_gsmsim_symbian_c::ConstructL(): - m_session.Connect(), error=%d\n"), error));
+ User::LeaveIfError(error);
+
// Open/create database
EapSimDbUtils::OpenDatabaseL(m_database, m_session, m_index_type, m_index, m_tunneling_type);
@@ -290,9 +284,22 @@
HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
TPtr sqlStatement = buf->Des();
- _LIT(KSQLInsert, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
- sqlStatement.Format(KSQLInsert, &KXKey, &KK_aut, &KK_encr, &KReauthCounter, &KSimTableName,
- &KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+ _LIT(KSQLInsert, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+ sqlStatement.Format(
+ KSQLInsert,
+ &KXKey,
+ &KK_aut,
+ &KK_encr,
+ &KReauthCounter,
+ &KSimTableName,
+ &KServiceType,
+ m_index_type,
+ &KServiceIndex,
+ m_index,
+ &KTunnelingTypeVendorId,
+ m_tunneling_type.get_vendor_id(),
+ &KTunnelingType,
+ m_tunneling_type.get_vendor_type());
// Evaluate view
RDbView view;
@@ -354,7 +361,7 @@
//--------------------------------------------------
-eap_status_e eap_am_type_gsmsim_symbian_c::authentication_finished(
+EAP_FUNC_EXPORT eap_status_e eap_am_type_gsmsim_symbian_c::authentication_finished(
const bool true_when_successful,
const eap_gsmsim_authentication_type_e authentication_type,
const eap_type_gsmsim_identity_type identity_type)
@@ -427,9 +434,22 @@
TPtr sqlStatement = buf->Des();
// Form the query
- _LIT(KSQLQuery, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
- sqlStatement.Format(KSQLQuery, &KXKey, &KK_aut, &KK_encr, &KReauthCounter, &KSimTableName,
- &KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+ _LIT(KSQLQuery, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+ sqlStatement.Format(
+ KSQLQuery,
+ &KXKey,
+ &KK_aut,
+ &KK_encr,
+ &KReauthCounter,
+ &KSimTableName,
+ &KServiceType,
+ m_index_type,
+ &KServiceIndex,
+ m_index,
+ &KTunnelingTypeVendorId,
+ m_tunneling_type.get_vendor_id(),
+ &KTunnelingType,
+ m_tunneling_type.get_vendor_type());
RDbView view;
// Evaluate view
@@ -533,9 +553,19 @@
HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
TPtr sqlStatement = buf->Des();
- _LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
- sqlStatement.Format(KSQLInsert, &KReauthCounter, &KSimTableName,
- &KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+ _LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+ sqlStatement.Format(
+ KSQLInsert,
+ &KReauthCounter,
+ &KSimTableName,
+ &KServiceType,
+ m_index_type,
+ &KServiceIndex,
+ m_index,
+ &KTunnelingTypeVendorId,
+ m_tunneling_type.get_vendor_id(),
+ &KTunnelingType,
+ m_tunneling_type.get_vendor_type());
// Evaluate view
RDbView view;
@@ -633,7 +663,7 @@
{
eap_variable_data_c simulator_sim_algorithm(m_am_tools);
- eap_status_e status = m_partner->read_configure(
+ eap_status_e status = type_configure_read(
cf_str_EAP_GSMSIM_simulator_sim_algorithm.get_field(),
&simulator_sim_algorithm);
if (status == eap_status_ok
@@ -670,7 +700,7 @@
}
{
- eap_status_e status = m_partner->read_configure(
+ eap_status_e status = type_configure_read(
cf_str_EAP_GSMSIM_simulator_sim_ki.get_field(),
&m_simulator_sim_ki);
if (status == eap_status_ok
@@ -719,7 +749,7 @@
// Read Maximum Session Validity Time from the config file
eap_variable_data_c sessionTimeFromFile(m_am_tools);
- eap_status_e status = m_partner->read_configure(
+ eap_status_e status = type_configure_read(
cf_str_EAP_GSMSIM_max_session_validity_time.get_field(),
&sessionTimeFromFile);
@@ -904,9 +934,19 @@
HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
TPtr sqlStatement = buf->Des();
- _LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
- sqlStatement.Format(KSQLInsert, &KPseudonymId, &KSimTableName,
- &KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+ _LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+ sqlStatement.Format(
+ KSQLInsert,
+ &KPseudonymId,
+ &KSimTableName,
+ &KServiceType,
+ m_index_type,
+ &KServiceIndex,
+ m_index,
+ &KTunnelingTypeVendorId,
+ m_tunneling_type.get_vendor_id(),
+ &KTunnelingType,
+ m_tunneling_type.get_vendor_type());
// Evaluate view
RDbView view;
@@ -1001,9 +1041,19 @@
HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
TPtr sqlStatement = buf->Des();
- _LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
- sqlStatement.Format(KSQLInsert, &KReauthId, &KSimTableName,
- &KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+ _LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+ sqlStatement.Format(
+ KSQLInsert,
+ &KReauthId,
+ &KSimTableName,
+ &KServiceType,
+ m_index_type,
+ &KServiceIndex,
+ m_index,
+ &KTunnelingTypeVendorId,
+ m_tunneling_type.get_vendor_id(),
+ &KTunnelingType,
+ m_tunneling_type.get_vendor_type());
// Evaluate view
RDbView view;
@@ -1093,9 +1143,20 @@
HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
TPtr sqlStatement = buf->Des();
- _LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
- sqlStatement.Format(KSQLInsert, &KPreviousIMSI, &KSimTableName,
- &KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+ _LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+ sqlStatement.Format(
+ KSQLInsert,
+ &KPreviousIMSI,
+ &KSimTableName,
+ &KServiceType,
+ m_index_type,
+ &KServiceIndex,
+ m_index,
+ &KTunnelingTypeVendorId,
+ m_tunneling_type.get_vendor_id(),
+ &KTunnelingType,
+ m_tunneling_type.get_vendor_type());
+
// Evaluate view
RDbView view;
@@ -1217,11 +1278,22 @@
// Query all the relevant parameters
- _LIT(KSQLQuery, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
- sqlStatement.Format(KSQLQuery, &KReauthId, &KReauthCounter, &KPseudonymId,
- &KPreviousIMSI, &KSimTableName,
- &KServiceType, m_index_type,
- &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+ _LIT(KSQLQuery, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+ sqlStatement.Format(
+ KSQLQuery,
+ &KReauthId,
+ &KReauthCounter,
+ &KPseudonymId,
+ &KPreviousIMSI,
+ &KSimTableName,
+ &KServiceType,
+ m_index_type,
+ &KServiceIndex,
+ m_index,
+ &KTunnelingTypeVendorId,
+ m_tunneling_type.get_vendor_id(),
+ &KTunnelingType,
+ m_tunneling_type.get_vendor_type());
RDbView view;
// Evaluate view
@@ -1576,7 +1648,7 @@
//--------------------------------------------------
//
-eap_status_e eap_am_type_gsmsim_symbian_c::cancel_SIM_IMSI_or_pseudonym_or_reauthentication_id_query()
+EAP_FUNC_EXPORT eap_status_e eap_am_type_gsmsim_symbian_c::cancel_SIM_IMSI_or_pseudonym_or_reauthentication_id_query()
{
EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
#if defined (USE_EAP_GSMSIM_INTERFACE) && !defined(__WINS__)
@@ -1940,7 +2012,7 @@
//-------------------------------------------------
//
-eap_status_e eap_am_type_gsmsim_symbian_c::cancel_SIM_kc_sres_query()
+EAP_FUNC_EXPORT eap_status_e eap_am_type_gsmsim_symbian_c::cancel_SIM_kc_sres_query()
{
EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -2074,9 +2146,19 @@
HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
TPtr sqlStatement = buf->Des();
- _LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
- sqlStatement.Format(KSQLQueryRow, &unicodeString, &KSimTableName,
- &KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+ _LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+ sqlStatement.Format(
+ KSQLQueryRow,
+ &unicodeString,
+ &KSimTableName,
+ &KServiceType,
+ m_index_type,
+ &KServiceIndex,
+ m_index,
+ &KTunnelingTypeVendorId,
+ m_tunneling_type.get_vendor_id(),
+ &KTunnelingType,
+ m_tunneling_type.get_vendor_type());
RDbView view;
User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
@@ -2461,7 +2543,7 @@
//--------------------------------------------------
//
-eap_status_e eap_am_type_gsmsim_symbian_c::cancel_imsi_from_username_query()
+EAP_FUNC_EXPORT eap_status_e eap_am_type_gsmsim_symbian_c::cancel_imsi_from_username_query()
{
EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -2628,11 +2710,20 @@
TPtr sqlStatement = buf->Des();
// Query all the relevant parameters
- _LIT(KSQLQuery, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
- sqlStatement.Format(KSQLQuery, &cf_str_EAP_GSMSIM_max_session_validity_time_literal,
- &KGSMSIMLastFullAuthTime, &KSimTableName,
- &KServiceType, m_index_type,
- &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+ _LIT(KSQLQuery, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+ sqlStatement.Format(
+ KSQLQuery,
+ &cf_str_EAP_GSMSIM_max_session_validity_time_literal,
+ &KGSMSIMLastFullAuthTime,
+ &KSimTableName,
+ &KServiceType,
+ m_index_type,
+ &KServiceIndex,
+ m_index,
+ &KTunnelingTypeVendorId,
+ m_tunneling_type.get_vendor_id(),
+ &KTunnelingType,
+ m_tunneling_type.get_vendor_type());
RDbView view;
// Evaluate view
@@ -2750,10 +2841,19 @@
TPtr sqlStatement = buf->Des();
// Query all the relevant parameters
- _LIT(KSQLQuery, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
- sqlStatement.Format(KSQLQuery, &KGSMSIMLastFullAuthTime, &KSimTableName,
- &KServiceType, m_index_type,
- &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+ _LIT(KSQLQuery, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+ sqlStatement.Format(
+ KSQLQuery,
+ &KGSMSIMLastFullAuthTime,
+ &KSimTableName,
+ &KServiceType,
+ m_index_type,
+ &KServiceIndex,
+ m_index,
+ &KTunnelingTypeVendorId,
+ m_tunneling_type.get_vendor_id(),
+ &KTunnelingType,
+ m_tunneling_type.get_vendor_type());
RDbView view;
// Evaluate view