# HG changeset patch
# User hgs
# Date 1276844210 -10800
# Node ID 7d966ab5304ad6bf3698284d6992b83fc709ce0d
# Parent a0fdcd0e4c567218b9cffb3b334eb86e9afad2c7
201024
diff -r a0fdcd0e4c56 -r 7d966ab5304a package_definition.xml
--- a/package_definition.xml Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_unload_drivers.h
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_unload_drivers.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/inc/core_operation_unload_drivers.h Fri Jun 18 09:56:50 2010 +0300
@@ -21,7 +21,7 @@
#include "core_operation_base.h"
-const u32_t DELAY_FOR_AGENT = 100000; // 0,1 seconds
+const u32_t DELAY_FOR_AGENT = 500000; // 0,5 seconds
class core_server_c;
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_delete_ts.cpp
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_delete_ts.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_delete_ts.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 8 %
+* %version: 9 %
*/
#include "core_operation_delete_ts.h"
@@ -121,6 +121,7 @@
* Delete the virtual traffic stream.
*/
virtual_ts_iter.remove();
+ virtual_stream = NULL;
/**
* Locate the actual traffic stream based on the TID.
@@ -279,6 +280,7 @@
* Delete the actual traffic stream.
*/
ts_iter.remove();
+ stream = NULL;
if( direction == core_traffic_stream_direction_uplink ||
direction == core_traffic_stream_direction_bidirectional )
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_handle_delete_ts.cpp
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_handle_delete_ts.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_operation_handle_delete_ts.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 9 %
+* %version: 10 %
*/
#include "core_operation_handle_delete_ts.h"
@@ -125,6 +125,7 @@
server_m->get_wpx_adaptation_instance().handle_ts_delete(
tid_m, user_priority );
ts_iter.remove();
+ stream = NULL;
if( direction == core_traffic_stream_direction_uplink ||
direction == core_traffic_stream_direction_bidirectional )
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_sub_operation_roam_update_ts.cpp
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_sub_operation_roam_update_ts.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_sub_operation_roam_update_ts.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 12 %
+* %version: 13 %
*/
#include "core_sub_operation_roam_update_ts.h"
@@ -154,14 +154,25 @@
core_virtual_traffic_stream_c* virtual_iter = virtual_ts_iter.first();
while( virtual_iter )
{
- if( is_ac_required[virtual_iter->access_class()] &&
- virtual_iter->status() != core_traffic_stream_status_active )
+ if( virtual_iter->status() != core_traffic_stream_status_active )
{
- DEBUG1( "core_sub_operation_roam_update_ts_c::next_state() - virtual traffic stream with ID %u needs to created",
- virtual_iter->id() );
+ if( is_ac_required[virtual_iter->access_class()] )
+ {
+ DEBUG1( "core_sub_operation_roam_update_ts_c::next_state() - virtual traffic stream with ID %u needs to created",
+ virtual_iter->id() );
- virtual_stream_list_m.add_traffic_stream(
- *virtual_iter );
+ virtual_stream_list_m.add_traffic_stream(
+ *virtual_iter );
+ }
+ else
+ {
+ /**
+ * Send a status update to all affected virtual traffic streams.
+ */
+ set_virtual_traffic_stream_inactive_by_id(
+ virtual_iter->id(),
+ core_traffic_stream_status_inactive_not_required );
+ }
}
virtual_iter = virtual_ts_iter.next();
@@ -188,7 +199,7 @@
*/
set_virtual_traffic_stream_inactive_by_tid(
iter->tid(),
- core_traffic_stream_status_inactive_not_required );
+ core_traffic_stream_status_inactive_not_required );
/**
* Delete the actual traffic stream.
@@ -196,6 +207,7 @@
server_m->get_wpx_adaptation_instance().handle_ts_delete(
iter->tid(), iter->user_priority() );
ts_iter.remove();
+ iter = NULL;
}
else if( iter->status() == core_traffic_stream_status_undefined )
{
@@ -222,6 +234,7 @@
server_m->get_wpx_adaptation_instance().handle_ts_delete(
iter->tid(), iter->user_priority() );
ts_iter.remove();
+ iter = NULL;
}
iter = ts_iter.next();
@@ -301,6 +314,7 @@
* Move to the next entry.
*/
stream_iter_m.remove();
+ iter = NULL;
(void)stream_iter_m.first();
return goto_state( core_state_recreate_next );
@@ -439,7 +453,9 @@
* Move to the next entry.
*/
stream_iter_m.remove();
+ iter = NULL;
virtual_stream_iter_m.remove();
+ virtual_iter = NULL;
(void)virtual_stream_iter_m.first();
return goto_state( core_state_recreate_virtual_next );
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_traffic_stream_list_iter.cpp
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_traffic_stream_list_iter.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_traffic_stream_list_iter.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: %
+* %version: 4 %
*/
#include "core_traffic_stream_list_iter.h"
@@ -85,5 +85,15 @@
//
core_error_e core_traffic_stream_list_iter_c::remove()
{
- return iter_m.remove();
+ core_traffic_stream_list_c::entry_s* entry = iter_m.current();
+ core_error_e ret = iter_m.remove();
+ if( ret == core_error_ok &&
+ entry )
+ {
+ delete entry->traffic_stream;
+ delete entry;
+ entry = NULL;
+ }
+
+ return ret;
}
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_virtual_traffic_stream_list_iter.cpp
--- a/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_virtual_traffic_stream_list_iter.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_common/wlanengine_common_3.1/src/core_virtual_traffic_stream_list_iter.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 1 %
+* %version: 2 %
*/
#include "core_virtual_traffic_stream_list_iter.h"
@@ -84,5 +84,15 @@
//
core_error_e core_virtual_traffic_stream_list_iter_c::remove()
{
- return iter_m.remove();
+ core_virtual_traffic_stream_list_c::entry_s* entry = iter_m.current();
+ core_error_e ret = iter_m.remove();
+ if( ret == core_error_ok &&
+ entry )
+ {
+ delete entry->traffic_stream;
+ delete entry;
+ entry = NULL;
+ }
+
+ return ret;
}
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/bwinscw/wlmserveru.def
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/bwinscw/wlmserveru.def Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/bwinscw/wlmserveru.def Fri Jun 18 09:56:50 2010 +0300
@@ -1,7 +1,7 @@
EXPORTS
?CancelCreateTrafficStream@RWLMServer@@QAEXXZ @ 1 NONAME ; void RWLMServer::CancelCreateTrafficStream(void)
?GetScanResults@RWLMServer@@QAEXAAVScanList@@ABVTDesC8@@AAHAAIAAVTRequestStatus@@@Z @ 2 NONAME ; void RWLMServer::GetScanResults(class ScanList &, class TDesC8 const &, int &, unsigned int &, class TRequestStatus &)
- ?RunProtectedSetup@RWLMServer@@QAEXAAVTRequestStatus@@KAAVTDes8@@@Z @ 3 NONAME ; void RWLMServer::RunProtectedSetup(class TRequestStatus &, unsigned long, class TDes8 &)
+ ?RunProtectedSetup@RWLMServer@@QAEXAAVTRequestStatus@@ABV?$TBuf8@$0CA@@@ABV?$TBuf8@$07@@AAVTDes8@@@Z @ 3 NONAME ; void RWLMServer::RunProtectedSetup(class TRequestStatus &, class TBuf8<32> const &, class TBuf8<8> const &, class TDes8 &)
?RemoveIapSsidList@RWLMServer@@QAEHI@Z @ 4 NONAME ; int RWLMServer::RemoveIapSsidList(unsigned int)
?ClearPacketStatistics@RWLMServer@@QAEXXZ @ 5 NONAME ; void RWLMServer::ClearPacketStatistics(void)
?AddIapSsidList@RWLMServer@@QAEHIABV?$CArrayFixFlat@V?$TBuf8@$0CA@@@@@@Z @ 6 NONAME ; int RWLMServer::AddIapSsidList(unsigned int, class CArrayFixFlat > const &)
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/eabi/wlmserveru.def
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/eabi/wlmserveru.def Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/eabi/wlmserveru.def Fri Jun 18 09:56:50 2010 +0300
@@ -19,7 +19,7 @@
_ZN10RWLMServer17ActivateNotifiesLER10MWLMNotifym @ 18 NONAME
_ZN10RWLMServer17GetConnectionRCPIERl @ 19 NONAME
_ZN10RWLMServer17RemoveIapSsidListEj @ 20 NONAME
- _ZN10RWLMServer17RunProtectedSetupER14TRequestStatusmR5TDes8 @ 21 NONAME
+ _ZN10RWLMServer17RunProtectedSetupER14TRequestStatusRK5TBuf8ILi32EERKS2_ILi8EER5TDes8 @ 21 NONAME
_ZN10RWLMServer18CancelDirectedRoamEv @ 22 NONAME
_ZN10RWLMServer18ConfigureMulticastEjRK11TMacAddress @ 23 NONAME
_ZN10RWLMServer18GetAcTrafficStatusER11TFixedArrayI19TWlmAcTrafficStatusLi4EE @ 24 NONAME
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/group/wlmserversrv.mmh
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/group/wlmserversrv.mmh Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/group/wlmserversrv.mmh Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 10 %
+* %version: 11 %
*/
TARGETTYPE dll
@@ -144,6 +144,7 @@
SOURCE wlanbgscanstates.cpp
SOURCE wlantimerservices.cpp
SOURCE wlantimer.cpp
+SOURCE wlanticktimer.cpp
USERINCLUDE ../inc
USERINCLUDE ../../../../inc
@@ -163,5 +164,6 @@
LIBRARY wlandbif.lib
LIBRARY featmgr.lib
LIBRARY commsdat.lib
+LIBRARY hal.lib
STATICLIBRARY wlanscanlist.lib
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/rwlmserver.h
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/rwlmserver.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/rwlmserver.h Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 25 %
+* %version: 27 %
*/
#ifndef RWLMSERVER_H
@@ -365,12 +365,15 @@
/**
* Run Protected Setup.
* @param aStatus Status of the calling active object.
- * @param aId IAP ID of network which user has selected to be configured.
+ * @param aSsid SSID of the network to configure.
+ * @param aWpsPin PIN value to be used. "00000000" (string of eight zeros)
+ * if push button method is used.
* @param Results of a successful Protected Setup operation.
*/
IMPORT_C void RunProtectedSetup(
TRequestStatus& aStatus,
- TUint32 aId,
+ const TWlanSsid& aSsid,
+ const TWlanWpsPin& aWspPin,
TDes8& aCredentials );
/**
@@ -592,6 +595,13 @@
/** Buffer for storing BSSID to roam to. */
TPckgBuf iRoamBssidPckg;
+
+ /** Buffer for storing SSID for Protected setup. */
+ TPckgBuf iWlanSsidPckg;
+
+ /** Buffer for storing pincode for Protected setup. */
+ TPckgBuf iWlanWpsPinPckg;
+
};
#endif // RWLMSERVER_H
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanbgscan.h
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanbgscan.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanbgscan.h Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 11 %
+* %version: 12 %
*/
#ifndef WLANBGSCAN_H
@@ -93,7 +93,7 @@
*
* @param aState New WLAN state
*/
- void WlanSetBgScanState( const MWlanBgScanProvider::TWlanBgScanState &aState );
+ void SetBgScanState( const MWlanBgScanProvider::TWlanBgScanState &aState );
/**
* From MWlanBgScanProvider.
@@ -114,20 +114,6 @@
void NotifyChangedSettings( MWlanBgScanProvider::TWlanBgScanSettings& aSettings );
/**
- * From MAwsBgScanProvider.
- * Set new background scan interval.
- * Asynchronous method to set new background scan interval, executed in
- * AWS thread context.
- *
- * @since S60 v5.2
- * @param aNewInterval new interval to be taken into use
- * @param aStatus Status of the calling active object. On successful
- * completion contains KErrNone, otherwise one of the
- * system-wide error codes.
- */
- void SetInterval( TUint32 aNewInterval, TRequestStatus& aReportStatus );
-
- /**
* From MWlanTimerServiceCallback.
* OnTimeout.
* Requested time has elapsed.
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanconversionutil.h
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanconversionutil.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanconversionutil.h Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 34 %
+* %version: 35 %
*/
#ifndef WLANCONVERSIONUTIL_H
@@ -83,6 +83,16 @@
static void ConvertSSID(
TSSID& aAmSSID,
const core_ssid_s& aCoreSSID );
+
+ /**
+ * ConvertWpaPreSharedKey
+ * @since Series 60 3.0
+ * @param aWpaPreSharedKey (OUT)
+ * @param aWspPin (IN)
+ */
+ static void ConvertWpaPreSharedKey(
+ core_wpa_preshared_key_s& aWpaPreSharedKey,
+ const TDesC8& aWspPin );
/**
* ConvertScanRate
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlandevicesettings.h
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlandevicesettings.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlandevicesettings.h Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 23 %
+* %version: 24 %
*/
#ifndef WLANDEVICESETTINGS_H
@@ -88,7 +88,7 @@
const TUint32 KWlanDefaultBssLostRoamNextIntervalFactor = 1;
const TUint32 KWlanDefaultBssLostRoamNextIntervalAddition = 500000; // 500 ms
const TUint32 KWlanDefaultBssLostRoamMaxTriesToFindNw = 5;
-const TUint32 KWlanDefaultTrafficStreamCreationTimeout = 1000000; // 1 minute
+const TUint32 KWlanDefaultTrafficStreamCreationTimeout = 1000000; // 1 second
const TUint32 KWlanDefaultBeaconLostThreshold = 15;
const TUint32 KWlanDefaultBtBeaconLostThreshold = 20;
const TUint32 KWlanDefaultTxFailThreshold = 4;
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanmgmtimpl.h
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanmgmtimpl.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanmgmtimpl.h Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 21 %
+* %version: 22 %
*/
#ifndef WLANMGMTIMPL_H
@@ -307,15 +307,20 @@
/**
* (From MWlanMgmtInterface)
* Start Protected Setup.
+ *
* @param aStatus Status of the calling active object. On successful
* completion contains KErrNone, otherwise one of the
* system-wide error codes.
- * @param aId Service ID of network which user has selected to be configured.
+ * @param aSsid SSID of the network to configure.
+ * @param aWpsPin PIN value to be used. "00000000" (string of eight zeros)
+ * if push button method is used.
* @param aCredentials Results of a successful Protected Setup operation.
- */
+ * @sa \link psetup Protected Setup-specific error codes \endlink.
+ */
virtual void RunProtectedSetup(
TRequestStatus& aStatus,
- TUint32 aId,
+ const TWlanSsid& aSsid,
+ const TWlanWpsPin& aWpsPin,
CArrayFixSeg& aCredentials );
/**
@@ -765,7 +770,8 @@
CProtectedSetupRequest(
CWlanMgmtImpl& aCallback,
RWLMServer& aServer,
- TUint32 aId,
+ const TWlanSsid& aSsid,
+ const TWlanWpsPin& aWpsPin,
CArrayFixSeg& aCredentials );
/**
@@ -811,8 +817,11 @@
// Interface to RWLMServer
RWLMServer& iServer;
- // Service ID of network which user has selected to be configured.
- TUint32 iServiceId;
+ // SSID of the network to configure.
+ TWlanSsid iSsid;
+
+ // PIN value to be used.
+ TWlanWpsPin iWpsPin;
// Results of a successful Protected Setup operation.
CArrayFixSeg& iCredentials;
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanscanproviderinterface.h
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanscanproviderinterface.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanscanproviderinterface.h Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 9 %
+* %version: 10 %
*/
@@ -137,7 +137,7 @@
*
* @param aState New WLAN state
*/
- virtual void WlanSetBgScanState( const TWlanBgScanState &aState ) = 0;
+ virtual void SetBgScanState( const TWlanBgScanState &aState ) = 0;
/**
* Whether background scan is enabled.
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanticktimer.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlanticktimer.h Fri Jun 18 09:56:50 2010 +0300
@@ -0,0 +1,139 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* This class implements a system tick based timer service.
+*
+*/
+
+/*
+* %version: 1 %
+*/
+
+#ifndef WLANTICKTIMER_H
+#define WLANTICKTIMER_H
+
+#include
+
+/**
+ * CWlanTickTimer class.
+ *
+ * Class providing timer services. The underlaying implementation relies
+ * on RTimer. Therefore this module has the same limitations as RTimer.
+ *
+ * @lib wlmserversrv.dll
+ * @since S60 v5.2
+ */
+
+NONSHARABLE_CLASS( CWlanTickTimer ) : public CActive
+ {
+
+public: // CWlanTickTimer public methods
+
+ /**
+ * Static constructor.
+ * @param aTimerExpiredCB Callback for indicating timer expiry.
+ * @param aTimerCancelledCB Callback for indicating timer cancellation.
+ * @param aTimerErrorCB Callback for indicating timer error.
+ */
+ static CWlanTickTimer* NewL(
+ const TCallBack& aTimerExpiredCB,
+ const TCallBack& aTimerCancelledCB,
+ const TCallBack& aTimerErrorCB );
+
+ /**
+ * Destructor.
+ */
+ ~CWlanTickTimer();
+
+ /**
+ * Requests an event after the specified interval.
+ * @param The time interval in system ticks.
+ */
+ void After(
+ TUint aTicks );
+
+private: // CWlanTickTimer private methods
+
+ /**
+ * C++ constructor.
+ * @param aTimerExpiredCB Callback for indicating timer expiry.
+ * @param aTimerCancelledCB Callback for indicating timer cancellation.
+ * @param aTimerErrorCB Callback for indicating timer error.
+ */
+ CWlanTickTimer(
+ const TCallBack& aTimerExpiredCB,
+ const TCallBack& aTimerCancelledCB,
+ const TCallBack& aTimerErrorCB );
+
+ /**
+ * Symbian 2nd phase constructor.
+ */
+ void ConstructL();
+
+private: // From CActive
+
+ /**
+ * From CActive.
+ * Called by the active object framework when the request has been completed.
+ */
+ void RunL();
+
+ /**
+ * From CActive.
+ * Called by the framework if RunL leaves.
+ *
+ * @param aError The error code RunL leaved with.
+ * @return KErrNone if leave was handled, one of the system-wide error codes otherwise.
+ */
+ TInt RunError(
+ TInt aError );
+
+ /**
+ * From CActive.
+ * Called by the framework when Cancel() has been called.
+ */
+ void DoCancel();
+
+private: // CWlanTickTimer private data
+
+ /**
+ * Handle to RTimer.
+ */
+ RTimer iTimer;
+
+ /**
+ * TimerExpiredCB.
+ * Registered callback method that is called, when the timer
+ * expires. This is set when CWlanTickTimer instance is created.
+ */
+ TCallBack iTimerExpiredCB;
+
+ /**
+ * TimerCancelledCB.
+ * Registered callback method that is called, when the timer
+ * is cancelled by an external event (i.e. cancellation is
+ * not requested by the client). This is set when CWlanTickTimer
+ * instance is created.
+ */
+ TCallBack iTimerCancelledCB;
+
+ /**
+ * TimerErrorCB.
+ * Registered callback method that is called, when there is
+ * a timer error. This is set when CWlanTickTimer instance is created.
+ */
+ TCallBack iTimerErrorCB;
+ };
+
+#endif // WLANTICKTIMER_H
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmplatformdata.h
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmplatformdata.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmplatformdata.h Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 13 %
+* %version: 14 %
*/
#ifndef WLMPLATFORMDATA_H
@@ -127,11 +127,9 @@
/**
* Method for publishing WLAN on/off state.
- * @since S60^4
* @param aWlanState WLAN state to be published.
- * @return Symbian error code.
*/
- TInt PublishWlanOnOff( TPSWlanOnOff aWlanState );
+ void PublishWlanOnOff( TPSWlanOnOff aWlanState );
private: // Definitions
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmserver.h
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmserver.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmserver.h Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 56 %
+* %version: 57 %
*/
#ifndef WLMSERVER_H
@@ -43,6 +43,7 @@
class CWlmDriverIf;
class CWlanSsidListDb;
class CWlanTimerServices;
+class CWlanTickTimer;
/**
* Command Ids to be used un the asynchronous core service requests
@@ -62,6 +63,9 @@
/** UID for WLAN Power Save Test Notifier */
const TUid KUidWlanPowerSaveTestNote = { 0x101F6D4F };
+/** Multiplier for converting seconds into microseconds */
+const TUint KWlanSecsToMicrosecsMultiplier( 1000000 );
+
/**
* The server for WLAN services. Counterpart of RWLMServer.
*
@@ -90,7 +94,7 @@
TAny* iParam1;
TAny* iParam2;
TAny* iParam3;
- TTime* iTime;
+ TUint* iTime;
SRequestMapEntry() :
iRequestId( 0 ),
@@ -907,7 +911,21 @@
* @return error code
*/
static TInt ScanSchedulingTimerExpired( TAny* aThisPtr );
-
+
+ /**
+ * Method called by the scan scheduling timer when it expires.
+ * @param aThisPtr Pointer to the server instance.
+ * @return error code
+ */
+ static TInt ScanSchedulingTimerCanceled( TAny* aThisPtr );
+
+ /**
+ * A callback method that does absolutely nothing.
+ * @param aThisPtr Pointer to the server instance.
+ * @return error code
+ */
+ static TInt EmptyCb( TAny* aThisPtr );
+
/**
* Handles the conversion of IAP data list.
* @param aCoreIapDataList Converted IAP data list.
@@ -949,11 +967,11 @@
/**
* Updates the scan scheduling timer.
- * @param aScanTime specifies when the scan should be started.
+ * @param aScanTime specifies when the scan should be started in system ticks.
* @param aTriggeringRequestId the id of that request which updates the timer.
*/
void UpdateScanSchedulingTimer(
- TTime aScantime,
+ TUint aScantime,
TUint aTriggeringRequestId );
/**
@@ -1091,7 +1109,7 @@
* @param aDelay Number of seconds to add to current moment in time.
* @return Calculated time.
*/
- inline TTime CalculateScanStartTime(
+ inline TUint CalculateScanStartTime(
const TInt aDelay ) const;
/**
@@ -1229,7 +1247,7 @@
* Timer creating periodic expirations.
* Used for starting scheduled scans
*/
- CPeriodic* iScanSchedulingTimer;
+ CWlanTickTimer* iScanSchedulingTimer;
/**
* Cache for scanresults etc.
@@ -1332,12 +1350,17 @@
* EAPOL callback handler in core. Not owned by this pointer.
*/
abs_wlan_eapol_callback_c* iEapolHandler;
-
+
+ /**
+ * The amount of microseconds per a system tick.
+ */
+ TInt iSystemTickPeriod;
+
/**
- * Time when the scan scheduling timer is set to expire.
+ * Time in system ticks when the scan scheduling timer is set to expire.
*/
- TTime iScanSchedulingTimerExpiration;
-
+ TUint iScanSchedulingTimerExpiration;
+
/**
* Request id to that request in the iRequestMap which has set the scan scheduling timer.
*/
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmserver.inl
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmserver.inl Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmserver.inl Fri Jun 18 09:56:50 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -15,6 +15,9 @@
*
*/
+/*
+* %version: 18 %
+*/
#include "am_debug.h"
@@ -129,15 +132,13 @@
// CWlmServer::CalculateScanStartTime
// ---------------------------------------------------------
//
-inline TTime CWlmServer::CalculateScanStartTime(
+inline TUint CWlmServer::CalculateScanStartTime(
const TInt aDelay ) const
{
- TTime scanTime;
- scanTime.UniversalTime();
- TTimeIntervalSeconds delay( aDelay );
- scanTime += delay;
+ TUint ticks(
+ aDelay * KWlanSecsToMicrosecsMultiplier / iSystemTickPeriod );
- return scanTime;
+ return User::TickCount() + ticks;
}
// ---------------------------------------------------------
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmsystemnotify.h
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmsystemnotify.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/inc/wlmsystemnotify.h Fri Jun 18 09:56:50 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/rwlmserver.cpp
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/rwlmserver.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/rwlmserver.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 28 %
+* %version: 30 %
*/
#include
@@ -541,13 +541,18 @@
//
EXPORT_C void RWLMServer::RunProtectedSetup(
TRequestStatus& aStatus,
- TUint32 aId,
+ const TWlanSsid& aSsid,
+ const TWlanWpsPin& aWspPin,
TDes8& aCredentials )
{
DEBUG( "RWLMServer::RunProtectedSetup(TRequestStatus)" );
aStatus = KRequestPending;
- TIpcArgs params( aId, &aCredentials );
+
+ iWlanSsidPckg = aSsid;
+ iWlanWpsPinPckg = aWspPin;
+
+ TIpcArgs params( &iWlanSsidPckg, &iWlanWpsPinPckg, &aCredentials );
// Send the command
SendReceive( ERunProtectedSetup, params, aStatus );
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanbgscan.cpp
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanbgscan.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanbgscan.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 17 %
+* %version: 18 %
*/
#include
@@ -159,9 +159,9 @@
// CWlanBgScan::WlanSetBgScanState
// ---------------------------------------------------------------------------
//
-void CWlanBgScan::WlanSetBgScanState( const MWlanBgScanProvider::TWlanBgScanState &aState )
+void CWlanBgScan::SetBgScanState( const MWlanBgScanProvider::TWlanBgScanState &aState )
{
- DEBUG2( "CWlanBgScan::WlanSetBgScanState() - old state: %u, new state: %u", iWlanBgScanState, aState );
+ DEBUG2( "CWlanBgScan::SetBgScanState() - old state: %u, new state: %u", iWlanBgScanState, aState );
// store state
iWlanBgScanState = aState;
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanconversionutil.cpp
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanconversionutil.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanconversionutil.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 86 %
+* %version: 87 %
*/
#include
@@ -104,6 +104,21 @@
}
// ---------------------------------------------------------
+// TWlanConversionUtil::ConvertWpaPreSharedKey()
+// ---------------------------------------------------------
+//
+void TWlanConversionUtil::ConvertWpaPreSharedKey(
+ core_wpa_preshared_key_s& aWpaPreSharedKey,
+ const TDesC8& aWspPin )
+ {
+ Mem::Copy(
+ aWpaPreSharedKey.key_data,
+ aWspPin.Ptr(),
+ aWspPin.Length() );
+ aWpaPreSharedKey.key_length = aWspPin.Length();
+ }
+
+// ---------------------------------------------------------
// TWlanConversionUtil::ConvertScanRate()
// ---------------------------------------------------------
//
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtframehandler.cpp
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtframehandler.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtframehandler.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -15,6 +15,9 @@
*
*/
+/*
+* %version: 11 %
+*/
// INCLUDE FILES
#include
@@ -149,7 +152,8 @@
{
DEBUG( "CWlanMgmtFrameHandler::RunL() iDataBlock is not NULL" );
TDataBuffer* buffer = NULL;
- while( iDataBlock->GetNextRxDataBuffer( buffer ) )
+ TDataBuffer* frameToFree = NULL;
+ while( ( buffer = iServiceProvider.GetRxFrame( frameToFree ) ) != NULL )
{
DEBUG1( "EAPOL packet received, length=%d",
buffer->GetLength() );
@@ -159,6 +163,8 @@
buffer->GetLength(),
buffer->GetBuffer(),
buffer->Rcpi() );
+
+ frameToFree = buffer;
}
}
// Wait for next packets.
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtimpl.cpp
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtimpl.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlanmgmtimpl.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 31 %
+* %version: 32 %
*/
// INCLUDE FILES
@@ -530,7 +530,8 @@
//
void CWlanMgmtImpl::RunProtectedSetup(
TRequestStatus& aStatus,
- TUint32 aId,
+ const TWlanSsid& aSsid,
+ const TWlanWpsPin& aWpsPin,
CArrayFixSeg& aCredentials )
{
TraceDump( INFO_LEVEL, ( _L( "CWlanMgmtImpl::RunProtectedSetup()" ) ) );
@@ -540,7 +541,7 @@
aStatus = KRequestPending;
iPendingProtectedSetupStatus = &aStatus;
- iProtectedSetupRequest = new CProtectedSetupRequest( *this, iServer, aId, aCredentials );
+ iProtectedSetupRequest = new CProtectedSetupRequest( *this, iServer, aSsid, aWpsPin, aCredentials );
if ( !iProtectedSetupRequest )
{
User::RequestComplete( iPendingProtectedSetupStatus, KErrNoMemory );
@@ -1140,12 +1141,14 @@
CProtectedSetupRequest::CProtectedSetupRequest(
CWlanMgmtImpl& aCallback,
RWLMServer& aServer,
- TUint32 aId,
+ const TWlanSsid& aSsid,
+ const TWlanWpsPin& aWpsPin,
CArrayFixSeg& aCredentials ) :
CActive( CActive::EPriorityStandard ),
iCallback( aCallback ),
iServer( aServer ),
- iServiceId( aId ),
+ iSsid( aSsid ),
+ iWpsPin( aWpsPin ),
iCredentials ( aCredentials ),
iCredentialsBuf( iCredentialsStorage )
{
@@ -1168,7 +1171,7 @@
void CProtectedSetupRequest::IssueRequest()
{
TraceDump( INFO_LEVEL, ( _L( "CProtectedSetupRequest::IssueRequest()" ) ) );
- iServer.RunProtectedSetup( iStatus, iServiceId, iCredentialsBuf );
+ iServer.RunProtectedSetup( iStatus, iSsid, iWpsPin, iCredentialsBuf );
SetActive();
}
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmplatformdata.cpp
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmplatformdata.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmplatformdata.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 13 %
+* %version: 14 %
*/
// INCLUDE FILES
@@ -131,6 +131,8 @@
User::LeaveIfError( iPsOnOffState.Attach( KPSUidWlan,
KPSWlanOnOffState, EOwnerThread ) );
+ // Publish initial value for WLAN on/off as WLAN OFF
+ PublishWlanOnOff( EPSWlanOff );
}
// ---------------------------------------------------------
@@ -160,6 +162,8 @@
RProperty::Delete( KPSUidWlan, KPSWlanMacAddress );
iPsBgScanInterval.Close();
RProperty::Delete( KPSUidWlan, KPSWlanBgScanInterval );
+ iPsOnOffState.Close();
+ RProperty::Delete( KPSUidWlan, KPSWlanOnOffState );
delete iPropertySystemState;
delete iBtConnections;
delete iEmergencyCall;
@@ -491,31 +495,20 @@
//
void CWlmPlatformData::NotifyWlanOnOffObserver()
{
- DEBUG( "CWlmPlatformData::NotifyWlanOnOffObserver()" );
-
- // Read WLAN master switch
- TInt wlanOn( EFalse );
- iWlanOnOff->Get( wlanOn );
-
- // Read WLAN force disable switch
- TInt wlanForceDisable( EFalse );
- iWlanForceDisable->Get( wlanForceDisable );
-
- DEBUG3( " WlanOnOff: %d, WlanForceDisable: %d, NotifiedToObserver: %d",
- wlanOn, wlanForceDisable, iNotifiedWlanState );
+ DEBUG1( "CWlmPlatformData::NotifyWlanOnOffObserver() - last notified state=%d",
+ iNotifiedWlanState );
// Note that the observer is only notified if the
// state really changes
- // If WLAN is set ON and it is not forcibly disabled
- if( wlanOn && // WLAN set ON
- wlanForceDisable == EFalse && // WLAN force disable not set
+ // If WLAN is set ON
+ if( GetWlanOnOffState() == EWlanOn && // WLAN set ON
iNotifiedWlanState != CWlmPlatformData::EWlanNotifiedOn ) // WLAN ON not notified yet
{
// Notify observer that WLAN is set ON
iCallback.WlanOn();
iNotifiedWlanState = CWlmPlatformData::EWlanNotifiedOn;
- (void)PublishWlanOnOff( EPSWlanOn );
+ PublishWlanOnOff( EPSWlanOn );
// Note! P&S write operation return value is not checked
DEBUG( "CWlmPlatformData::NotifyWlanOnOffObserver() - WLAN ON notified, P&S updated" );
}
@@ -525,7 +518,7 @@
// Notify observer that WLAN is set OFF
iCallback.WlanOff();
iNotifiedWlanState = CWlmPlatformData::EWlanNotifiedOff;
- (void)PublishWlanOnOff( EPSWlanOff );
+ PublishWlanOnOff( EPSWlanOff );
// Note! P&S write operation return value is not checked
DEBUG( "CWlmPlatformData::NotifyWlanOnOffObserver() - WLAN OFF notified, P&S updated" );
}
@@ -536,10 +529,17 @@
// Status : Draft
// ---------------------------------------------------------
//
-TInt CWlmPlatformData::PublishWlanOnOff( TPSWlanOnOff aWlanState )
+void CWlmPlatformData::PublishWlanOnOff( TPSWlanOnOff aWlanState )
{
DEBUG1( "CWlmPlatformData::PublishWlanOnOff( wlanState = %d )",
aWlanState );
- return iPsOnOffState.Set( aWlanState );
+ TInt err( KErrNone );
+ err = iPsOnOffState.Set( aWlanState );
+
+ if( err != KErrNone )
+ {
+ DEBUG1( "CWlmPlatformData::PublishWlanOnOff() - ERROR: update failed, err=%d",
+ err );
+ }
}
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmserver.cpp
--- a/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmserver.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanengine/wlan_symbian/wlanengine_symbian_3.1/src/wlmserver.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 106 %
+* %version: 109 %
*/
#include
@@ -24,6 +24,7 @@
#include
#include
#include // for feature definitions
+#include
#include "wlmserver.h"
#include "wlmdriverif.h"
@@ -38,6 +39,7 @@
#include "wlandevicesettingsinternalcrkeys.h"
#include "wlanbgscan.h"
#include "wlantimerservices.h"
+#include "wlanticktimer.h"
#include "am_debug.h"
/** Panic codes for WlanEngine */
@@ -89,9 +91,6 @@
CWlmServer::EWlanStaticFeature802dot11k |
CWlmServer::EWlanStaticFeature802dot11n;
-/** Multiplier for converting seconds into microseconds */
-const TUint KWlanSecsToMicrosecsMultiplier( 1000000 );
-
/** Minimum value for aggressive background scan interval, in seconds */
const TUint KWlanAggressiveBgScanMinInterval( 1 );
@@ -141,6 +140,7 @@
iIsStartupComplete( EFalse ),
iEapolClient( NULL ),
iEapolHandler( NULL ),
+ iSystemTickPeriod( 0 ),
iScanSchedulingTimerExpiration( 0 ),
iRequestTriggeringScanning( 0 ),
iCoreHandlingScanRequest( EFalse ),
@@ -164,6 +164,12 @@
User::LeaveIfError( User::RenameThread( KWLMDataServerName ) );
StartL( KWLMDataServerName );
+ HAL::Get( HAL::ESystemTickPeriod, iSystemTickPeriod );
+ DEBUG1( "CWlmServer::ConstructL() - system tick period is %d",
+ iSystemTickPeriod );
+ DEBUG1( "CWlmServer::ConstructL() - current system tick count is %u",
+ User::TickCount( ) );
+
// Consult FeatureManager whether startup is allowed
FeatureManager::InitializeLibL();
if( !FeatureManager::FeatureSupported( KFeatureIdProtocolWlan ) )
@@ -220,7 +226,13 @@
// Create scan timer
DEBUG( "CWlmServer::ConstructL() - create backgroundscan timer" );
- iScanSchedulingTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+ TCallBack expiredCb( ScanSchedulingTimerExpired, this );
+ TCallBack canceledCb( ScanSchedulingTimerCanceled, this );
+ TCallBack emptyCb( EmptyCb, NULL );
+ iScanSchedulingTimer = CWlanTickTimer::NewL(
+ expiredCb,
+ canceledCb,
+ emptyCb );
// Create scan cache
iCache = CWlanScanResultCache::NewL();
@@ -469,7 +481,7 @@
if( wlanState != EWlanOn )
{
// WLAN is OFF
- DEBUG1( "CWlmServer::Connect() refused due to WLAN is OFF (%d)",
+ DEBUG1( "CWlmServer::Connect() - refused due to WLAN is OFF (%d)",
wlanState );
// WLAN state enumerations map one to one to WLAN error code
aMessage.Complete( wlanState );
@@ -1100,15 +1112,15 @@
return;
}
- TTime* scanTime( NULL );
+ TUint* scanTime( NULL );
if( scanScheduling.maxDelay != KWlmInfiniteScanDelay )
{
- scanTime = new TTime(
- CalculateScanStartTime( scanScheduling.maxDelay ).Int64() );
+ scanTime = new TUint(
+ CalculateScanStartTime( scanScheduling.maxDelay ) );
if( !scanTime )
{
- DEBUG( "CWlmServer::GetScanResult() - unable to instantiate TTime" );
-
+ DEBUG( "CWlmServer::GetScanResult() - unable to instantiate TUint" );
+
delete coreSsid;
delete scanList;
aMessage.Complete( KErrNoMemory );
@@ -1338,14 +1350,14 @@
return;
}
- TTime* scanTime( NULL );
+ TUint* scanTime( NULL );
if( maxDelayPckg() != KWlmInfiniteScanDelay )
{
- scanTime = new TTime(
- CalculateScanStartTime( maxDelayPckg() ).Int64() );
+ scanTime = new TUint(
+ CalculateScanStartTime( maxDelayPckg() ) );
if( !scanTime )
{
- DEBUG( "CWlmServer::GetAvailableIaps() - unable to instantiate TTime" );
+ DEBUG( "CWlmServer::GetAvailableIaps() - unable to instantiate TUint" );
aMessage.Complete( KErrNoMemory );
delete iapDataList;
@@ -1555,7 +1567,7 @@
// ---------------------------------------------------------
//
void CWlmServer::UpdateScanSchedulingTimer(
- TTime aScanTime,
+ TUint aScanTime,
TUint aTriggeringRequestId )
{
DEBUG1( "CWlmServer::UpdateScanSchedulingTimer() - aTriggeringRequestId = %u ", aTriggeringRequestId );
@@ -1568,32 +1580,22 @@
return;
}
- TTime timeNow;
- timeNow.UniversalTime();
-
- TTimeIntervalMicroSeconds difference( aScanTime.MicroSecondsFrom( timeNow ) );
- if( difference.Int64() < 0 )
+ TUint currentTickCount(
+ User::TickCount() );
+ TUint difference( 0 );
+ if( aScanTime > currentTickCount )
{
- difference = TTimeIntervalMicroSeconds( 0 );
+ difference = aScanTime - currentTickCount;
}
- TTimeIntervalMicroSeconds32 differenceMicroseconds(
- difference.Int64() );
iScanSchedulingTimer->Cancel();
iScanSchedulingTimerExpiration = aScanTime;
iRequestTriggeringScanning = aTriggeringRequestId;
- TCallBack callback( ScanSchedulingTimerExpired, this );
-
- DEBUG1( "CWlmServer::UpdateScanSchedulingTimer() - scheduling the timer to %u second(s)",
- differenceMicroseconds.Int() / SECONDS_FROM_MICROSECONDS );
-
- TTimeIntervalMicroSeconds32 intervalMicroseconds( KWlmMaxScanDelay * SECONDS_FROM_MICROSECONDS );
-
- iScanSchedulingTimer->Start(
- differenceMicroseconds,
- intervalMicroseconds,
- callback );
+ DEBUG2( "CWlmServer::UpdateScanSchedulingTimer() - scheduling the timer to %u system ticks(s) [%u s]",
+ difference, difference * iSystemTickPeriod / KWlanSecsToMicrosecsMultiplier );
+
+ iScanSchedulingTimer->After( difference );
}
// ---------------------------------------------------------
@@ -1606,14 +1608,14 @@
DEBUG( "CWlmServer::FindNextTimedScanSchedulingRequest()" );
TBool pendingScanRequestsFound( EFalse );
- TTime closestTime = TTime( 0 );
+ TUint closestTime( 0 );
aTriggeringRequestIndex = 0;
for(TInt i=0; i < iRequestMap.Count(); i++)
{
if( IsPendingTimedScanRequest( i ) )
{
- TTime* checkedTime = reinterpret_cast( iRequestMap[i].iTime );
+ TUint* checkedTime = reinterpret_cast( iRequestMap[i].iTime );
if( pendingScanRequestsFound == EFalse || closestTime > *checkedTime )
{
closestTime = *checkedTime;
@@ -1627,7 +1629,7 @@
{
// clear the scan scheduling related variables
iRequestTriggeringScanning = KWlanIntCmdNull;
- iScanSchedulingTimerExpiration = TTime( 0 );
+ iScanSchedulingTimerExpiration = 0;
}
else
{
@@ -1830,7 +1832,7 @@
// If WLAN is ON, enable background scanning
if( iPlatform->GetWlanOnOffState() == EWlanOn )
{
- iBgScanProvider->WlanSetBgScanState( MWlanBgScanProvider::EWlanBgScanOn );
+ iBgScanProvider->SetBgScanState( MWlanBgScanProvider::EWlanBgScanOn );
}
break;
@@ -2340,7 +2342,7 @@
// If background scan is currently on, background scan
// will be disabled and it's request will be removed
// from the request map.
- iBgScanProvider->WlanSetBgScanState( MWlanBgScanProvider::EWlanBgScanOff );
+ iBgScanProvider->SetBgScanState( MWlanBgScanProvider::EWlanBgScanOff );
}
}
@@ -2394,7 +2396,7 @@
if( IsSessionActive( completedMapEntry ) )
{
TPckg outPckg( tmp );
- completedMapEntry.iMessage.Write( 1, outPckg );
+ completedMapEntry.iMessage.Write( 2, outPckg );
}
if( status == core_error_ok && IsSessionActive( completedMapEntry ) )
@@ -2458,7 +2460,7 @@
if( FindNextTimedScanSchedulingRequest( indexNextScan ) )
{
- TTime* nextScanTime = reinterpret_cast( iRequestMap[indexNextScan].iTime );
+ TUint* nextScanTime = reinterpret_cast( iRequestMap[indexNextScan].iTime );
UpdateScanSchedulingTimer( *nextScanTime, iRequestMap[indexNextScan].iRequestId );
}
}
@@ -2628,7 +2630,7 @@
delete iapDataList;
iapDataList = NULL;
- TTime* completedScanTime = reinterpret_cast( aRequest.iTime );
+ TUint* completedScanTime = reinterpret_cast( aRequest.iTime );
delete completedScanTime;
completedScanTime = NULL;
@@ -2693,7 +2695,7 @@
{
ScanList* tmp( NULL );
core_ssid_s* ssid = reinterpret_cast( aRequest.iParam1 );
- TTime* completedScanTime = reinterpret_cast( aRequest.iTime );
+ TUint* completedScanTime = reinterpret_cast( aRequest.iTime );
ScanList* completedScanList = reinterpret_cast( aRequest.iParam0 );
if( aTriggerRequest == NULL )
@@ -2793,7 +2795,7 @@
iapSsidList = reinterpret_cast*>( aRequest.iParam3 );
iapDataList = reinterpret_cast*>( aRequest.iParam0 );
- TTime* completedScanTime = reinterpret_cast( aRequest.iTime );
+ TUint* completedScanTime = reinterpret_cast( aRequest.iTime );
ScanList* completedScanList = reinterpret_cast( aRequest.iParam2);
core_type_list_c* completedIdList = reinterpret_cast*>( aRequest.iParam1 );
@@ -3451,11 +3453,11 @@
return KErrNoMemory;
}
- TTime* scanTime = new TTime(
- CalculateScanStartTime( aScanStartInterval ).Int64() );
+ TUint* scanTime = new TUint(
+ CalculateScanStartTime( aScanStartInterval ) );
if( !scanTime )
{
- DEBUG( "CWlmServer::BackgroundScanRequest() - unable to instantiate TTime" );
+ DEBUG( "CWlmServer::BackgroundScanRequest() - unable to instantiate TUint" );
delete iapDataList;
delete iapSsidList;
@@ -3532,7 +3534,7 @@
ScanList* completedScanList = reinterpret_cast( self->iRequestMap[index].iParam0 );
core_ssid_s* completedSsid = reinterpret_cast( self->iRequestMap[index].iParam1 );
- TTime* completedScanTime = reinterpret_cast( self->iRequestMap[index].iTime );
+ TUint* completedScanTime = reinterpret_cast( self->iRequestMap[index].iTime );
// Only the triggering request is completed and then scan scheduling timer is set again
TPckgBuf pckgCount( 0 );
@@ -3559,7 +3561,7 @@
if( self->FindNextTimedScanSchedulingRequest( indexNextScan ) )
{
- TTime* nextScanTime = reinterpret_cast( self->iRequestMap[indexNextScan].iTime );
+ TUint* nextScanTime = reinterpret_cast( self->iRequestMap[indexNextScan].iTime );
self->UpdateScanSchedulingTimer( *nextScanTime, self->iRequestMap[indexNextScan].iRequestId );
}
@@ -3577,7 +3579,7 @@
core_type_list_c* iapIdList = reinterpret_cast*>( self->iRequestMap[index].iParam1 );
ScanList* scanList = reinterpret_cast( self->iRequestMap[index].iParam2 );
core_type_list_c* iapSsidList = reinterpret_cast*>( self->iRequestMap[index].iParam3 );
- TTime* scanTime = reinterpret_cast( self->iRequestMap[index].iTime );
+ TUint* scanTime = reinterpret_cast( self->iRequestMap[index].iTime );
// If the device is roaming OR
// there are not WLAN IAPs defined in the device OR
@@ -3616,7 +3618,7 @@
if( self->FindNextTimedScanSchedulingRequest( indexNextScan ) )
{
- TTime* nextScanTime = reinterpret_cast( self->iRequestMap[indexNextScan].iTime );
+ TUint* nextScanTime = reinterpret_cast( self->iRequestMap[indexNextScan].iTime );
self->UpdateScanSchedulingTimer( *nextScanTime, self->iRequestMap[indexNextScan].iRequestId );
}
@@ -3707,7 +3709,43 @@
}
self->iCoreHandlingScanRequest = ETrue;
return KErrNone;
+ }
+
+// ---------------------------------------------------------
+// CWlmServer::ScanSchedulingTimerCanceled()
+// ---------------------------------------------------------
+//
+TInt CWlmServer::ScanSchedulingTimerCanceled(
+ TAny* aThisPtr )
+ {
+ DEBUG( "CWlmServer::ScanSchedulingTimerCanceled()" );
+
+ CWlmServer* self = reinterpret_cast( aThisPtr );
+
+ /**
+ * Scan scheduling timer was canceled, re-arm the timer.
+ */
+ TUint indexNextScan( 0 );
+ if( self->FindNextTimedScanSchedulingRequest( indexNextScan ) )
+ {
+ self->UpdateScanSchedulingTimer(
+ *(self->iRequestMap[indexNextScan].iTime),
+ self->iRequestMap[indexNextScan].iRequestId );
+ }
+
+ return 0;
}
+
+// ---------------------------------------------------------
+// CWlmServer::EmptyCb()
+// ---------------------------------------------------------
+//
+TInt CWlmServer::EmptyCb(
+ TAny* /* aThisPtr */ )
+ {
+ return 0;
+ }
+
// ---------------------------------------------------------
// CWlmServer::GetIapDataList()
@@ -3923,38 +3961,6 @@
iTimerServices->HandleTimeout();
DEBUG("CWlmServer::SystemTimeChanged() - refreshing settings to BgScan provider");
iBgScanProvider->NotifyChangedSettings( iBgScanProviderSettings );
-
- // Pending scan requests should be handled because after the system time change all the
- // timestamps are invalid. Change the scan start times to start immediately
-
- DEBUG("CWlmServer::SystemTimeChanged() - set all pending requests to expire immediately");
-
- TInt i( 0 );
- for( i = 0; i < iRequestMap.Count(); i++ )
- {
- if( IsPendingTimedScanRequest(i) )
- {
- DEBUG1( "CWlmServer::SystemTimeChanged() - setting iTime to current time for request %i",
- iRequestMap[i].iRequestId );
-
- TTime* requestedScanTime = reinterpret_cast( iRequestMap[i].iTime );
- requestedScanTime->UniversalTime();
- }
- }
- if( !iCoreHandlingScanRequest )
- {
- // Core is not handling any scan request so update the timer
- DEBUG("CWlmServer::SystemTimeChanged() - Core is not currently handling any scan requests");
- DEBUG("CWlmServer::SystemTimeChanged() - Cancel timer and set it again to new value");
-
- iScanSchedulingTimer->Cancel();
- TUint indexNextScan;
- if( FindNextTimedScanSchedulingRequest( indexNextScan ) )
- {
- TTime* nextScanTime = reinterpret_cast( iRequestMap[indexNextScan].iTime );
- UpdateScanSchedulingTimer( *nextScanTime, iRequestMap[indexNextScan].iRequestId );
- }
- }
}
}
@@ -4100,7 +4106,7 @@
delete reinterpret_cast*>( entry.iParam1 );
delete reinterpret_cast( entry.iParam2);
delete reinterpret_cast*>( entry.iParam3 );
- delete reinterpret_cast( entry.iTime );
+ delete reinterpret_cast( entry.iTime );
iRequestMap.Remove( index );
DEBUG( "CWlmServer::CancelScan() - find next possible timed scan scheduling request" );
@@ -4137,7 +4143,7 @@
delete reinterpret_cast*>( entry.iParam1 );
delete reinterpret_cast( entry.iParam2);
delete reinterpret_cast*>( entry.iParam3 );
- delete reinterpret_cast( entry.iTime );
+ delete reinterpret_cast( entry.iTime );
iRequestMap.Remove( index );
}
}
@@ -4382,46 +4388,53 @@
if( wlanState != EWlanOn )
{
// WLAN is OFF and therefore request is not served.
- DEBUG1( "CWlmServer::RunProtectedSetup() rejected due to WLAN is OFF (%d)",
+ DEBUG1( "CWlmServer::RunProtectedSetup() - rejected due to WLAN is OFF (%d)",
wlanState );
// WLAN states map one to one to WLAN error codes.
aMessage.Complete( wlanState );
return;
}
-
- // Get WlanSettings and secondarySSID list
- // (lanServiceId specifies the table row in wlansettings)
- SWLANSettings iapData;
- RArray secondarySsidList;
- TInt lanServiceId = aMessage.Int0();
- TRAPD( err, GetIapSettingsL( lanServiceId, iapData, secondarySsidList ) ) ;
- if( err != KErrNone )
+
+ TPckgBuf ssidPckg;
+ TInt ret( aMessage.Read( 0, ssidPckg ) );
+ if( ret != KErrNone )
{
- DEBUG1( "CWlmServer::RunProtectedSetup() - GetIapSettingsL leaved with %d",
- err );
- secondarySsidList.Close();
- aMessage.Complete( err );
+ aMessage.Complete( ret );
return;
}
- secondarySsidList.Close();
-
- // Type conversion
+
+ TPckgBuf wpsPinPckg;
+ ret = aMessage.Read( 1, wpsPinPckg );
+ if( ret != KErrNone )
+ {
+ aMessage.Complete( ret );
+ return;
+ }
+
core_iap_data_s* coreIapData = new core_iap_data_s;
if( !coreIapData )
{
aMessage.Complete( KErrNoMemory );
return;
}
-
- TWLMOverrideSettings override = { 0 };
- TWlanConversionUtil::ConvertIapSettings(
- *coreIapData,
- iapData,
- ETrue, // dhcp usage is not important here
- override );
-
-
- // Create a list for the results.
+
+ coreIapData->id = 0;
+ coreIapData->op_mode = core_operating_mode_infrastructure;
+ coreIapData->security_mode = core_security_mode_protected_setup;
+ coreIapData->wpa_preshared_key_in_use = ETrue;
+ coreIapData->is_wpa_overriden = ETrue;
+
+ // Type conversion
+ TWlanConversionUtil::ConvertSSID(
+ coreIapData->ssid,
+ ssidPckg() );
+
+ // Type conversion
+ TWlanConversionUtil::ConvertWpaPreSharedKey(
+ coreIapData->wpa_preshared_key,
+ wpsPinPckg() );
+
+ // Create a list for the results.
core_type_list_c* iapDataList = new core_type_list_c;
if( iapDataList == NULL )
{
@@ -5013,7 +5026,7 @@
// If WLAN is set ON, enable background scanning
if( iPlatform->GetWlanOnOffState() == EWlanOn )
{
- iBgScanProvider->WlanSetBgScanState( MWlanBgScanProvider::EWlanBgScanOn );
+ iBgScanProvider->SetBgScanState( MWlanBgScanProvider::EWlanBgScanOn );
}
iPlatform->InitializeSystemTimeHandler();
@@ -5232,7 +5245,7 @@
if( iIsStartupComplete )
{
// Enable background scanning
- iBgScanProvider->WlanSetBgScanState( MWlanBgScanProvider::EWlanBgScanOn );
+ iBgScanProvider->SetBgScanState( MWlanBgScanProvider::EWlanBgScanOn );
}
}
@@ -5242,10 +5255,11 @@
//
void CWlmServer::WlanOff()
{
- DEBUG( "CWlmServer::WlanOff()" );
+ DEBUG1( "CWlmServer::WlanOff() - ConnectionState=%d",
+ iConnectionState );
// Disable background scanning
- iBgScanProvider->WlanSetBgScanState( MWlanBgScanProvider::EWlanBgScanOff );
+ iBgScanProvider->SetBgScanState( MWlanBgScanProvider::EWlanBgScanOff );
// Cancel all running operations that are forbidden in WLAN OFF
CancelExternalRequestsByType( ERunProtectedSetup );
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacManagementSideUmacCb.h
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacManagementSideUmacCb.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacManagementSideUmacCb.h Fri Jun 18 09:56:50 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
*/
/*
-* %version: 17 %
+* %version: 18 %
*/
#ifndef WLANMANAGEMENTSIDEUMACB_H
@@ -112,7 +112,7 @@
* @param aNumOfBuffers number of meta header pointers in the array
*/
virtual void MgmtDataReceiveComplete(
- const TDataBuffer*& aBufferStart,
+ TDataBuffer*& aBufferStart,
TUint32 aNumOfBuffers );
/**
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacProtocolStackSideUmacCb.h
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacProtocolStackSideUmacCb.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacProtocolStackSideUmacCb.h Fri Jun 18 09:56:50 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
*/
/*
-* %version: 14 %
+* %version: 15 %
*/
#ifndef WLANPROTOCOLSTACKSIDEUMACCB_H
@@ -101,7 +101,7 @@
* EFalse otherwise
*/
virtual TBool ProtocolStackDataReceiveComplete(
- const TDataBuffer*& aBufferStart,
+ TDataBuffer*& aBufferStart,
TUint32 aNumOfBuffers );
/**
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacManagementSideUmacCb.cpp
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacManagementSideUmacCb.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacManagementSideUmacCb.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
*/
/*
-* %version: 19 %
+* %version: 20 %
*/
#include "config.h"
@@ -121,7 +121,7 @@
// ---------------------------------------------------------------------------
//
void WlanManagementSideUmacCb::MgmtDataReceiveComplete(
- const TDataBuffer*& aBufferStart,
+ TDataBuffer*& aBufferStart,
TUint32 aNumOfBuffers )
{
if ( iSelf )
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacProtocolStackSideUmacCb.cpp
--- a/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacProtocolStackSideUmacCb.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_common/umac_common/src/UmacProtocolStackSideUmacCb.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
*/
/*
-* %version: 12 %
+* %version: 13 %
*/
#include "config.h"
@@ -87,7 +87,7 @@
// -----------------------------------------------------------------------------
//
TBool WlanProtocolStackSideUmacCb::ProtocolStackDataReceiveComplete(
- const TDataBuffer*& aBufferStart,
+ TDataBuffer*& aBufferStart,
TUint32 aNumOfBuffers )
{
TBool status ( EFalse );
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/DataFrameMemMngr.h
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/DataFrameMemMngr.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/DataFrameMemMngr.h Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 12 %
+* %version: 13 %
*/
#ifndef DATAFRAMEMMNGR_H
@@ -42,6 +42,7 @@
TInt aTxFrameBufAllocationUnit ) :
DEthernetFrameMemMngr( aParent, aRxFrameMemoryPool ),
iFrameXferBlockProtoStack( NULL ),
+ iUserToKernAddrOffset( 0 ),
iTxDataChunk( NULL ),
iTxFrameMemoryPool( NULL ),
iTxFrameBufAllocationUnit ( aTxFrameBufAllocationUnit )
@@ -85,52 +86,87 @@
* EFalse otherwise
*/
virtual TBool DoEthernetFrameRxComplete(
- const TDataBuffer*& aBufferStart,
+ TDataBuffer*& aBufferStart,
TUint32 aNumOfBuffers );
/**
* From DEthernetFrameMemMngr
- * Gets start address of Rx buffers (their offset addresses)
- * that are waiting for completion to user mode
- *
- * @since S60 3.1
- * @return see above
- */
- virtual TUint32* DoGetTobeCompletedBuffersStart();
-
- /**
- * From DEthernetFrameMemMngr
- * Gets start address of Rx buffers (their offset addresses)
- * that have been completed to user mode
+ * To be called when user mode client issues a frame Rx request
*
- * @since S60 3.1
- * @return see above
+ * @return ETrue if callee should complete the request immediately
+ * as there exists Rx frame(s) which can be retrieved by the user
+ * mode client.
+ * EFalse otherwise
*/
- virtual TUint32* DoGetCompletedBuffersStart();
-
+ virtual TBool OnReadRequest();
+
/**
- * From DEthernetFrameMemMngr
- * Gets called when user mode client issues a frame receive request
- * and Rx buffers have been completed to it. The completed Rx frame
- * buffers are freed.
- *
- * @since S60 3.1
- */
- virtual void DoFreeRxBuffers();
-
+ * From DEthernetFrameMemMngr
+ * Gets the highest priority frame (contained in a buffer allocated from
+ * the shared memory) from the Rx queues.
+ * Optionally frees the memory associated to a previously received frame.
+ *
+ * @param aFrameToFreeInUserSpace User space pointer to previously
+ * received frame which can now be freed.
+ * NULL if nothing to free.
+ * @return User space pointer to the Rx frame to be handled next.
+ * NULL, if there are no frames available.
+ */
+ virtual TDataBuffer* GetRxFrame( TDataBuffer* aFrameToFreeInUserSpace );
+
/**
* From DEthernetFrameMemMngr
* Allocates a Tx packet from the shared memory.
*
* @param aLength Length of the requested Tx buffer in bytes
- * @return Pointer to the meta header attached to the allocated packet, on
- * success.
+ * @return User space pointer to the meta header attached to the
+ * allocated packet, on success.
* NULL, in case of failure.
*/
virtual TDataBuffer* AllocTxBuffer( TUint aLength );
/**
* From DEthernetFrameMemMngr
+ * Adds the specified Tx frame (contained in the buffer allocated from the
+ * shared memory) to the relevant Tx queue according to its AC (i.e.
+ * priority).
+ *
+ * @param aPacketInUserSpace Meta header attached to the frame; as a user
+ * space pointer.
+ * @param aPacketInKernSpace If not NULL on return, the frame needs to be
+ * discarded and this is the kernel space pointer to its meta header.
+ * If NULL on return, the frame must not be discarded.
+ * @param aUserDataTxEnabled ETrue if user data Tx is enabled
+ * EFalse otherwise
+ * @return ETrue if the client is allowed to continue calling this method
+ * (i.e. Tx flow is not stopped).
+ * EFalse if the client is not allowed to call this method again
+ * (i.e. Tx flow is stopped) until it is re-allowed.
+ */
+ virtual TBool AddTxFrame(
+ TDataBuffer* aPacketInUserSpace,
+ TDataBuffer*& aPacketInKernSpace,
+ TBool aUserDataTxEnabled );
+
+ /**
+ * From DEthernetFrameMemMngr
+ * Gets the frame to be transmitted next from the Tx queues.
+ *
+ * @param aWhaTxQueueState State (full / not full) of every WHA transmit
+ * queue
+ * @param aMore On return is ETrue if another frame is also ready to be
+ * transmitted, EFalse otherwise
+ * @return Pointer to the meta header of the frame to be transmitted, on
+ * success
+ * NULL, if there's no frame that could be transmitted, given the
+ * current status of the WHA Tx queues
+ */
+ virtual TDataBuffer* GetTxFrame(
+ const TWhaTxQueueState& aTxQueueState,
+ TBool& aMore );
+
+ /**
+ * From DEthernetFrameMemMngr
* Deallocates a Tx packet.
*
* All Tx packets allocated with AllocTxBuffer() must be deallocated using
@@ -138,7 +174,27 @@
*
* @param aPacket Meta header of the packet to the deallocated
*/
- virtual void FreeTxPacket( TDataBuffer*& aPacket );
+ virtual void FreeTxPacket( TDataBuffer*& aPacket );
+
+ /**
+ * From DEthernetFrameMemMngr
+ * Determines if Tx from protocol stack side client should be resumed
+ *
+ * @param aUserDataTxEnabled ETrue if user data Tx is enabled
+ * EFalse otherwise
+ * @return ETrue if Tx should be resumed
+ * EFalse otherwise
+ */
+ virtual TBool ResumeClientTx( TBool aUserDataTxEnabled ) const;
+
+ /**
+ * From DEthernetFrameMemMngr
+ * Determines if all protocol stack side client's Tx queues are empty
+ *
+ * @return ETrue if all Tx queues are empty
+ * EFalse otherwise
+ */
+ virtual TBool AllTxQueuesEmpty() const;
private:
@@ -157,20 +213,14 @@
private: // Data
+ /** kernel address of frame xfer block */
+ RFrameXferBlockProtocolStack* iFrameXferBlockProtoStack;
+
/**
- * array of TDataBuffer offset addresses, denoting Rx buffers,
- * which are waiting here in kernel mode to be completed
- * to user mode, when the next frame receive request arrives
+ * the offset from a User space address to the corresponding address
+ * in the Kernel space in the shared memory chunk. May also be negative
*/
- TUint32 iTobeCompletedBuffers[KMaxToBeCompletedRxBufs];
-
- /**
- * array of TDataBuffer offset addresses, denoting Rx buffers, that are
- * currently under processing in user mode
- */
- TUint32 iCompletedBuffers[KMaxCompletedRxBufs];
-
- RFrameXferBlockProtocolStack* iFrameXferBlockProtoStack;
+ TInt32 iUserToKernAddrOffset;
/**
* pointer to protocol stack side Tx area start in the kernel address
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.h
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.h Fri Jun 18 09:56:50 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
*/
/*
-* %version: 12 %
+* %version: 13 %
*/
#if !defined(__ETHERAPI_H__)
@@ -69,6 +69,7 @@
{
EControlFastAllocTxBuffer = 0x0F000000,
EControlFastAddTxFrame,
+ EControlFastGetRxFrame
};
public:
@@ -119,12 +120,9 @@
* is able to access the memory.
*
* @since S60 3.1
- * @param aFrameXferBlock FrameXferBlock to be initialized by
- * the device driver
* @return KErrNone on success, any other on failure
*/
- inline TInt InitialiseBuffers(
- RFrameXferBlockProtocolStack*& aFrameXferBlock );
+ inline TInt InitialiseBuffers();
/**
* Unmap memory mapped by InitiliazeBuffers method from the client
@@ -183,6 +181,21 @@
*/
inline TBool AddTxFrame( TDataBuffer* aPacket );
+ /**
+ * Gets the highest priority frame (contained in a buffer allocated from
+ * the shared memory) from the Rx queues.
+ * Optionally frees the memory associated to a previously received frame.
+ *
+ * @param aFrameToFree Previously received frame which can now be freed.
+ * NULL if nothing to free.
+ * @return Pointer to the Rx frame to be handled next.
+ * NULL, if there are no frames available. If NULL is returned
+ * the client should re-issue the asynchronous frame Rx request
+ * (i.e. RequestFrame())
+ */
+ inline TDataBuffer* GetRxFrame( TDataBuffer* aFrameToFree );
+
+
#ifndef __KERNEL_MODE__
private:
/** handle to kernel side shared memory chunk */
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.inl
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.inl Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EtherCardApi.inl Fri Jun 18 09:56:50 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
*/
/*
-* %version: 9 %
+* %version: 10 %
*/
// ---------------------------------------------------------------------------
@@ -78,11 +78,9 @@
//
// ---------------------------------------------------------------------------
//
-inline TInt RPcmNetCardIf::InitialiseBuffers(
- RFrameXferBlockProtocolStack*& aFrameXferBlock )
+inline TInt RPcmNetCardIf::InitialiseBuffers()
{
TInt status ( KErrNone );
-
TSharedChunkInfo info;
status = DoSvControl(
@@ -109,25 +107,17 @@
+ sizeof( RFrameXferBlock )
+ sizeof( RFrameXferBlockProtocolStack ) ) );
- aFrameXferBlock = reinterpret_cast(
- baseAddress
- + KRxDataChunkSize
- + sizeof( TDataBuffer )
- + KMgmtSideTxBufferLength
- + KProtocolStackSideTxDataChunkSize
- + sizeof( RFrameXferBlock ) );
+ RFrameXferBlockProtocolStack* frameXferBlock =
+ reinterpret_cast(
+ baseAddress
+ + KRxDataChunkSize
+ + sizeof( TDataBuffer )
+ + KMgmtSideTxBufferLength
+ + KProtocolStackSideTxDataChunkSize
+ + sizeof( RFrameXferBlock ) );
- aFrameXferBlock->SetRxDataChunkField( reinterpret_cast(
- baseAddress) );
-
- aFrameXferBlock->SetTxDataBufferField( reinterpret_cast(
- baseAddress
- + KRxDataChunkSize
- + sizeof( TDataBuffer )
- + KMgmtSideTxBufferLength) );
-
- aFrameXferBlock->UserInitialize(
- reinterpret_cast(aFrameXferBlock) );
+ frameXferBlock->UserInitialize(
+ reinterpret_cast(frameXferBlock) );
}
return status;
@@ -184,3 +174,14 @@
EControlFastAddTxFrame,
reinterpret_cast(aPacket) ));
}
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+inline TDataBuffer* RPcmNetCardIf::GetRxFrame( TDataBuffer* aFrameToFree )
+ {
+ return reinterpret_cast(DoControl(
+ EControlFastGetRxFrame,
+ reinterpret_cast(aFrameToFree) ));
+ }
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EthernetFrameMemMngr.h
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EthernetFrameMemMngr.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/EthernetFrameMemMngr.h Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 18 %
+* %version: 19 %
*/
#ifndef DETHERNETFRAMEMEMMNGR_H
@@ -35,11 +35,6 @@
/**
* Manager object for frame Tx and Rx memory
*
-* Consumed count of Rx-buffers =
-* nbr of Rx buffers currently under processing in user mode
-* + nbr of Rx buffers given to wlanpdd
-* + nbr of Rx buffers waiting for completion to user mode
-*
* @since S60 v3.1
*/
class DEthernetFrameMemMngr
@@ -94,9 +89,9 @@
*
* @since S60 3.1
* @return memory block that can be used for tx frame write,
- * NULL upon failure
+ * NULL upon failure
*/
- TDataBuffer* OnWriteEthernetFrame() const;
+ virtual TDataBuffer* OnWriteEthernetFrame() const;
/**
* Gets a memory block that can be used as rx frame buffer
@@ -123,6 +118,14 @@
void FreeRxFrameMetaHeader( TDataBuffer* aMetaHeader );
/**
+ * Frees the memory associated to a frame.
+ *
+ * @param aFrameToFreeInUserSpace User space pointer to the meta header
+ * of the frame to be freed.
+ */
+ void FreeRxPacket( TDataBuffer* aFrameToFreeInUserSpace );
+
+ /**
* To be called when rx frame read cycle has ended.
*
* @since S60 3.1
@@ -134,19 +137,35 @@
* EFalse otherwise
*/
TBool OnEthernetFrameRxComplete(
- const TDataBuffer*& aBufferStart,
+ TDataBuffer*& aBufferStart,
TUint32 aNumOfBuffers );
/**
- * To be called when user mode issues a rx frame read request
+ * To be called when user mode client issues a frame Rx request
*
* @since S60 3.1
- * @return ETrue if callee should complete the request immediadly
- * as their exist data to be completed, EFalse otherwise
+ * @return ETrue if callee should complete the request immediately
+ * as there exists Rx frame(s) which can be retrieved by the user
+ * mode client.
+ * EFalse otherwise
*/
- TBool OnReadRequest();
+ virtual TBool OnReadRequest() = 0;
/**
+ * Gets the highest priority frame (contained in a buffer allocated from
+ * the shared memory) from the Rx queues.
+ * Optionally frees the memory associated to a previously received frame.
+ *
+ * @param aFrameToFree Previously received frame which can now be freed.
+ * NULL if nothing to free.
+ * @return Pointer to the Rx frame to be handled next.
+ * NULL, if there are no frames available. If NULL is returned
+ * the client should re-issue the asynchronous frame Rx request
+ * (i.e. RequestFrame())
+ */
+ virtual TDataBuffer* GetRxFrame( TDataBuffer* aFrameToFree ) = 0;
+
+ /**
* Frees the specified Rx frame buffer
*
* @since S60 3.1
@@ -158,8 +177,8 @@
* Allocates a Tx packet from the shared memory.
*
* @param aLength Length of the requested Tx buffer in bytes
- * @return Pointer to the meta header attached to the allocated packet, on
- * success.
+ * @return User space pointer to the meta header attached to the
+ * allocated packet, on success.
* NULL, in case of failure.
*/
virtual TDataBuffer* AllocTxBuffer( TUint aLength );
@@ -181,7 +200,7 @@
* EFalse if the client is not allowed to call this method again
* (i.e. Tx flow is stopped) until it is re-allowed.
*/
- TBool AddTxFrame(
+ virtual TBool AddTxFrame(
TDataBuffer* aPacketInUserSpace,
TDataBuffer*& aPacketInKernSpace,
TBool aUserDataTxEnabled );
@@ -198,7 +217,7 @@
* NULL, if there's no frame that could be transmitted, given the
* current status of the WHA Tx queues
*/
- TDataBuffer* GetTxFrame(
+ virtual TDataBuffer* GetTxFrame(
const TWhaTxQueueState& aTxQueueState,
TBool& aMore );
@@ -220,7 +239,7 @@
* @return ETrue if Tx should be resumed
* EFalse otherwise
*/
- TBool ResumeClientTx( TBool aUserDataTxEnabled ) const;
+ virtual TBool ResumeClientTx( TBool aUserDataTxEnabled ) const;
/**
* Determines if all protocol stack side client's Tx queues are empty
@@ -228,7 +247,7 @@
* @return ETrue if all Tx queues are empty
* EFalse otherwise
*/
- TBool AllTxQueuesEmpty() const;
+ virtual TBool AllTxQueuesEmpty() const;
/**
* Static creator of the class instance
@@ -272,10 +291,7 @@
DWlanLogicalChannel& aParent,
WlanChunk*& aRxFrameMemoryPool ) :
iReadStatus( ENotPending ),
- iFrameXferBlock( NULL ),
- iCountCompleted( 0 ),
- iCountTobeCompleted( 0 ),
- iTxDataBuffer( NULL ),
+ iFrameXferBlockBase( NULL ),
iRxDataChunk( NULL ),
iParent( aParent ),
iRxFrameMemoryPool( aRxFrameMemoryPool ),
@@ -334,37 +350,10 @@
* EFalse otherwise
*/
virtual TBool DoEthernetFrameRxComplete(
- const TDataBuffer*& aBufferStart,
+ TDataBuffer*& aBufferStart,
TUint32 aNumOfBuffers ) = 0;
/**
- * Gets start address of Rx buffers (their offset addresses)
- * that are waiting for completion to user mode
- *
- * @since S60 3.1
- * @return see above statement
- */
- virtual TUint32* DoGetTobeCompletedBuffersStart() = 0;
-
- /**
- * Gets start address of Rx buffers (their offset addresses)
- * that have been completed to user mode
- *
- * @since S60 3.1
- * @return see above statement
- */
- virtual TUint32* DoGetCompletedBuffersStart() = 0;
-
- /**
- * Gets called when user mode client issues a frame receive request
- * and Rx buffers have been completed to it. The completed Rx frame
- * buffers are freed.
- *
- * @since S60 3.1
- */
- virtual void DoFreeRxBuffers() = 0;
-
- /**
* Marks memory as not in use, meaning that it is not allocated
* and attached to calling process'es address space
*/
@@ -399,22 +388,8 @@
/** state of the rx frame read request */
TFrameReadState iReadStatus;
- /** kernel address of xfer block */
- RFrameXferBlock* iFrameXferBlock;
-
- /**
- * amount of rx frame buffers that are
- * currently under processing in user mode
- */
- TUint32 iCountCompleted;
-
- /**
- * amount of rx frame buffers waiting completion to user mode
- */
- TUint32 iCountTobeCompleted;
-
- /** kernel address of Tx-data buffer */
- TDataBuffer* iTxDataBuffer;
+ /** kernel address of xfer block; as base class pointer */
+ RFrameXferBlockBase* iFrameXferBlockBase;
/** pointer to Rx area start in the kernel address space */
TUint8* iRxDataChunk;
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/FrameXferBlock.h
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/FrameXferBlock.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/FrameXferBlock.h Fri Jun 18 09:56:50 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
*/
/*
-* %version: 25 %
+* %version: 26 %
*/
#ifndef FRAMEXFERBLOCK_H
@@ -27,11 +27,6 @@
#include "pack.h"
#include "wllddcircularbuffer.h"
-/** Max number of completed Rx buffers */
-static const TUint KMaxCompletedRxBufs = 300;
-
-/** Max number of to be completed Rx buffers */
-static const TUint KMaxToBeCompletedRxBufs = KMaxCompletedRxBufs;
/**
* This value (bytes) should be at least as large as the Tx offset required
@@ -132,7 +127,7 @@
public:
- typedef TUint32 TFrameType;
+ typedef TUint16 TFrameType;
/** ethernet II frame */
static const TFrameType KEthernetFrame = 0;
@@ -229,7 +224,7 @@
inline TUint8 UserPriority() const;
/**
- * Gets the RCPI value of a received frame
+ * Gets the RCPI value of the Rx frame
*
* @since S60 3.2
* @return RCPI value
@@ -338,14 +333,15 @@
/** Default Ctor */
TDataBuffer() :
iFrameType( KEthernetFrame ),
- iLength( 0 ),
iUp( 0 ),
iRcpi( 0 ),
+ iLength( 0 ),
iDestinationAddress( KZeroMacAddr ),
iBufLength( 0 ),
iOffsetToFrameBeginning( 0 ),
iBufferOffsetAddr( sizeof( TDataBuffer ) ),
- iFlags( 0 )
+ iFlags( 0 ),
+ iNext( NULL )
{};
/**
@@ -395,24 +391,20 @@
/** type of the frame in buffer */
TFrameType iFrameType;
+ /**
+ * 802.1D User Priority of the frame
+ */
+ TUint8 iUp;
+
+ /**
+ * RCPI of the received frame; range: [0..250]
+ */
+ TUint8 iRcpi;
+
/** length of the data in buffer */
TUint32 iLength;
/**
- * 802.1D User Priority of the frame
- * stored as a 32-bit value to keep the length of this object 32-bit
- * aligned
- */
- TUint32 iUp;
-
- /**
- * RCPI of the received frame; range: [0..250]
- * stored as a 32-bit value to keep the length of this object 32-bit
- * aligned
- */
- TUint32 iRcpi;
-
- /**
* Destination address of the frame to be transmitted. Used only when
* the address cannot be determined from the frame content
*/
@@ -436,6 +428,9 @@
/** may contain a combination of the flags defined for this class */
TFlag iFlags;
+ /** pointer to the meta header of the next frame in the same Rx queue */
+ TDataBuffer* iNext;
+
/**
* Note! The total length of this object needs to be divisible by four
* to enable the items following it to be correctly aligned.
@@ -690,68 +685,22 @@
#ifndef __KERNEL_MODE__ /* User mode */
- /**
- * Gets next Rx-data buffer that has data to be read
- *
- * @since S60 3.1
- * @param aBuf OUT parameter where Rx-data buffers address that is to
- * be read is copied
- * @return ETrue Rx-data exists after this call still to read,
- * otherwise EFalse
- */
- inline TBool GetNextRxDataBuffer( TDataBuffer*& aBuf );
-
//////////////////////////////////////////////////////////////////////////
// Rest of the methods are meant to be used only in the device driver code
//////////////////////////////////////////////////////////////////////////
- /**
- * Set data chunk address
- *
- * Note! This method is executed in user mode context by the user mode
- * client interface, i.e. not the client itself!
- * @since S60 3.1
- * @param aUserAddr user address of the buffer
- */
- inline void SetRxDataChunkField( TLinAddr aUserAddr );
-
+ /**
+ * Initializes the object instance, with the address of this in user space.
+ *
+ * @param aThisAddrUserSpace Address of this object in user space.
+ */
+ inline void UserInitialize( TUint32 aThisAddrUserSpace );
+
#endif /* User mode end */
#ifdef __KERNEL_MODE__ /* Kernel mode */
/**
- * Completes Rx buffers to user space
- *
- * @since S60 3.1
- * @param aRxCompletionBuffersArray Rx buffer addresses as offsets from
- * Rx memory pool beginning
- * @param aNumOfCompleted number of buffers
- */
- void KeRxComplete(
- const TUint32* aRxCompletionBuffersArray,
- TUint32 aNumOfCompleted );
-
- /**
- * Gets the array of Rx buffers (their offset addresses) which have already
- * been handled by the user space client
- *
- * @since S60 5.0
- * @param aRxHandledBuffersArray Pointer to the beginning of the array
- * @param aNumOfHandled Number of buffers (offset addresses) on the array
- */
- void KeGetHandledRxBuffers(
- const TUint32*& aRxHandledBuffersArray,
- TUint32& aNumOfHandled );
-
- /**
- * Notes, that all Rx buffers, which were completed to user space
- * the previous time, are now free.
- *
- * @since S60 5.0
- */
- void KeAllUserSideRxBuffersFreed();
-
- /**
* Sets the Tx offset for every frame type which can be transmitted
*
* @since S60 5.0
@@ -763,8 +712,17 @@
void KeSetTxOffsets(
TUint32 aEthernetFrameTxOffset,
TUint32 aDot11FrameTxOffset,
- TUint32 aSnapFrameTxOffset );
+ TUint32 aSnapFrameTxOffset );
+ /**
+ * Returns the offset from a User space address to the corresponding address
+ * in the Kernel space in the shared memory chunk.
+ * May also be negative.
+ *
+ * @return The offset
+ */
+ inline TInt32 UserToKernAddrOffset() const;
+
protected:
/**
@@ -788,39 +746,20 @@
protected: // Data
- /** the beginning of the Rx data area in user address space */
- TUint8* iRxDataChunk;
-
- /**
- * number of Rx-data buffers that were completed by the device driver
+ /** Address of this object instance in the kernel mode address space */
+ TUint32 iThisAddrKernelSpace;
+
+ /**
+ * the offset from a User space address to the corresponding address
+ * in the Kernel space in the shared memory chunk. May also be negative
*/
- TUint32 iNumOfCompleted;
+ TInt32 iUserToKernAddrOffset;
- /**
- * index to iRxCompletedBuffers denoting the Rx buffer that is to be
- * extracted next by the user application
- */
- TUint32 iCurrentRxBuffer;
-
- /**
- * index of the first Rx buffer in iRxCompletedBuffers array
- * - which the user side client has already handled and
- * which can therefore be freed & re-used AND
- * - which hasn't been freed yet
- */
- TUint32 iFirstRxBufferToFree;
-
/**
* defines a Tx offset for every frame type which can be transmitted
*/
- TUint32 iTxOffset[TDataBuffer::KFrameTypeMax];
+ TUint32 iTxOffset[TDataBuffer::KFrameTypeMax];
- /**
- * array of TDataBuffer offset addresses from the memory pool start address,
- * denoting Rx buffers which are ready to be read
- */
- TUint32 iRxCompletedBuffers[KMaxCompletedRxBufs];
-
/**
* Note! The length of this object needs to be divisible by 4 to make
* the objects following it to be aligned correctly
@@ -829,41 +768,32 @@
#ifndef __KERNEL_MODE__ /* User mode */
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
//
-// ---------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
//
-inline TBool RFrameXferBlockBase::GetNextRxDataBuffer( TDataBuffer*& aBuf )
+inline void RFrameXferBlockBase::UserInitialize(
+ TUint32 aThisAddrUserSpace)
{
- TBool ret( EFalse );
-
- if ( iNumOfCompleted )
- {
- --iNumOfCompleted;
- aBuf = reinterpret_cast(
- // Rx memory pool user mode start address
- iRxDataChunk +
- // offset from the memory pool start address
- iRxCompletedBuffers[iCurrentRxBuffer]);
-
- ++iCurrentRxBuffer;
- ret = ETrue;
- }
-
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-inline void RFrameXferBlockBase::SetRxDataChunkField( TLinAddr aUserAddr )
- {
- iRxDataChunk = reinterpret_cast(aUserAddr);
+ iUserToKernAddrOffset = iThisAddrKernelSpace - aThisAddrUserSpace;
}
#endif /* User mode end */
+#ifdef __KERNEL_MODE__ /* Kernel mode */
+
+// -----------------------------------------------------------------------------
+// Note! This method is executed in the context of the user mode client
+// thread, but in supervisor mode
+// -----------------------------------------------------------------------------
+//
+inline TInt32 RFrameXferBlockBase::UserToKernAddrOffset() const
+ {
+ return iUserToKernAddrOffset;
+ }
+
+#endif /* Kernel mode end */
+
/**
* Ethernet frame transfer context block between user and kernel space
@@ -893,6 +823,7 @@
* @return KErrNone on success,
* KErrOverflow if aLength is greater than the available space in
* the Tx buffer
+ * KErrNoMemory if frame transfer memory hasn't been allocated
*/
inline TInt AppendTxDataBuffer(
const TUint8* aData,
@@ -924,12 +855,40 @@
#ifdef __KERNEL_MODE__ /* Kernel mode */
/**
- * Initialises the buffer.
+ * Initializes Kernel side memory interface to shared memory between User
+ * and Kernel Space.
*
* @param aTxBufLength
*/
- inline void Initialize( TUint32 aTxBufLength );
+ void Initialize( TUint32 aTxBufLength );
+
+ /**
+ * Adds the specified Rx frame (contained in a buffer allocated from the
+ * shared memory) to the Rx queue
+ *
+ * @param aFrame Meta header attached to the frame; as a kernel
+ * space pointer.
+ */
+ void AddRxFrame( TDataBuffer* aFrame );
+ /**
+ * Gets the next frame from the Rx queue for passing it to
+ * the WLAN Mgmt client.
+ *
+ * @return User space pointer to the meta header of the Rx frame to be
+ * passed to the user mode client.
+ * NULL, if there's no frame available.
+ */
+ TDataBuffer* GetRxFrame();
+
+ /**
+ * Finds out if there is an Rx frame ready for user mode client retrieval
+ *
+ * @return ETrue if an Rx frame is ready for retrival
+ * EFalse otherwise
+ */
+ TBool RxFrameAvailable() const;
+
#endif /* Kernel mode end */
private:
@@ -944,14 +903,20 @@
private: // data
- /** Tx-data buffer */
- TDataBuffer* iTxDataBuffer;
+ /** Tx data buffer */
+ TDataBuffer* iTxDataBuffer;
/**
* stores the total capacity (length) of the Tx buffer (iTxDataBuffer)
* associated with this object instance
*/
- TUint32 iTxBufLength;
+ TUint32 iTxBufLength;
+
+ /** pointer to the meta header of the 1st frame in the Rx queue */
+ TDataBuffer* iRxQueueFront;
+
+ /** pointer to the meta header of the last frame in the Rx queue */
+ TDataBuffer* iRxQueueRear;
};
#ifndef __KERNEL_MODE__ /* User mode */
@@ -968,39 +933,46 @@
TBool aMustNotBeEncrypted,
const TMacAddress* aDestinationAddress )
{
- if ( aLength <=
- iTxBufLength -
- iTxOffset[aFrameType] -
- iTxDataBuffer->GetLength() )
+ if ( iTxDataBuffer )
{
- // provided data fits into buffer
-
- iTxDataBuffer->FrameType( aFrameType );
- iTxDataBuffer->AppendBuffer( aData, aLength, iTxOffset[aFrameType] );
- iTxDataBuffer->SetUserPriority( aUserPriority );
-
- if ( aMustNotBeEncrypted )
+ if ( aLength <=
+ iTxBufLength -
+ iTxOffset[aFrameType] -
+ iTxDataBuffer->GetLength() )
{
- iTxDataBuffer->KeSetFlags(
- TDataBuffer::KTxFrameMustNotBeEncrypted );
+ // provided data fits into buffer
+
+ iTxDataBuffer->FrameType( aFrameType );
+ iTxDataBuffer->AppendBuffer( aData, aLength, iTxOffset[aFrameType] );
+ iTxDataBuffer->SetUserPriority( aUserPriority );
+
+ if ( aMustNotBeEncrypted )
+ {
+ iTxDataBuffer->KeSetFlags(
+ TDataBuffer::KTxFrameMustNotBeEncrypted );
+ }
+ else
+ {
+ iTxDataBuffer->KeClearFlags(
+ TDataBuffer::KTxFrameMustNotBeEncrypted );
+ }
+
+ if ( aDestinationAddress )
+ {
+ iTxDataBuffer->SetDestinationAddress( *aDestinationAddress );
+ }
+
+ return KErrNone;
}
else
{
- iTxDataBuffer->KeClearFlags(
- TDataBuffer::KTxFrameMustNotBeEncrypted );
+ return KErrOverflow;
}
-
- if ( aDestinationAddress )
- {
- iTxDataBuffer->SetDestinationAddress( *aDestinationAddress );
- }
-
- return KErrNone;
}
else
{
- return KErrOverflow;
- }
+ return KErrNoMemory;
+ }
}
// ---------------------------------------------------------------------------
@@ -1009,7 +981,10 @@
//
inline void RFrameXferBlock::ClearTxDataBuffer()
{
- iTxDataBuffer->SetLength( 0 );
+ if ( iTxDataBuffer )
+ {
+ iTxDataBuffer->SetLength( 0 );
+ }
}
// ---------------------------------------------------------------------------
@@ -1023,59 +998,32 @@
#endif /* User mode end */
-#ifdef __KERNEL_MODE__ /* Kernel mode */
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-inline void RFrameXferBlock::Initialize( TUint32 aTxBufLength )
- {
- // perform base class initialization first
- KeInitialize();
-
- iTxDataBuffer = NULL;
- iTxBufLength = aTxBufLength;
- }
-
-#endif /* Kernel mode end */
/**
* Ethernet frame transfer context block between user and kernel space
* for the protocol stack side client
*
*/
-class RFrameXferBlockProtocolStack : public RFrameXferBlock
+class RFrameXferBlockProtocolStack : public RFrameXferBlockBase
{
public:
-#ifndef __KERNEL_MODE__ /* User mode */
-
- /**
- * Initializes TX Data pool, with the address of this in user space.
- *
- * @param aThisAddrUserSpace Address of this object in user space.
- */
- inline void UserInitialize( TUint32 aThisAddrUserSpace );
-
-#endif /* User mode end */
-
#ifdef __KERNEL_MODE__ /* Kernel mode */
/**
- * Initialises Kernel's memory interface to shared memory between User
+ * Initializes Kernel side memory interface to shared memory between User
* and Kernel Space.
*/
- void Initialise();
+ void Initialize();
/**
* Allocates a Tx buffer from the shared memory.
*
- * @param aTxBuf Pointer to the pre-allocated actual Tx buffer.
+ * @param aTxBuf Kernel space pointer to the pre-allocated actual Tx buffer
* @param aBufLength Length of the Tx buffer.
- * @return Pointer to the meta header attached to the allocated buffer, on
- * success.
+ * @return User space pointer to the meta header attached to the
+ * allocated buffer, on success.
* NULL, in case of allocation failure.
*/
TDataBuffer* AllocTxBuffer( const TUint8* aTxBuf, TUint16 aBufLength );
@@ -1145,7 +1093,35 @@
* EFalse otherwise
*/
inline TBool AllTxQueuesEmpty() const;
+
+ /**
+ * Adds the specified Rx frame (contained in a buffer allocated from the
+ * shared memory) to the relevant Rx queue according to its AC (i.e.
+ * priority).
+ *
+ * @param aFrame Meta header attached to the frame; as a kernel
+ * space pointer.
+ */
+ void AddRxFrame( TDataBuffer* aFrame );
+ /**
+ * Gets the highest priority frame from the Rx queues for passing it to
+ * the protocol stack side client.
+ *
+ * @return User space pointer to the meta header of the Rx frame to be
+ * passed to the user mode client.
+ * NULL, if there's no frame available.
+ */
+ TDataBuffer* GetRxFrame();
+
+ /**
+ * Finds out if there is an Rx frame ready for user mode client retrieval
+ *
+ * @return ETrue if an Rx frame is ready for retrival
+ * EFalse otherwise
+ */
+ inline TBool RxFrameAvailable() const;
+
#endif /* Kernel mode end */
private:
@@ -1203,18 +1179,30 @@
/** Tx frame meta header objects */
TDataBuffer iDataBuffers[KTxPoolSizeInPackets];
- /** Address of this object instance in the user mode address space */
- TUint32 iThisAddrUserSpace;
+ /** pointer to the meta header of the 1st frame in the VO Rx queue */
+ TDataBuffer* iVoiceRxQueueFront;
+
+ /** pointer to the meta header of the last frame in the VO Rx queue */
+ TDataBuffer* iVoiceRxQueueRear;
- /** Address of this object instance in the kernel mode address space */
- TUint32 iThisAddrKernelSpace;
+ /** pointer to the meta header of the 1st frame in the VI Rx queue */
+ TDataBuffer* iVideoRxQueueFront;
+
+ /** pointer to the meta header of the last frame in the VI Rx queue */
+ TDataBuffer* iVideoRxQueueRear;
- /**
- * the offset from a User space address to the corresponding address
- * in the Kernel space in the shared memory chunk. May also be negative
- */
- TInt32 iUserToKernAddrOffset;
-
+ /** pointer to the meta header of the 1st frame in the BE Rx queue */
+ TDataBuffer* iBestEffortRxQueueFront;
+
+ /** pointer to the meta header of the last frame in the BE Rx queue */
+ TDataBuffer* iBestEffortRxQueueRear;
+
+ /** pointer to the meta header of the 1st frame in the BG Rx queue */
+ TDataBuffer* iBackgroundRxQueueFront;
+
+ /** pointer to the meta header of the last frame in the BG Rx queue */
+ TDataBuffer* iBackgroundRxQueueRear;
+
/**
* Note! The length of this object needs to be divisible by 4 to make
* the objects following it to be aligned correctly
@@ -1222,38 +1210,28 @@
};
-#ifndef __KERNEL_MODE__ /* User mode */
-#include
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-inline void RFrameXferBlockProtocolStack::UserInitialize(
- TUint32 aThisAddrUserSpace)
- {
- iThisAddrUserSpace = aThisAddrUserSpace;
- iUserToKernAddrOffset = iThisAddrKernelSpace - iThisAddrUserSpace;
- }
-#endif /* User mode end */
-
#ifdef __KERNEL_MODE__ /* Kernel mode */
// -----------------------------------------------------------------------------
-//
+// Note! This method is executed also in the context of the user mode client
+// thread, but in supervisor mode
// -----------------------------------------------------------------------------
//
inline void RFrameXferBlockProtocolStack::FreeTxPacket( TDataBuffer*& aPacket )
{
- aPacket->SetLength( 0 );
- aPacket->SetUserPriority( 0 );
- // put the packet to the Free Queue
- iFreeQueue.PutPacket( aPacket );
- aPacket = NULL;
+ if ( aPacket )
+ {
+ aPacket->SetLength( 0 );
+ aPacket->SetUserPriority( 0 );
+ // put the packet to the Free Queue
+ iFreeQueue.PutPacket( aPacket );
+ aPacket = NULL;
+ }
}
// -----------------------------------------------------------------------------
-//
+// Note! This method is executed in the context of the user mode client
+// thread, but in supervisor mode
// -----------------------------------------------------------------------------
//
inline TBool RFrameXferBlockProtocolStack::AllTxQueuesEmpty() const
@@ -1264,6 +1242,25 @@
iBackgroundTxQueue.IsEmpty() ) ? ETrue : EFalse;
}
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+inline TBool RFrameXferBlockProtocolStack::RxFrameAvailable() const
+ {
+ if ( reinterpret_cast(iVoiceRxQueueFront) ||
+ reinterpret_cast(iVideoRxQueueFront) ||
+ reinterpret_cast(iBestEffortRxQueueFront) ||
+ reinterpret_cast(iBackgroundRxQueueFront ) )
+ {
+ return ETrue;
+ }
+ else
+ {
+ return EFalse;
+ }
+ }
+
#endif /* Kernel mode end */
#endif // FRAMEXFERBLOCK_H
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/MgmtFrameMemMngr.h
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/MgmtFrameMemMngr.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/MgmtFrameMemMngr.h Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 15 %
+* %version: 16 %
*/
#ifndef MGMTFRAMEMMNGR_H
@@ -44,6 +44,9 @@
TBool aUseCachedMemory,
TInt aRxFrameBufAllocationUnit ) :
DEthernetFrameMemMngr( aParent, aRxFrameMemoryPool ),
+ iFrameXferBlock( NULL ),
+ iChunkKernelAddr( 0 ),
+ iTxDataBuffer( NULL ),
iUseCachedMemory( aUseCachedMemory ),
iRxFrameBufAllocationUnit ( aRxFrameBufAllocationUnit ),
iChunkSize(
@@ -52,7 +55,11 @@
{};
/** Dtor */
- virtual ~MgmtFrameMemMngr() {};
+ virtual ~MgmtFrameMemMngr()
+ {
+ iFrameXferBlock = NULL;
+ iTxDataBuffer = NULL;
+ };
protected:
@@ -107,51 +114,55 @@
* EFalse otherwise
*/
virtual TBool DoEthernetFrameRxComplete(
- const TDataBuffer*& aBufferStart,
+ TDataBuffer*& aBufferStart,
TUint32 aNumOfBuffers );
/**
* From DEthernetFrameMemMngr
- * Gets start address of Rx buffers (their offset addresses)
- * that are waiting for completion to user mode
- *
- * @since S60 3.1
- * @return see above statement
- */
- virtual TUint32* DoGetTobeCompletedBuffersStart();
-
- /**
- * From DEthernetFrameMemMngr
- * Gets start address of Rx buffers (their offset addresses)
- * that have been completed to user mode
- *
- * @since S60 3.1
- * @return see above statement
- */
- virtual TUint32* DoGetCompletedBuffersStart();
-
- /**
- * From DEthernetFrameMemMngr
- * Gets called when user mode client issues a frame receive request
- * and Rx buffers have been completed to it. The completed Rx frame
- * buffers are freed.
- *
- * @since S60 3.1
- */
- virtual void DoFreeRxBuffers();
-
- /**
- * From DEthernetFrameMemMngr
* Frees the specified Rx frame buffer
*
* @since S60 3.1
* @param aBufferToFree The buffer to free
*/
virtual void DoMarkRxBufFree( TUint8* aBufferToFree );
+
+ /**
+ * From DEthernetFrameMemMngr
+ * To be called when user mode client issues a frame Rx request
+ *
+ * @return ETrue if callee should complete the request immediately
+ * as there exists Rx frame(s) which can be retrieved by the user
+ * mode client.
+ * EFalse otherwise
+ */
+ virtual TBool OnReadRequest();
+
+ /**
+ * From DEthernetFrameMemMngr
+ * Gets the next frame (contained in a buffer allocated from
+ * the shared memory) from the Rx queue.
+ * Optionally frees the memory associated to a previously received frame.
+ *
+ * @param aFrameToFree User space pointer to previously received frame
+ * which can now be freed.
+ * NULL if nothing to free.
+ * @return User space pointer to the Rx frame to be handled next.
+ * NULL, if there are no frames available.
+ */
+ virtual TDataBuffer* GetRxFrame( TDataBuffer* aFrameToFreeInUserSpace );
private:
/**
+ * Gets a memory block that can be used for tx frame write
+ *
+ * @since S60 3.1
+ * @return memory block that can be used for tx frame write,
+ * NULL upon failure
+ */
+ virtual TDataBuffer* OnWriteEthernetFrame() const;
+
+ /**
* Returns the number of extra bytes required to align Rx buffer start
* address, to be returned to WHA layer, to allocation unit boundary
* @return See above
@@ -171,27 +182,20 @@
// Prohibit copy constructor.
MgmtFrameMemMngr( const MgmtFrameMemMngr& );
// Prohibit assigment operator.
- MgmtFrameMemMngr& operator= ( const MgmtFrameMemMngr & );
+ MgmtFrameMemMngr& operator= ( const MgmtFrameMemMngr& );
private: // Data
+ /** kernel address of frame xfer block */
+ RFrameXferBlock* iFrameXferBlock;
+
/**
* kernel address of the shared memory chunk
*/
TLinAddr iChunkKernelAddr;
- /**
- * array of TDataBuffer offset addresses, denoting Rx buffers,
- * which are waiting here in kernel mode to be completed
- * to user mode, when the next frame receive request arrives
- */
- TUint32 iTobeCompletedBuffers[KMaxToBeCompletedRxBufs];
-
- /**
- * array of TDataBuffer offset addresses, denoting Rx buffers, that are
- * currently under processing in user mode
- */
- TUint32 iCompletedBuffers[KMaxCompletedRxBufs];
+ /** kernel address of Tx data buffer */
+ TDataBuffer* iTxDataBuffer;
/**
* ETrue if cached frame transfer memory shall be used,
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.h
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.h Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 18 %
+* %version: 19 %
*/
#ifndef RWLAN_LOGICAL_CHANNEL_H_
@@ -29,15 +29,6 @@
#include // for RChunk
#endif
-// Enumeration values for control messages
-enum TWlanControl
- {
- EWlanSvControlInitBuffers, // Allocate frame transfer memory for WLAN Mgmt
- // client
- EWlanSvControlFreeBuffers // Deallocate memory allocated by
- // EWlanSvControlInitBuffers
- };
-
// Open parameters
struct TOpenParam
{
@@ -55,23 +46,42 @@
TUint32 iFirmWareLength; // length of firmware in bytes
};
-// Enumeration values for asynchronous requests. Do not exceed KMaxRequests!
-enum TWlanRequest
- {
- EWlanRequestNotify, // request a notification
- EWlanRequestFrame, // frame Rx request
- EWlanRequestSend, // frame Tx request
- EWlanCommand, // WLAN management command
- EWlanInitSystem, // internal init
- EWlanFinitSystem, // internal finit
- EWlanMaxRequest
- };
-
class RWlanLogicalChannel : public RBusLogicalChannel
{
-
public:
+ // Enumeration values for control messages
+ enum TWlanControl
+ {
+ EWlanSvControlInitBuffers, // Allocate frame transfer memory for WLAN Mgmt
+ // client
+ EWlanSvControlFreeBuffers // Deallocate memory allocated by
+ // EWlanSvControlInitBuffers
+ };
+
+ // Enumeration values for asynchronous requests. Do not exceed KMaxRequests!
+ enum TWlanRequest
+ {
+ EWlanRequestNotify, // request a notification
+ EWlanRequestFrame, // frame Rx request
+ EWlanRequestSend, // frame Tx request
+ EWlanCommand, // WLAN management command
+ EWlanInitSystem, // internal init
+ EWlanFinitSystem, // internal finit
+ EWlanMaxRequest
+ };
+
+ /**
+ * Calls executed in the context of the client's thread, but in
+ * supervisor mode
+ */
+ enum TControlFast
+ {
+ EWlanControlFastGetRxFrame = 0x0E000000
+ };
+
+public:
+
/**
* Opens a channel to the WLAN device driver.
*
@@ -153,7 +163,7 @@
*
* @since S60 3.1
* @param aFrameXferBlock FrameXferBlock to be initialised by
- * the device driver.
+ * the device driver.
* @return KErrNone on success, any other on failure
*/
inline TInt InitialiseBuffers( RFrameXferBlock*& aFrameXferBlock );
@@ -194,6 +204,20 @@
*/
inline void CancelRxRequests();
+ /**
+ * Gets the next frame (contained in a buffer allocated from
+ * the shared memory) from the Rx queue.
+ * Optionally frees the memory associated to a previously received frame.
+ *
+ * @param aFrameToFree Previously received frame which can now be freed.
+ * NULL if nothing to free.
+ * @return Pointer to the Rx frame to be handled next.
+ * NULL, if there are no frames available. If NULL is returned
+ * the client should re-issue the asynchronous frame Rx request
+ * (i.e. RequestFrame())
+ */
+ inline TDataBuffer* GetRxFrame( TDataBuffer* aFrameToFree );
+
private:
inline TInt InitWlanSystem( TOpenParam& aOpenParam );
@@ -201,11 +225,6 @@
private: // data
/**
- * has the WLAN system been initialized
- */
- TBool iWlanSystemInitialized;
-
- /**
* If a WLAN Management Command is executed asynchronously, this data
* member is used to store the Management Command message - thus keeping
* it valid until the asynchronous request is actually scheduled.
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.inl
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.inl Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/RWlanLogicalChannel.inl Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 17 %
+* %version: 18 %
*/
// -----------------------------------------------------------------------------
@@ -39,9 +39,7 @@
TWlanUnit aUnit,
TOpenParam& aOpenParam )
{
- iWlanSystemInitialized = EFalse;
-
- TInt err = DoCreate(
+ TInt err = DoCreate(
LDD_NAME,
VersionRequired(),
aUnit,
@@ -54,12 +52,6 @@
// driver load sequence success
// do system init
err = InitWlanSystem( aOpenParam );
-
- if ( err == KErrNone )
- {
- // WLAN system successfully initialized
- iWlanSystemInitialized = ETrue;
- }
}
return err;
@@ -71,21 +63,12 @@
//
inline void RWlanLogicalChannel::CloseChannel()
{
- // release WLAN system resources only if we have been able to do the
- // initialization successfully.
- // This check is done to prevent a release attempt in a case where the
- // device driver framework has not been properly initialized to be able to
- // handle requests
- if ( iWlanSystemInitialized )
- {
- TRequestStatus status;
- DoRequest( EWlanFinitSystem, status );
- User::WaitForRequest(status);
-
- // not initialized any more. This is needed to handle the case
- // that this method is called multiple times
- iWlanSystemInitialized = EFalse;
- }
+ // request WLAN system resources to be released
+ //
+ TRequestStatus status;
+ DoRequest( EWlanFinitSystem, status );
+ User::WaitForRequest(status);
+
// internally call close
Close();
}
@@ -237,12 +220,12 @@
+ KMgmtSideTxBufferLength
+ KProtocolStackSideTxDataChunkSize );
- aFrameXferBlock->SetRxDataChunkField( reinterpret_cast(
- baseAddress) );
-
aFrameXferBlock->SetTxDataBufferField( reinterpret_cast(
baseAddress
+ KRxDataChunkSize ) );
+
+ aFrameXferBlock->UserInitialize(
+ reinterpret_cast(aFrameXferBlock) );
}
return status;
@@ -279,3 +262,15 @@
{
DoRequest( EWlanRequestFrame, aStatus );
}
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+inline TDataBuffer* RWlanLogicalChannel::GetRxFrame(
+ TDataBuffer* aFrameToFree )
+ {
+ return reinterpret_cast(DoControl(
+ EWlanControlFastGetRxFrame,
+ reinterpret_cast(aFrameToFree) ));
+ }
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/WlanLogicalChannel.h
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/WlanLogicalChannel.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/WlanLogicalChannel.h Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 32 %
+* %version: 33 %
*/
#ifndef DWLANLOGICALCHANNEL_H
@@ -139,18 +139,38 @@
/**
* Process a function for this logical channel.
- * This function is executed in the context of client's thread in
- * supervisor mode. All code executed in this mode MUST NOT
- * take a lot of time and MUST NOT access the WHA layer.
* @param aFunction Defines the operation/function to be performed.
* @param param Function specific parameter
* @return function specific return value.
*/
- virtual TAny* DoControlFast( TInt aFunction, TAny* param );
+ virtual TAny* DoControlFast( TInt aFunction, TAny* aParam );
private:
/**
+ * Process a function for this logical channel.
+ *
+ * @param aFunction Defines the operation/function to be performed.
+ * @param aParam Function specific parameter
+ * @return Function specific return value.
+ */
+ TAny* OnMgmtSideControlFast( TInt aFunction, TAny* aParam );
+
+ /**
+ * Process a function for this logical channel.
+ *
+ * @param aFunction Defines the operation/function to be performed.
+ * @param aParam Function specific parameter
+ * @param aTriggerTx ETrue if Tx operation should be triggered
+ * EFalse otherwise
+ * @return Function specific return value.
+ */
+ TAny* OnEthernetSideControlFast(
+ TInt aFunction,
+ TAny* aParam,
+ TBool& aTriggerTx );
+
+ /**
* Called from statemachine when oid has been completed.
* Triggers handling of a new oid
* @param aOid OID handled
@@ -190,7 +210,7 @@
* @param aNumOfBuffers number of meta header pointers in the array
*/
virtual void MgmtDataReceiveComplete(
- const TDataBuffer*& aBufferStart,
+ TDataBuffer*& aBufferStart,
TUint32 aNumOfBuffers );
/**
@@ -256,7 +276,7 @@
* EFalse otherwise
*/
virtual TBool ProtocolStackDataReceiveComplete(
- const TDataBuffer*& aBufferStart,
+ TDataBuffer*& aBufferStart,
TUint32 aNumOfBuffers );
/**
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/wllddlogicalchannelbase.h
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/wllddlogicalchannelbase.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/inc/wllddlogicalchannelbase.h Fri Jun 18 09:56:50 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
*/
/*
-* %version: 2 %
+* %version: 3 %
*/
#ifndef D_WLANLOGICALCHANNELBASE_H
@@ -26,8 +26,9 @@
/**
* An abstract base class for a logical channel that provides a framework in
-* which user-side client requests are executed in the context of a single
-* kernel-side thread.
+* which user side client requests are executed in the context of a single
+* kernel side thread or in the context of the client thread in supervisor
+* mode
*
* @since S60 v5.1
*/
@@ -73,9 +74,9 @@
/**
* Process a function for this logical channel.
- * This function is executed in the context of client's thread in
- * supervisor mode. All code executed in this mode MUST not
- * take a lot of time and MUST NOT access the WHA layer.
+ * This method is executed in the context of the user mode client
+ * thread, but in supervisor mode. Code executed in this mode
+ * MUST NOT take a lot of time.
* @param aFunction Defines the operation/function to be performed.
* @param param Function specific parameter
* @return function specific return value.
@@ -97,7 +98,7 @@
* The smallest Fast Control Function ID that DoControlFast()
* accepts.
*/
- EMinControlFast = static_cast(0x0F000000),
+ EMinControlFast = static_cast(0x0E000000),
/**
* The largest Fast Control Function ID that DoControlFast()
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/DataFrameMemMngr.cpp
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/DataFrameMemMngr.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/DataFrameMemMngr.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 18 %
+* %version: 19 %
*/
#include "WlLddWlanLddConfig.h"
@@ -120,23 +120,23 @@
TraceDump(MEMORY, (("WLANLDD: new WlanChunk: 0x%08x"),
reinterpret_cast(iTxFrameMemoryPool)));
- iFrameXferBlock = reinterpret_cast(
- start_of_mem
- + KRxDataChunkSize
- + sizeof( TDataBuffer )
- + KMgmtSideTxBufferLength
- + KProtocolStackSideTxDataChunkSize
- + sizeof( RFrameXferBlock ) );
-
iFrameXferBlockProtoStack =
- static_cast(iFrameXferBlock);
+ reinterpret_cast(
+ start_of_mem
+ + KRxDataChunkSize
+ + sizeof( TDataBuffer )
+ + KMgmtSideTxBufferLength
+ + KProtocolStackSideTxDataChunkSize
+ + sizeof( RFrameXferBlock ) );
+
+ iFrameXferBlockBase = iFrameXferBlockProtoStack;
TraceDump( INIT_LEVEL,
(("WLANLDD: DataFrameMemMngr::DoOpenHandle: Nif RFrameXferBlock addr: 0x%08x"),
reinterpret_cast(iFrameXferBlockProtoStack) ) );
// initiliase xfer block
- iFrameXferBlockProtoStack->Initialise();
+ iFrameXferBlockProtoStack->Initialize();
iRxBufAlignmentPadding = iParent.RxBufAlignmentPadding();
@@ -175,197 +175,103 @@
//
// ---------------------------------------------------------------------------
//
-void DataFrameMemMngr::DoFreeRxBuffers()
- {
- for ( TUint i = 0; i < iCountCompleted; ++i )
- {
- TDataBuffer* metaHdr ( reinterpret_cast(
- iRxDataChunk + iCompletedBuffers[i]) );
-
- // first free the actual Rx frame buffer if relevant
- if ( metaHdr->KeFlags() & TDataBuffer::KDontReleaseBuffer )
- {
- // this buffer shall not be freed yet, so no action here
-
- TraceDump( RX_FRAME,
- (("WLANLDD: DataFrameMemMngr::DoFreeRxBuffers: don't free yet Rx buf at addr: 0x%08x"),
- reinterpret_cast(metaHdr->KeGetBufferStart()) ) );
- }
- else
- {
- TraceDump( RX_FRAME,
- (("WLANLDD: DataFrameMemMngr::DoFreeRxBuffers: free Rx buf at addr: 0x%08x"),
- reinterpret_cast(metaHdr->KeGetBufferStart()) ) );
-
- iRxFrameMemoryPool->Free(
- metaHdr->KeGetBufferStart()
- // take into account the alignment padding
- - iRxBufAlignmentPadding );
- }
-
- // free the Rx frame meta header
-
- TraceDump( RX_FRAME,
- (("WLANLDD: DataFrameMemMngr::DoFreeRxBuffers: free Rx meta header at addr: 0x%08x"),
- reinterpret_cast(metaHdr)) );
-
- iRxFrameMemoryPool->Free( metaHdr );
- }
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
TBool DataFrameMemMngr::DoEthernetFrameRxComplete(
- const TDataBuffer*& aBufferStart,
+ TDataBuffer*& aBufferStart,
TUint32 aNumOfBuffers )
{
TraceDump( RX_FRAME,
- (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: aNumOfBuffers: %d"),
+ (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: "
+ "aNumOfBuffers: %d"),
aNumOfBuffers) );
- if ( aNumOfBuffers + iCountTobeCompleted > KMaxToBeCompletedRxBufs )
- {
- // too little space reserved for Rx buffer handles
- os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
- }
-
TBool ret( EFalse );
-
- if ( iReadStatus == EPending )
- {
- // read pending
- if ( !iCountTobeCompleted )
- {
- // no existing Rx buffers to complete in queue
- // we may complete these ones on the fly
-
- // note the completed Rx buffers first so that we can change
- // their addresses to offsets
- assign(
- reinterpret_cast(&aBufferStart),
- iCompletedBuffers,
- aNumOfBuffers );
-
- // update the new Rx buffer start addresses added above to be
- // offsets from the Rx memory pool beginning
- for( TUint i = 0; i < aNumOfBuffers; ++i )
- {
- TraceDump( RX_FRAME,
- (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: supplied Rx buf addr: 0x%08x"),
- iCompletedBuffers[i]) );
-
- iCompletedBuffers[i]
- -= reinterpret_cast(iRxDataChunk);
-
- TraceDump( RX_FRAME,
- (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: Rx buf offset addr: 0x%08x"),
- iCompletedBuffers[i]) );
- }
-
- iCountCompleted = aNumOfBuffers;
-
- iFrameXferBlock->KeRxComplete( iCompletedBuffers, iCountCompleted);
- }
- else
- {
- // existing rx buffers to complete in queue.
- // We must append these at the rear and after that
- // complete the existing read request
- assign(
- reinterpret_cast(&aBufferStart),
- iTobeCompletedBuffers + iCountTobeCompleted,
- aNumOfBuffers );
+ TDataBuffer** metaHdrPtrArray(&aBufferStart);
- // update the new Rx buffer start addresses added above to be
- // offsets from the Rx memory pool beginning
- for( TUint i = 0; i < aNumOfBuffers; ++i )
+ if ( iFrameXferBlockProtoStack )
+ {
+ for ( TUint i = 0; i < aNumOfBuffers; ++i )
+ {
+ if ( metaHdrPtrArray[i] )
{
- TraceDump( RX_FRAME,
- (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: supplied Rx buf addr: 0x%08x"),
- iTobeCompletedBuffers[iCountTobeCompleted + i]) );
-
- iTobeCompletedBuffers[iCountTobeCompleted + i]
- -= reinterpret_cast(iRxDataChunk);
-
- TraceDump( RX_FRAME,
- (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: Rx buf offset addr: 0x%08x"),
- iTobeCompletedBuffers[iCountTobeCompleted + i]) );
+ iFrameXferBlockProtoStack->AddRxFrame( metaHdrPtrArray[i] );
}
-
- iCountCompleted = iCountTobeCompleted + aNumOfBuffers;
-
- iFrameXferBlock->KeRxComplete(
- iTobeCompletedBuffers,
- iCountCompleted );
-
- // note the completed Rx buffers
- assign( iTobeCompletedBuffers, iCompletedBuffers, iCountCompleted );
- iCountTobeCompleted = 0;
- }
-
- ret = ETrue;
- }
- else
- {
- // no read pending
- // append at the rear
- assign(
- reinterpret_cast(&aBufferStart),
- iTobeCompletedBuffers + iCountTobeCompleted,
- aNumOfBuffers );
-
- // update the new Rx buffer start addresses added above to be
- // offsets from the Rx memory pool beginning
- for( TUint i = 0; i < aNumOfBuffers; ++i )
- {
- TraceDump( RX_FRAME,
- (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: supplied Rx buf addr: 0x%08x"),
- iTobeCompletedBuffers[iCountTobeCompleted + i]) );
-
- iTobeCompletedBuffers[iCountTobeCompleted + i]
- -= reinterpret_cast(iRxDataChunk);
-
- TraceDump( RX_FRAME,
- (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: Rx buf offset addr: 0x%08x"),
- iTobeCompletedBuffers[iCountTobeCompleted + i]) );
}
- iCountTobeCompleted += aNumOfBuffers;
+ if ( iReadStatus == EPending )
+ {
+ ret = ETrue;
+ }
}
-
- TraceDump( RX_FRAME,
- (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: end: iCountCompleted: %d"),
- iCountCompleted) );
-
- TraceDump( RX_FRAME,
- (("WLANLDD: DataFrameMemMngr::DoEthernetFrameRxComplete: end: iCountTobeCompleted: %d"),
- iCountTobeCompleted) );
return ret;
}
// ---------------------------------------------------------------------------
-//
+//
// ---------------------------------------------------------------------------
//
-TUint32* DataFrameMemMngr::DoGetTobeCompletedBuffersStart()
+TBool DataFrameMemMngr::OnReadRequest()
{
- return iTobeCompletedBuffers;
+ TBool ret( EFalse );
+
+ if ( IsMemInUse() && iFrameXferBlockProtoStack )
+ {
+ if ( iFrameXferBlockProtoStack->RxFrameAvailable() )
+ {
+ // there are Rx frames ready for the user mode client retrieval
+ ret = ETrue;
+
+ // the frame Rx request won't be left pending as the callee will
+ // complete it
+ iReadStatus = ENotPending;
+ }
+ else
+ {
+ // there are no Rx frames ready for the user mode client retrieval
+ // the Rx request is left pending
+ iReadStatus = EPending;
+ }
+ }
+#ifndef NDEBUG
+ else
+ {
+ os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+ }
+#endif
+
+ TraceDump( RX_FRAME,
+ (("WLANLDD: DataFrameMemMngr::OnReadRequest: ret (bool): %d"),
+ ret) );
+
+ return ret;
}
// ---------------------------------------------------------------------------
-//
+// Note! This method is executed in the context of the user mode client
+// thread, but in supervisor mode
// ---------------------------------------------------------------------------
//
-TUint32* DataFrameMemMngr::DoGetCompletedBuffersStart()
+TDataBuffer* DataFrameMemMngr::GetRxFrame(
+ TDataBuffer* aFrameToFreeInUserSpace )
{
- return iCompletedBuffers;
+ TDataBuffer* rxFrame( NULL );
+
+ if ( IsMemInUse() && iFrameXferBlockProtoStack )
+ {
+ if ( aFrameToFreeInUserSpace )
+ {
+ FreeRxPacket( aFrameToFreeInUserSpace );
+ }
+
+ rxFrame = iFrameXferBlockProtoStack->GetRxFrame();
+ }
+
+ return rxFrame;
}
// ---------------------------------------------------------------------------
-//
+// Note! This method is executed in the context of the user mode client
+// thread, but in supervisor mode
// ---------------------------------------------------------------------------
//
TDataBuffer* DataFrameMemMngr::AllocTxBuffer( TUint aLength )
@@ -376,7 +282,10 @@
TDataBuffer* metaHdr ( NULL );
- if ( ( !IsMemInUse() ) || ( aLength > KMaxEthernetFrameLength ) )
+ if ( ( !IsMemInUse() ) ||
+ ( !iTxFrameMemoryPool ) ||
+ ( !iFrameXferBlockProtoStack ) ||
+ ( aLength > KMaxEthernetFrameLength ) )
{
#ifndef NDEBUG
TraceDump( NWSA_TX_DETAILS,
@@ -423,17 +332,66 @@
}
// ---------------------------------------------------------------------------
+// Note! This method is executed in the context of the user mode client
+// thread, but in supervisor mode
+// ---------------------------------------------------------------------------
+//
+TBool DataFrameMemMngr::AddTxFrame(
+ TDataBuffer* aPacketInUserSpace,
+ TDataBuffer*& aPacketInKernSpace,
+ TBool aUserDataTxEnabled )
+ {
+ if ( IsMemInUse() && iFrameXferBlockProtoStack )
+ {
+ return iFrameXferBlockProtoStack->AddTxFrame(
+ aPacketInUserSpace,
+ aPacketInKernSpace,
+ aUserDataTxEnabled );
+ }
+ else
+ {
+ return EFalse;
+ }
+ }
+
+// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
//
+TDataBuffer* DataFrameMemMngr::GetTxFrame(
+ const TWhaTxQueueState& aTxQueueState,
+ TBool& aMore )
+ {
+ if ( IsMemInUse() && iFrameXferBlockProtoStack )
+ {
+ return iFrameXferBlockProtoStack->GetTxFrame( aTxQueueState, aMore );
+ }
+ else
+ {
+ return NULL;
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// Note! This method is executed also in the context of the user mode client
+// thread, but in supervisor mode
+// ---------------------------------------------------------------------------
+//
void DataFrameMemMngr::FreeTxPacket( TDataBuffer*& aPacket )
{
- if ( IsMemInUse() )
+ if ( aPacket )
{
- // free the actual Tx buffer
- iTxFrameMemoryPool->Free( aPacket->KeGetBufferStart() );
- // free the meta header
- iFrameXferBlockProtoStack->FreeTxPacket( aPacket );
+ if ( iTxFrameMemoryPool )
+ {
+ // free the actual Tx buffer
+ iTxFrameMemoryPool->Free( aPacket->KeGetBufferStart() );
+ }
+
+ if ( iFrameXferBlockProtoStack )
+ {
+ // free the meta header
+ iFrameXferBlockProtoStack->FreeTxPacket( aPacket );
+ }
}
}
@@ -441,6 +399,39 @@
//
// ---------------------------------------------------------------------------
//
+TBool DataFrameMemMngr::ResumeClientTx( TBool aUserDataTxEnabled ) const
+ {
+ TBool ret( EFalse );
+
+ if ( iFrameXferBlockProtoStack )
+ {
+ ret = iFrameXferBlockProtoStack->ResumeClientTx( aUserDataTxEnabled );
+ }
+
+ return ret;
+ }
+
+// ---------------------------------------------------------------------------
+// Note! This method is executed in the context of the user mode client
+// thread, but in supervisor mode
+// ---------------------------------------------------------------------------
+//
+TBool DataFrameMemMngr::AllTxQueuesEmpty() const
+ {
+ TBool ret( EFalse );
+
+ if ( iFrameXferBlockProtoStack )
+ {
+ ret = iFrameXferBlockProtoStack->AllTxQueuesEmpty();
+ }
+
+ return ret;
+ }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
void DataFrameMemMngr::OnReleaseMemory( DThread& aThread )
{
TraceDump(INIT_LEVEL, ("WLANLDD: DataFrameMemMngr::OnReleaseMemory"));
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/EthernetFrameMemMngr.cpp
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/EthernetFrameMemMngr.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/EthernetFrameMemMngr.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 24 %
+* %version: 25 %
*/
#include "WlLddWlanLddConfig.h"
@@ -170,8 +170,7 @@
{
MarkMemFree();
- iFrameXferBlock = NULL;
- iTxDataBuffer = NULL;
+ iFrameXferBlockBase = NULL;
iRxDataChunk = NULL;
}
@@ -181,79 +180,11 @@
//
TDataBuffer* DEthernetFrameMemMngr::OnWriteEthernetFrame() const
{
- if ( iTxDataBuffer->GetLength() >= sizeof( SEthernetHeader ) )
- {
- return iTxDataBuffer;
- }
- else
- {
- os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
- return NULL;
- }
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool DEthernetFrameMemMngr::OnReadRequest()
- {
- TBool ret( EFalse );
-
- if ( IsMemInUse() )
- {
- if ( iCountCompleted )
- {
- // free relevant buffers
- DoFreeRxBuffers();
- iCountCompleted = 0; // no buffers anymore in process in user mode
-
- // make sure that the same buffers are not tried to be
- // freed again thru the incremental freeing method
- iFrameXferBlock->KeAllUserSideRxBuffersFreed();
- }
-
- if ( iCountTobeCompleted )
- {
- // there are Rx buffers to be completed
-
- iFrameXferBlock->KeRxComplete( DoGetTobeCompletedBuffersStart(),
- iCountTobeCompleted );
- // mark the completed buffers
- assign( DoGetTobeCompletedBuffersStart(),
- DoGetCompletedBuffersStart(),
- iCountTobeCompleted );
- iCountCompleted = iCountTobeCompleted;
- iCountTobeCompleted = 0;
-
- ret = ETrue;
- // the frame Rx request won't be pending as the callee shall
- // complete it
- iReadStatus = ENotPending;
- }
- else
- {
- // there are no Rx buffers to be completed. The Rx request is
- // left pending
- iReadStatus = EPending;
- }
- }
- else
- {
- os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
- }
-
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void DEthernetFrameMemMngr::DoMarkRxBufFree( TUint8* /*aBufferToFree*/ )
- {
// not supported in default handler
+#ifndef NDEBUG
os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif
+ return NULL;
}
// ---------------------------------------------------------------------------
@@ -265,9 +196,9 @@
TUint32 aDot11FrameTxOffset,
TUint32 aSnapFrameTxOffset )
{
- if ( IsMemInUse() )
+ if ( IsMemInUse() && iFrameXferBlockBase )
{
- iFrameXferBlock->KeSetTxOffsets(
+ iFrameXferBlockBase->KeSetTxOffsets(
aEthernetFrameTxOffset,
aDot11FrameTxOffset,
aSnapFrameTxOffset );
@@ -290,7 +221,7 @@
else
{
// we are trying to acquire an Rx buffer but our user mode client
- // has not asked for the memorybuffer pool to be initialized. In this
+ // has not asked for the memory buffer pool to be initialized. In this
// case NULL is returned, as no buffers are available
TraceDump(RX_FRAME,
("WLANLDD: DEthernetFrameMemMngr::OnGetEthernetFrameRxBuffer: not initialized => failed"));
@@ -307,7 +238,7 @@
{
TDataBuffer* buffer ( NULL );
- if ( IsMemInUse() )
+ if ( IsMemInUse() && iRxFrameMemoryPool )
{
buffer = reinterpret_cast(
iRxFrameMemoryPool->Alloc( sizeof( TDataBuffer ), ETrue ) );
@@ -335,8 +266,13 @@
//
void DEthernetFrameMemMngr::FreeRxFrameMetaHeader( TDataBuffer* aMetaHeader )
{
- if ( IsMemInUse() )
+ if ( IsMemInUse() && iRxFrameMemoryPool )
{
+ TraceDump( RX_FRAME,
+ (("WLANLDD: DEthernetFrameMemMngr::FreeRxFrameMetaHeader: "
+ "at addr: 0x%08x"),
+ reinterpret_cast(aMetaHeader)) );
+
iRxFrameMemoryPool->Free( aMetaHeader );
}
else
@@ -344,16 +280,74 @@
// the whole Rx memory pool - including aMetaHeader - has already
// been deallocated, so nothing is done in this case
TraceDump( RX_FRAME,
- ("WLANLDD: MgmtFrameMemMngr::FreeRxFrameMetaHeader: Rx memory pool already deallocated; no action needed") );
+ ("WLANLDD: MgmtFrameMemMngr::FreeRxFrameMetaHeader: Rx memory "
+ "pool already deallocated; no action needed") );
}
}
// ---------------------------------------------------------------------------
+// Note! This method is executed in the context of the user mode client
+// thread, but in supervisor mode
+// ---------------------------------------------------------------------------
+//
+void DEthernetFrameMemMngr::FreeRxPacket(
+ TDataBuffer* aFrameToFreeInUserSpace )
+ {
+ if ( IsMemInUse() &&
+ aFrameToFreeInUserSpace &&
+ iFrameXferBlockBase &&
+ iRxFrameMemoryPool )
+ {
+ TDataBuffer* frameToFreeInKernSpace (
+ reinterpret_cast(
+ reinterpret_cast(
+ aFrameToFreeInUserSpace) +
+ iFrameXferBlockBase->UserToKernAddrOffset()) );
+
+ // first free the actual Rx frame buffer if relevant
+ if ( frameToFreeInKernSpace->KeFlags() &
+ TDataBuffer::KDontReleaseBuffer )
+ {
+ // this buffer shall not be freed yet, so no action here
+
+ TraceDump( RX_FRAME,
+ (("WLANLDD: DEthernetFrameMemMngr::FreeRxPacket: don't free "
+ "yet Rx buf at addr: 0x%08x"),
+ reinterpret_cast(
+ frameToFreeInKernSpace->KeGetBufferStart()) ) );
+ }
+ else
+ {
+ TraceDump( RX_FRAME,
+ (("WLANLDD: DEthernetFrameMemMngr::FreeRxPacket: free Rx buf "
+ "at addr: 0x%08x"),
+ reinterpret_cast(
+ frameToFreeInKernSpace->KeGetBufferStart()) ) );
+
+ iRxFrameMemoryPool->Free(
+ frameToFreeInKernSpace->KeGetBufferStart()
+ // take into account the alignment padding
+ - iRxBufAlignmentPadding );
+ }
+
+ // free the Rx frame meta header
+
+ TraceDump( RX_FRAME,
+ (("WLANLDD: DEthernetFrameMemMngr::FreeRxPacket: "
+ "free metahdr at addr: 0x%08x"),
+ reinterpret_cast(frameToFreeInKernSpace)) );
+
+ iRxFrameMemoryPool->Free( frameToFreeInKernSpace );
+ aFrameToFreeInUserSpace = NULL;
+ }
+ }
+
+// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
//
TBool DEthernetFrameMemMngr::OnEthernetFrameRxComplete(
- const TDataBuffer*& aBufferStart,
+ TDataBuffer*& aBufferStart,
TUint32 aNumOfBuffers )
{
TBool ret( EFalse );
@@ -394,10 +388,22 @@
}
// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+void DEthernetFrameMemMngr::DoMarkRxBufFree( TUint8* /*aBufferToFree*/ )
+ {
+ // not suported in this default implementation
+#ifndef NDEBUG
+ os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif
+ }
+
+// ---------------------------------------------------------------------------
// This default implementation always returns NULL
// ---------------------------------------------------------------------------
//
-TDataBuffer* DEthernetFrameMemMngr::AllocTxBuffer( TUint aLength )
+TDataBuffer* DEthernetFrameMemMngr::AllocTxBuffer( TUint /*aLength*/ )
{
return NULL;
}
@@ -407,22 +413,16 @@
// ---------------------------------------------------------------------------
//
TBool DEthernetFrameMemMngr::AddTxFrame(
- TDataBuffer* aPacketInUserSpace,
- TDataBuffer*& aPacketInKernSpace,
- TBool aUserDataTxEnabled )
+ TDataBuffer* /*aPacketInUserSpace*/,
+ TDataBuffer*& /*aPacketInKernSpace*/,
+ TBool /*aUserDataTxEnabled*/ )
{
- if ( IsMemInUse() )
- {
- return (static_cast(
- iFrameXferBlock))->AddTxFrame(
- aPacketInUserSpace,
- aPacketInKernSpace,
- aUserDataTxEnabled );
- }
- else
- {
- return EFalse;
- }
+ // not suported in this default implementation
+#ifndef NDEBUG
+ os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif
+
+ return EFalse;
}
// ---------------------------------------------------------------------------
@@ -430,18 +430,15 @@
// ---------------------------------------------------------------------------
//
TDataBuffer* DEthernetFrameMemMngr::GetTxFrame(
- const TWhaTxQueueState& aTxQueueState,
- TBool& aMore )
+ const TWhaTxQueueState& /*aTxQueueState*/,
+ TBool& /*aMore*/ )
{
- if ( IsMemInUse() && iFrameXferBlock )
- {
- return (static_cast(
- iFrameXferBlock))->GetTxFrame( aTxQueueState, aMore );
- }
- else
- {
- return NULL;
- }
+ // not suported in this default implementation
+#ifndef NDEBUG
+ os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif
+
+ return NULL;
}
// ---------------------------------------------------------------------------
@@ -451,17 +448,24 @@
void DEthernetFrameMemMngr::FreeTxPacket( TDataBuffer*& /*aPacket*/ )
{
// not suported in this default implementation
+#ifndef NDEBUG
os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif
}
// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
//
-TBool DEthernetFrameMemMngr::ResumeClientTx( TBool aUserDataTxEnabled ) const
+TBool DEthernetFrameMemMngr::ResumeClientTx(
+ TBool /*aUserDataTxEnabled*/ ) const
{
- return (static_cast(
- iFrameXferBlock))->ResumeClientTx( aUserDataTxEnabled );
+ // not suported in this default implementation
+#ifndef NDEBUG
+ os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif
+
+ return EFalse;
}
// ---------------------------------------------------------------------------
@@ -470,6 +474,10 @@
//
TBool DEthernetFrameMemMngr::AllTxQueuesEmpty() const
{
- return (static_cast(
- iFrameXferBlock))->AllTxQueuesEmpty();
+ // not suported in this default implementation
+#ifndef NDEBUG
+ os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif
+
+ return EFalse;
}
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/FrameXferBlock.cpp
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/FrameXferBlock.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/FrameXferBlock.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
*/
/*
-* %version: 16 %
+* %version: 17 %
*/
#include "WlLddWlanLddConfig.h"
@@ -32,83 +32,12 @@
//
void RFrameXferBlockBase::KeInitialize()
{
- iRxDataChunk = NULL;
-
- for ( TUint32 i = 0; i < KMaxCompletedRxBufs; ++i )
- {
- iRxCompletedBuffers[i] = 0;
- }
+ iThisAddrKernelSpace = reinterpret_cast(this);
for ( TUint j = 0; j < TDataBuffer::KFrameTypeMax; ++j )
{
iTxOffset[j] = 0;
}
-
- iNumOfCompleted = 0;
- iCurrentRxBuffer = 0;
- iFirstRxBufferToFree = 0;
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void RFrameXferBlockBase::KeRxComplete(
- const TUint32* aRxCompletionBuffersArray,
- TUint32 aNumOfCompleted )
- {
- if ( aNumOfCompleted > KMaxCompletedRxBufs )
- {
- os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
- }
-
- assign( aRxCompletionBuffersArray, iRxCompletedBuffers, aNumOfCompleted );
- iNumOfCompleted = aNumOfCompleted;
- iCurrentRxBuffer = 0;
- iFirstRxBufferToFree = 0;
-
- for ( TUint i = 0; i < iNumOfCompleted; ++i )
- {
- TraceDump( RX_FRAME,
- (("WLANLDD: RFrameXferBlockBase::KeRxComplete: completed offset addr: 0x%08x"),
- iRxCompletedBuffers[i]) );
- }
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void RFrameXferBlockBase::KeGetHandledRxBuffers(
- const TUint32*& aRxHandledBuffersArray,
- TUint32& aNumOfHandled )
- {
- TUint32 numHandled ( iCurrentRxBuffer - iFirstRxBufferToFree );
-
- // make sure that if an Rx buffer is currently being processed by the user
- // side client, that buffer is not regarded as being already handled
- numHandled = numHandled ? numHandled - 1 : numHandled;
-
- if ( numHandled )
- {
- aRxHandledBuffersArray = &(iRxCompletedBuffers[iFirstRxBufferToFree]);
- aNumOfHandled = numHandled;
-
- iFirstRxBufferToFree += numHandled;
- }
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void RFrameXferBlockBase::KeAllUserSideRxBuffersFreed()
- {
- iFirstRxBufferToFree = 0;
- // need to reset also the current index, so that the difference of these
- // two indexes is zero, and it then correctly indicates, that there are no
- // Rx buffers which could be freed incrementally
- iCurrentRxBuffer = 0;
}
// ---------------------------------------------------------------------------
@@ -133,17 +62,110 @@
}
}
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+void RFrameXferBlock::Initialize( TUint32 aTxBufLength )
+ {
+ // perform base class initialization first
+ KeInitialize();
+
+ iTxDataBuffer = NULL;
+ iTxBufLength = aTxBufLength;
+
+ iRxQueueFront = NULL;
+ iRxQueueRear = NULL;
+ }
+
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
//
-void RFrameXferBlockProtocolStack::Initialise()
+void RFrameXferBlock::AddRxFrame( TDataBuffer* aFrame )
+ {
+ if ( aFrame )
+ {
+ aFrame->iNext = NULL;
+
+ TraceDump( RX_FRAME,
+ (("WLANLDD: RFrameXferBlock::AddRxFrame: "
+ "add to queue metahdr addr: 0x%08x"),
+ aFrame));
+
+ if ( iRxQueueRear )
+ {
+ iRxQueueRear->iNext = aFrame;
+ iRxQueueRear = aFrame;
+ }
+ else
+ {
+ iRxQueueFront = aFrame;
+ iRxQueueRear = aFrame;
+ }
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// Note! This method is executed in the context of the user mode client
+// thread, but in supervisor mode
+// -----------------------------------------------------------------------------
+//
+TDataBuffer* RFrameXferBlock::GetRxFrame()
+ {
+ TDataBuffer* aPacketInKernSpace( NULL );
+
+ if ( iRxQueueFront )
+ {
+ aPacketInKernSpace = iRxQueueFront;
+
+ TraceDump( RX_FRAME,
+ (("WLANLDD: RFrameXferBlock::GetRxFrame: "
+ "krn metahdr addr: 0x%08x"),
+ reinterpret_cast(aPacketInKernSpace)));
+
+ iRxQueueFront = iRxQueueFront->iNext;
+
+ if ( !iRxQueueFront )
+ {
+ // the queue became empty
+ iRxQueueRear = NULL;
+ }
+
+ return reinterpret_cast(
+ reinterpret_cast(aPacketInKernSpace)
+ - iUserToKernAddrOffset);
+ }
+ else
+ {
+ // the Rx queue is empty
+ TraceDump( RX_FRAME,
+ (("WLANLDD: RFrameXferBlock::GetRxFrame: "
+ "no frames available")));
+
+ // return NULL
+ return aPacketInKernSpace;
+ }
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+TBool RFrameXferBlock::RxFrameAvailable() const
+ {
+ return reinterpret_cast( iRxQueueFront );
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void RFrameXferBlockProtocolStack::Initialize()
{
// perform base class initialization
KeInitialize();
- iThisAddrKernelSpace = reinterpret_cast(this);
-
iVoiceTxQueue.DoInit();
iVideoTxQueue.DoInit();
iBestEffortTxQueue.DoInit();
@@ -161,10 +183,23 @@
iFreeQueue.PutPacket( &iDataBuffers[i] );
}
+
+ iVoiceRxQueueFront = NULL;
+ iVoiceRxQueueRear = NULL;
+
+ iVideoRxQueueFront = NULL;
+ iVideoRxQueueRear = NULL;
+
+ iBestEffortRxQueueFront = NULL;
+ iBestEffortRxQueueRear = NULL;
+
+ iBackgroundRxQueueFront = NULL;
+ iBackgroundRxQueueRear = NULL;
}
// -----------------------------------------------------------------------------
-//
+// Note! This method is executed in the context of the user mode client
+// thread, but in supervisor mode
// -----------------------------------------------------------------------------
//
TDataBuffer* RFrameXferBlockProtocolStack::AllocTxBuffer(
@@ -209,7 +244,8 @@
}
// -----------------------------------------------------------------------------
-//
+// Note! This method is executed in the context of the user mode client
+// thread, but in supervisor mode
// -----------------------------------------------------------------------------
//
TBool RFrameXferBlockProtocolStack::AddTxFrame(
@@ -219,6 +255,15 @@
{
TBool ret( ETrue );
aPacketInKernSpace = NULL;
+
+ if ( !aPacketInUserSpace )
+ {
+#ifndef NDEBUG
+ os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif
+ return ETrue;
+ }
+
TDataBuffer* metaHdrInKernSpace ( reinterpret_cast(
reinterpret_cast(aPacketInUserSpace) + iUserToKernAddrOffset) );
@@ -455,6 +500,197 @@
//
// -----------------------------------------------------------------------------
//
+void RFrameXferBlockProtocolStack::AddRxFrame( TDataBuffer* aFrame )
+ {
+ if ( !aFrame )
+ {
+#ifndef NDEBUG
+ os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif
+ return;
+ }
+
+ aFrame->iNext = NULL;
+
+ if ( aFrame->UserPriority() == 7 || aFrame->UserPriority() == 6 )
+ {
+ TraceDump( RX_FRAME,
+ (("WLANLDD: RFrameXferBlockProtocolStack::AddRxFrame: "
+ "add to VO queue metahdr addr: 0x%08x"),
+ aFrame));
+
+ if ( iVoiceRxQueueRear )
+ {
+ iVoiceRxQueueRear->iNext = aFrame;
+ iVoiceRxQueueRear = aFrame;
+ }
+ else
+ {
+ iVoiceRxQueueFront = aFrame;
+ iVoiceRxQueueRear = aFrame;
+ }
+ }
+ else if ( aFrame->UserPriority() == 5 || aFrame->UserPriority() == 4 )
+ {
+ TraceDump( RX_FRAME,
+ (("WLANLDD: RFrameXferBlockProtocolStack::AddRxFrame: "
+ "add to VI queue metahdr addr: 0x%08x"),
+ aFrame));
+
+ if ( iVideoRxQueueRear )
+ {
+ iVideoRxQueueRear->iNext = aFrame;
+ iVideoRxQueueRear = aFrame;
+ }
+ else
+ {
+ iVideoRxQueueFront = aFrame;
+ iVideoRxQueueRear = aFrame;
+ }
+ }
+ else if ( aFrame->UserPriority() == 2 || aFrame->UserPriority() == 1 )
+ {
+ TraceDump( RX_FRAME,
+ (("WLANLDD: RFrameXferBlockProtocolStack::AddRxFrame: "
+ "add to BG queue metahdr addr: 0x%08x"),
+ aFrame));
+
+ if ( iBackgroundRxQueueRear )
+ {
+ iBackgroundRxQueueRear->iNext = aFrame;
+ iBackgroundRxQueueRear = aFrame;
+ }
+ else
+ {
+ iBackgroundRxQueueFront = aFrame;
+ iBackgroundRxQueueRear = aFrame;
+ }
+ }
+ else
+ {
+ // user priority is 3 or 0 or invalid
+
+ TraceDump( RX_FRAME,
+ (("WLANLDD: RFrameXferBlockProtocolStack::AddRxFrame: "
+ "add to BE queue metahdr addr: 0x%08x"),
+ aFrame));
+
+ if ( iBestEffortRxQueueRear )
+ {
+ iBestEffortRxQueueRear->iNext = aFrame;
+ iBestEffortRxQueueRear = aFrame;
+ }
+ else
+ {
+ iBestEffortRxQueueFront = aFrame;
+ iBestEffortRxQueueRear = aFrame;
+ }
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// Note! This method is executed in the context of the user mode client
+// thread, but in supervisor mode
+// -----------------------------------------------------------------------------
+//
+TDataBuffer* RFrameXferBlockProtocolStack::GetRxFrame()
+ {
+ TDataBuffer* aPacketInKernSpace( NULL );
+
+ if ( iVoiceRxQueueFront )
+ {
+ aPacketInKernSpace = iVoiceRxQueueFront;
+
+ TraceDump( RX_FRAME,
+ (("WLANLDD: RFrameXferBlockProtocolStack::GetRxFrame: from VO "
+ "queue; krn metahdr addr: 0x%08x"),
+ reinterpret_cast(aPacketInKernSpace)));
+
+ iVoiceRxQueueFront = iVoiceRxQueueFront->iNext;
+
+ if ( !iVoiceRxQueueFront )
+ {
+ // the queue became empty
+ iVoiceRxQueueRear = NULL;
+ }
+ }
+ else if ( iVideoRxQueueFront )
+ {
+ aPacketInKernSpace = iVideoRxQueueFront;
+
+ TraceDump( RX_FRAME,
+ (("WLANLDD: RFrameXferBlockProtocolStack::GetRxFrame: from VI "
+ "queue; krn metahdr addr: 0x%08x"),
+ reinterpret_cast(aPacketInKernSpace)));
+
+ iVideoRxQueueFront = iVideoRxQueueFront->iNext;
+
+ if ( !iVideoRxQueueFront )
+ {
+ // the queue became empty
+ iVideoRxQueueRear = NULL;
+ }
+ }
+ else if ( iBestEffortRxQueueFront )
+ {
+ aPacketInKernSpace = iBestEffortRxQueueFront;
+
+ TraceDump( RX_FRAME,
+ (("WLANLDD: RFrameXferBlockProtocolStack::GetRxFrame: from BE "
+ "queue; krn metahdr addr: 0x%08x"),
+ reinterpret_cast(aPacketInKernSpace)));
+
+ iBestEffortRxQueueFront = iBestEffortRxQueueFront->iNext;
+
+ if ( !iBestEffortRxQueueFront )
+ {
+ // the queue became empty
+ iBestEffortRxQueueRear = NULL;
+ }
+ }
+ else if ( iBackgroundRxQueueFront )
+ {
+ aPacketInKernSpace = iBackgroundRxQueueFront;
+
+ TraceDump( RX_FRAME,
+ (("WLANLDD: RFrameXferBlockProtocolStack::GetRxFrame: from BG "
+ "queue; krn metahdr addr: 0x%08x"),
+ reinterpret_cast(aPacketInKernSpace)));
+
+ iBackgroundRxQueueFront = iBackgroundRxQueueFront->iNext;
+
+ if ( !iBackgroundRxQueueFront )
+ {
+ // the queue became empty
+ iBackgroundRxQueueRear = NULL;
+ }
+ }
+ else
+ {
+ // all Rx queues are empty; no action
+ }
+
+ if ( aPacketInKernSpace )
+ {
+ return reinterpret_cast(
+ reinterpret_cast(aPacketInKernSpace)
+ - iUserToKernAddrOffset);
+ }
+ else
+ {
+ TraceDump( RX_FRAME,
+ (("WLANLDD: RFrameXferBlockProtocolStack::GetRxFrame: "
+ "no frames available")));
+
+ // return NULL
+ return aPacketInKernSpace;
+ }
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
TBool RFrameXferBlockProtocolStack::TxPossible(
const TWhaTxQueueState& aWhaTxQueueState,
TQueueId& aQueueId )
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/MgmtFrameMemMngr.cpp
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/MgmtFrameMemMngr.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/MgmtFrameMemMngr.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 20 %
+* %version: 21 %
*/
#include "WlLddWlanLddConfig.h"
@@ -226,6 +226,8 @@
+ KMgmtSideTxBufferLength
+ KProtocolStackSideTxDataChunkSize );
+ iFrameXferBlockBase = iFrameXferBlock;
+
TraceDump( INIT_LEVEL,
(("WLANLDD: MgmtFrameMemMngr::DoOpenHandle: Engine RFrameXferBlock addr: 0x%08x"),
reinterpret_cast(iFrameXferBlock) ) );
@@ -275,55 +277,6 @@
TraceDump( RX_FRAME,
("WLANLDD: MgmtFrameMemMngr::DoGetNextFreeRxBuffer") );
- // if there are any Rx buffers which have been handled and
- // can already be re-used, free them first
-
- const TUint32* rxHandledBuffersArray ( NULL );
- TUint32 numOfHandled ( 0 );
-
- iFrameXferBlock->KeGetHandledRxBuffers(
- rxHandledBuffersArray,
- numOfHandled );
-
- if ( numOfHandled )
- {
- // there are buffers which can be freed, so free them
- for ( TUint i = 0; i < numOfHandled; ++i )
- {
- // first free the actual Rx frame buffer
-
- TraceDump( RX_FRAME,
- (("WLANLDD: MgmtFrameMemMngr::DoGetNextFreeRxBuffer: free Rx buf at addr: 0x%08x"),
- reinterpret_cast(reinterpret_cast(
- iRxDataChunk
- + rxHandledBuffersArray[i])->KeGetBufferStart()) ) );
-
- iRxFrameMemoryPool->Free(
- reinterpret_cast(
- iRxDataChunk + rxHandledBuffersArray[i])->KeGetBufferStart()
- // take into account the alignment padding
- - iRxBufAlignmentPadding );
-
- // then free the Rx frame meta header
-
- TraceDump( RX_FRAME,
- (("WLANLDD: MgmtFrameMemMngr::DoGetNextFreeRxBuffer: free Rx meta header at addr: 0x%08x"),
- reinterpret_cast( iRxDataChunk + rxHandledBuffersArray[i])) );
-
- iRxFrameMemoryPool->Free( iRxDataChunk + rxHandledBuffersArray[i] );
- }
-
- // remove the buffers we freed above from the completed buffers of this
- // object so that they are not tried to be freed again once the Mgmt
- // Client issues the next Rx request
-
- iCountCompleted -= numOfHandled;
- assign(
- iCompletedBuffers + numOfHandled,
- iCompletedBuffers,
- iCountCompleted );
- }
-
// reserve a new Rx buffer.
TUint8* buffer ( NULL );
@@ -366,131 +319,33 @@
// ---------------------------------------------------------------------------
//
TBool MgmtFrameMemMngr::DoEthernetFrameRxComplete(
- const TDataBuffer*& aBufferStart,
+ TDataBuffer*& aBufferStart,
TUint32 aNumOfBuffers )
{
TraceDump( RX_FRAME,
- (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: aNumOfBuffers: %d"),
+ (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: "
+ "aNumOfBuffers: %d"),
aNumOfBuffers) );
- if ( aNumOfBuffers + iCountTobeCompleted > KMaxToBeCompletedRxBufs )
- {
- // too little space reserved for Rx buffer handles
- os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
- }
-
TBool ret( EFalse );
-
- if ( iReadStatus == EPending )
- {
- // read pending
- if ( !iCountTobeCompleted )
- {
- // no existing Rx buffers to complete in queue
- // we may complete these ones on the fly
-
- // note the completed Rx buffers first so that we can change
- // their addresses to offsets
- assign(
- reinterpret_cast(&aBufferStart),
- iCompletedBuffers,
- aNumOfBuffers );
-
- // update the new Rx buffer start addresses added above to be
- // offsets from the Rx memory pool beginning
- for( TUint i = 0; i < aNumOfBuffers; ++i )
- {
- TraceDump( RX_FRAME,
- (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: supplied Rx buf addr: 0x%08x"),
- iCompletedBuffers[i]) );
-
- iCompletedBuffers[i]
- -= reinterpret_cast(iRxDataChunk);
-
- TraceDump( RX_FRAME,
- (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: Rx buf offset addr: 0x%08x"),
- iCompletedBuffers[i]) );
- }
-
- iCountCompleted = aNumOfBuffers;
-
- iFrameXferBlock->KeRxComplete( iCompletedBuffers, iCountCompleted);
- }
- else
- {
- // existing rx buffers to complete in queue.
- // We must append these at the rear and after that
- // complete the existing read request
- assign(
- reinterpret_cast(&aBufferStart),
- iTobeCompletedBuffers + iCountTobeCompleted,
- aNumOfBuffers );
+ TDataBuffer** metaHdrPtrArray(&aBufferStart);
- // update the new Rx buffer start addresses added above to be
- // offsets from the Rx memory pool beginning
- for( TUint i = 0; i < aNumOfBuffers; ++i )
+ if ( iFrameXferBlock )
+ {
+ for ( TUint i = 0; i < aNumOfBuffers; ++i )
+ {
+ if ( metaHdrPtrArray[i] )
{
- TraceDump( RX_FRAME,
- (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: supplied Rx buf addr: 0x%08x"),
- iTobeCompletedBuffers[iCountTobeCompleted + i]) );
-
- iTobeCompletedBuffers[iCountTobeCompleted + i]
- -= reinterpret_cast(iRxDataChunk);
-
- TraceDump( RX_FRAME,
- (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: Rx buf offset addr: 0x%08x"),
- iTobeCompletedBuffers[iCountTobeCompleted + i]) );
+ iFrameXferBlock->AddRxFrame( metaHdrPtrArray[i] );
}
-
- iCountCompleted = iCountTobeCompleted + aNumOfBuffers;
-
- iFrameXferBlock->KeRxComplete(
- iTobeCompletedBuffers,
- iCountCompleted );
-
- // note the completed Rx buffers
- assign( iTobeCompletedBuffers, iCompletedBuffers, iCountCompleted );
- iCountTobeCompleted = 0;
- }
-
- ret = ETrue;
- }
- else
- {
- // no read pending
- // append at the rear
- assign(
- reinterpret_cast(&aBufferStart),
- iTobeCompletedBuffers + iCountTobeCompleted,
- aNumOfBuffers );
-
- // update the new Rx buffer start addresses added above to be
- // offsets from the Rx memory pool beginning
- for( TUint i = 0; i < aNumOfBuffers; ++i )
- {
- TraceDump( RX_FRAME,
- (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: supplied Rx buf addr: 0x%08x"),
- iTobeCompletedBuffers[iCountTobeCompleted + i]) );
-
- iTobeCompletedBuffers[iCountTobeCompleted + i]
- -= reinterpret_cast(iRxDataChunk);
-
- TraceDump( RX_FRAME,
- (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: Rx buf offset addr: 0x%08x"),
- iTobeCompletedBuffers[iCountTobeCompleted + i]) );
}
- iCountTobeCompleted += aNumOfBuffers;
+ if ( iReadStatus == EPending )
+ {
+ ret = ETrue;
+ }
}
- TraceDump( RX_FRAME,
- (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: end: iCountCompleted: %d"),
- iCountCompleted) );
-
- TraceDump( RX_FRAME,
- (("WLANLDD: MgmtFrameMemMngr::DoEthernetFrameRxComplete: end: iCountTobeCompleted: %d"),
- iCountTobeCompleted) );
-
return ret;
}
@@ -498,72 +353,13 @@
//
// ---------------------------------------------------------------------------
//
-TUint32* MgmtFrameMemMngr::DoGetTobeCompletedBuffersStart()
- {
- return iTobeCompletedBuffers;
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TUint32* MgmtFrameMemMngr::DoGetCompletedBuffersStart()
- {
- return iCompletedBuffers;
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void MgmtFrameMemMngr::DoFreeRxBuffers()
- {
- if ( IsMemInUse() )
- {
- for ( TUint i = 0; i < iCountCompleted; ++i )
- {
- TDataBuffer* metaHdr ( reinterpret_cast(
- iRxDataChunk + iCompletedBuffers[i]) );
-
- // first free the actual Rx frame buffer
- TraceDump( RX_FRAME,
- (("WLANLDD: MgmtFrameMemMngr::DoFreeRxBuffers: free Rx buf at addr: 0x%08x"),
- reinterpret_cast(metaHdr->KeGetBufferStart()) ) );
-
- iRxFrameMemoryPool->Free(
- metaHdr->KeGetBufferStart()
- // take into account the alignment padding
- - iRxBufAlignmentPadding );
-
- // free the Rx frame meta header
-
- TraceDump( RX_FRAME,
- (("WLANLDD: MgmtFrameMemMngr::DoFreeRxBuffers: free Rx meta header at addr: 0x%08x"),
- reinterpret_cast(metaHdr)) );
-
- iRxFrameMemoryPool->Free( metaHdr );
- }
- }
- else
- {
- // the whole Rx memory pool has already been deallocated, so nothing
- // is done in this case
- TraceDump( RX_FRAME,
- ("WLANLDD: MgmtFrameMemMngr::DoFreeRxBuffers: Rx memory pool already deallocated; no action needed") );
- }
- }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
void MgmtFrameMemMngr::DoMarkRxBufFree( TUint8* aBufferToFree )
{
TraceDump( RX_FRAME,
(("WLANLDD: MgmtFrameMemMngr::DoMarkRxBufFree: free Rx buf at addr: 0x%08x"),
reinterpret_cast(aBufferToFree) ) );
- if ( IsMemInUse() )
+ if ( IsMemInUse() && iRxFrameMemoryPool )
{
iRxFrameMemoryPool->Free(
aBufferToFree
@@ -575,25 +371,117 @@
// the whole Rx memory pool - including aBufferToFree - has already
// been deallocated, so nothing is done in this case
TraceDump( RX_FRAME,
- ("WLANLDD: MgmtFrameMemMngr::DoMarkRxBufFree: Rx memory pool already deallocated; no action needed") );
+ ("WLANLDD: MgmtFrameMemMngr::DoMarkRxBufFree: Rx memory pool already "
+ "deallocated; no action needed") );
}
}
// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+TBool MgmtFrameMemMngr::OnReadRequest()
+ {
+ TBool ret( EFalse );
+
+ if ( IsMemInUse() && iFrameXferBlock )
+ {
+ if ( iFrameXferBlock->RxFrameAvailable() )
+ {
+ // there are Rx frames ready for the user mode client retrieval
+ ret = ETrue;
+
+ // the frame Rx request won't be left pending as the callee will
+ // complete it
+ iReadStatus = ENotPending;
+ }
+ else
+ {
+ // there are no Rx frames ready for the user mode client retrieval
+ // the Rx request is left pending
+ iReadStatus = EPending;
+ }
+ }
+#ifndef NDEBUG
+ else
+ {
+ os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+ }
+#endif
+
+ TraceDump( RX_FRAME,
+ (("WLANLDD: MgmtFrameMemMngr::OnReadRequest: ret (bool): %d"),
+ ret) );
+
+ return ret;
+ }
+
+// ---------------------------------------------------------------------------
+// Note! This method is executed in the context of the user mode client
+// thread, but in supervisor mode
+// ---------------------------------------------------------------------------
+//
+TDataBuffer* MgmtFrameMemMngr::GetRxFrame(
+ TDataBuffer* aFrameToFreeInUserSpace )
+ {
+ TDataBuffer* rxFrame( NULL );
+
+ if ( IsMemInUse() && iFrameXferBlock )
+ {
+ if ( aFrameToFreeInUserSpace )
+ {
+ FreeRxPacket( aFrameToFreeInUserSpace );
+ }
+
+ rxFrame = iFrameXferBlock->GetRxFrame();
+ }
+
+ return rxFrame;
+ }
+
+// ---------------------------------------------------------------------------
+//
+// ---------------------------------------------------------------------------
+//
+TDataBuffer* MgmtFrameMemMngr::OnWriteEthernetFrame() const
+ {
+ if ( iTxDataBuffer &&
+ ( iTxDataBuffer->GetLength() >= sizeof( SEthernetHeader ) ) )
+ {
+ return iTxDataBuffer;
+ }
+ else
+ {
+#ifndef NDEBUG
+ os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+#endif
+ return NULL;
+ }
+ }
+
+// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
//
TInt MgmtFrameMemMngr::RxBufAlignmentPadding() const
{
- const TInt KMemMgrHdrLen = iRxFrameMemoryPool->HeaderSize();
- const TInt KRemainder ( KMemMgrHdrLen % iRxFrameBufAllocationUnit );
- TInt padding = KRemainder ?
- ( iRxFrameBufAllocationUnit - KRemainder ) : KRemainder;
+ if ( iRxFrameMemoryPool )
+ {
+ const TInt KMemMgrHdrLen = iRxFrameMemoryPool->HeaderSize();
+ const TInt KRemainder ( KMemMgrHdrLen % iRxFrameBufAllocationUnit );
+ TInt padding = KRemainder ?
+ ( iRxFrameBufAllocationUnit - KRemainder ) : KRemainder;
+
+ TraceDump(INIT_LEVEL, (("WLANLDD: MgmtFrameMemMngr::RxBufAlignmentPadding: %d"),
+ padding));
- TraceDump(INIT_LEVEL, (("WLANLDD: MgmtFrameMemMngr::RxBufAlignmentPadding: %d"),
- padding));
-
- return padding;
+ return padding;
+ }
+ else
+ {
+ os_assert( (TUint8*)("WLANLDD: panic"), (TUint8*)(WLAN_FILE), __LINE__ );
+ return 0;
+ }
}
// ---------------------------------------------------------------------------
@@ -634,5 +522,5 @@
Kern::ChunkClose( iParent.SharedMemoryChunk() );
iParent.SharedMemoryChunk() = NULL;
MarkMemFree();
- }
+ }
}
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WLanLogicalDevice.cpp
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WLanLogicalDevice.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/WLanLogicalDevice.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
*/
/*
-* %version: 18 %
+* %version: 19 %
*/
#include "WlLddWlanLddConfig.h"
@@ -44,7 +44,7 @@
#else
DWlanLogicalDevice* logicalDevice( new DWlanLogicalDevice );
- if ( !(logicalDevice->IsValid()) )
+ if ( logicalDevice && !(logicalDevice->IsValid()) )
{
// something went wrong
delete logicalDevice;
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/wllddlogicalchannelbase.cpp
--- a/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/wllddlogicalchannelbase.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlanldd/wlan_symbian/wlanldd_symbian/src/wllddlogicalchannelbase.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
*/
/*
-* %version: 2 %
+* %version: 3 %
*/
#include "WlLddWlanLddConfig.h"
@@ -41,7 +41,8 @@
}
// ---------------------------------------------------------------------------
-//
+// Note! This method is executed in the context of the user mode client
+// thread, but in supervisor mode
// ---------------------------------------------------------------------------
//
TInt DWlanLogicalChannelBase::Request( TInt aReqNo, TAny* a1, TAny* a2 )
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlannwif/etherpkt/CardDll.cpp
--- a/wlan_bearer/wlannwif/etherpkt/CardDll.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlannwif/etherpkt/CardDll.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 12 %
+* %version: 13 %
*/
#include
@@ -82,7 +82,7 @@
User::LeaveIfError( iCard.Open() );
- User::LeaveIfError( iCard.InitialiseBuffers( iFrameXferBlock ) );
+ User::LeaveIfError( iCard.InitialiseBuffers() );
}
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlannwif/etherpkt/receiver_hw.cpp
--- a/wlan_bearer/wlannwif/etherpkt/receiver_hw.cpp Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlannwif/etherpkt/receiver_hw.cpp Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 12 %
+* %version: 13 %
*/
#include
@@ -31,7 +31,8 @@
//
CReceiver::CReceiver( CPcCardPktDrv* aParent ) :
CActive(EPriorityStandard),
- iParent(aParent)
+ iParent(aParent),
+ iFrameToFree( NULL )
{
}
@@ -67,6 +68,7 @@
{
DEBUG("CReceiver::~CReceiver()");
Cancel();
+ iFrameToFree = NULL;
}
// ---------------------------------------------------------
@@ -98,7 +100,11 @@
{
DEBUG("CReceiver::RunL()" );
- while( iParent->iFrameXferBlock->GetNextRxDataBuffer( iDataBuffer ) )
+ TUint rxCount( 0 );
+ const TUint KMaxRxCount( 4 );
+
+ while( ( rxCount < KMaxRxCount ) &&
+ ( iDataBuffer = iParent->iCard.GetRxFrame( iFrameToFree ) ) != NULL )
{
TUint8* buf = iDataBuffer->GetBuffer();
TUint32 len = iDataBuffer->GetLength();
@@ -126,10 +132,27 @@
iParent->iParent->Process( pFrame, bufOrig, iDataBuffer->UserPriority() );
}
}
+
+ iFrameToFree = iDataBuffer;
+ ++rxCount;
+ DEBUG1("CReceiver::RunL() - %u packet(s) processed", rxCount );
}
- if( iParent->CardOpen() )
+ if ( rxCount == KMaxRxCount )
{
- QueueRead();
+ DEBUG("CReceiver::RunL() - yield");
+
+ SetActive();
+ TRequestStatus* status = &iStatus;
+ User::RequestComplete( status, KErrNone );
+ }
+ else
+ {
+ iFrameToFree = NULL;
+
+ if( iParent->CardOpen() )
+ {
+ QueueRead();
+ }
}
}
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlannwif/inc/carddrv.h
--- a/wlan_bearer/wlannwif/inc/carddrv.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlannwif/inc/carddrv.h Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 9 %
+* %version: 10 %
*/
#ifndef __CARDDRV_H__
@@ -139,9 +139,6 @@
CReceiver* iReceiver;
/** */
RPcmNetCardIf iCard;
-
- /** */
- RFrameXferBlockProtocolStack* iFrameXferBlock;
};
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_bearer/wlannwif/inc/receiver_hw.h
--- a/wlan_bearer/wlannwif/inc/receiver_hw.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_bearer/wlannwif/inc/receiver_hw.h Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 7 %
+* %version: 8 %
*/
#ifndef _RECEIVER_HW_H_
@@ -82,6 +82,9 @@
/** */
TDataBuffer* iDataBuffer;
+ /** Rx frame to free */
+ TDataBuffer* iFrameToFree;
+
};
#endif //_RECEIVER_HW_H_
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_info/wlan_metadata/wlan_metadata.mrp
--- a/wlan_info/wlan_metadata/wlan_metadata.mrp Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-component wlan_metadata
-source \sf\os\wlan\wlan_info\wlan_metadata
-source \sf\os\wlan\package_definition.xml
-source \sf\os\wlan\distribution.policy.s60
-notes_source \component_defs\release.src
-ipr T
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_plat/wlan_info_api/inc/wlaninternalpskeys.h
--- a/wlan_plat/wlan_info_api/inc/wlaninternalpskeys.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_plat/wlan_info_api/inc/wlaninternalpskeys.h Fri Jun 18 09:56:50 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -18,7 +18,7 @@
*/
/*
-* %version: 7 %
+* %version: 8 %
*/
#ifndef WLANINTERNALPSKEYS_H
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_plat/wlan_management_api/inc/wlanerrorcodes.h
--- a/wlan_plat/wlan_management_api/inc/wlanerrorcodes.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_plat/wlan_management_api/inc/wlanerrorcodes.h Fri Jun 18 09:56:50 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
*/
/*
-* %version: 6 %
+* %version: 7 %
*/
#ifndef WLANERRORCODES_H
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_plat/wlan_management_api/inc/wlanmgmtcommon.h
--- a/wlan_plat/wlan_management_api/inc/wlanmgmtcommon.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_plat/wlan_management_api/inc/wlanmgmtcommon.h Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 10 %
+* %version: 11 %
*/
#ifndef WLANMGMTCOMMON_H
@@ -29,6 +29,9 @@
/** The maximum SSID length. */
const TUint KWlanMaxSsidLength = 32;
+/** The maximum WPS PIN length. */
+const TUint KWlanMaxWpsPinLength = 8;
+
/** The maximum BSSID length. */
const TUint KWlanMaxBssidLength = 6;
@@ -48,6 +51,9 @@
/** Data structure for storing the SSID of a WLAN network. */
typedef TBuf8 TWlanSsid;
+/** Data structure for storing the WPS Pin. */
+typedef TBuf8 TWlanWpsPin;
+
/** Data structure for storing the BSSID of a BSS. */
typedef TBuf8 TWlanBssid;
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlan_plat/wlan_management_api/inc/wlanmgmtinterface.h
--- a/wlan_plat/wlan_management_api/inc/wlanmgmtinterface.h Fri Jun 04 12:12:29 2010 +0300
+++ b/wlan_plat/wlan_management_api/inc/wlanmgmtinterface.h Fri Jun 18 09:56:50 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 16 %
+* %version: 17 %
*/
#ifndef WLANMGMTINTERFACE_H
@@ -215,13 +215,16 @@
* @param aStatus Status of the calling active object. On successful
* completion contains KErrNone, otherwise one of the
* system-wide error codes.
- * @param aId Service ID of network which user has selected to be configured.
+ * @param aSsid SSID of the network to configure.
+ * @param aWpsPin PIN value to be used. "00000000" (string of eight zeros)
+ * if push button method is used.
* @param aCredentials Results of a successful Protected Setup operation.
* @sa \link psetup Protected Setup-specific error codes \endlink.
*/
virtual void RunProtectedSetup(
TRequestStatus& aStatus,
- TUint32 aId,
+ const TWlanSsid& aSsid,
+ const TWlanWpsPin& aWpsPin,
CArrayFixSeg& aCredentials ) = 0;
/**
@@ -410,6 +413,7 @@
*/
virtual TInt StartAggressiveBgScan(
TUint aInterval ) = 0;
+
};
#endif // WLANMGMTINTERFACE_H
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/common/inc/DataWrapperBase.h
--- a/wlanapitest/wlanhaitest/common/inc/DataWrapperBase.h Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-#ifndef DATA_WRAPPER_BASE_H
-#define DATA_WRAPPER_BASE_H
-
-// EPOC includes
-#include
-#define SECS_TO_MS(x) (x*1000000)
-
-_LIT(KConsname, "Test Console");
-
-class CDataWrapperBase : public CDataWrapper
- {
-public:
- class TEnumEntryTable
- {
- public:
- const TDesC& iString;
- TInt iValue;
- };
-
-public:
- TBool GetBoolFromConfig(const TDesC& aSectName,const TDesC& aKeyName,TBool& aResult);
- TBool GetIntFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult);
- TBool GetStringFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult);
- TBool GetHexFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult);
- TBool GetUintFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TUint& aResult);
- TBool KeyPress();
- void Timedelay(TInt aTimeoutInSecs);
- virtual void InitialiseL();
- inline RFs& FileServer() { return iFs; }
- inline CConsoleBase* GetConsole() { return(Console::NewL(KConsname,TSize(KConsFullScreen,KConsFullScreen)));}
- void GetValidationBool(const TDesC& aSection, TInt aValue, TBool aForceValidation, const TDesC& aErrorMessage);
- void GetValidationInt(const TDesC& aSection, TInt aValue, TBool aForceValidation, const TDesC& aErrorMessage);
- void GetValidationUint(const TDesC& aSection, TInt aValue, TBool aForceValidation, const TDesC& aErrorMessage);
- TBool GetArrayFromConfig(const TDesC& aSectName, const TDesC& aKeyName, RPointerArray& aResult);
- TBool GetEnumFromConfig(const TDesC& aSectName, const TDesC& aKeyName, const TEnumEntryTable* aTable, TInt& aResult);
-
-protected:
- CDataWrapperBase();
- virtual ~CDataWrapperBase();
-
-private:
- TBool GetCommandStringParameterL(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult);
- TBool KeyCheck();
-
-private:
- // Included ini files
- RPointerArray iInclude;
- RPointerArray iBuffer;
- RFs iFs;
- RTimer iTimer;
- };
-
-#endif // DATA_WRAPPER_BASE_H
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/common/src/DataWrapperBase.cpp
--- a/wlanapitest/wlanhaitest/common/src/DataWrapperBase.cpp Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,517 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#include "datawrapperbase.h"
-
-/*@{*/
-/// Constant Literals used.
-_LIT(KPrefixHex, "0x");
-_LIT(KPrefixOctal, "0");
-_LIT(KSuffixBinary, "b");
-
-_LIT(KIncludeSection, "include");
-_LIT(KFile, "file%d");
-_LIT(KMatch, "*{*,*}*");
-_LIT(KStart, "{");
-_LIT(KSeparator, ",");
-_LIT(KEnd, "}");
-_LIT(KDataRead, "INI READ : %S %S %S");
-_LIT(KLogMissingParameter, "Missing parameter '%S'");
-_LIT(KExpected, "expected");
-/*@}*/
-
-CDataWrapperBase::CDataWrapperBase()
-: CDataWrapper()
- {
- }
-
-/**
- * Public destructor
- */
-CDataWrapperBase::~CDataWrapperBase()
- {
- iInclude.ResetAndDestroy();
- iBuffer.ResetAndDestroy();
- iFs.Close();
- }
-
-void CDataWrapperBase::InitialiseL()
- {
- iTimer.CreateLocal();
- CDataWrapper::InitialiseL();
- TBuf tempStore;
- TPtrC fileName;
- TBool moreData=ETrue;
- TBool index=0;
- while ( moreData )
- {
- tempStore.Format(KFile(), ++index);
- moreData=GetStringFromConfig(KIncludeSection, tempStore, fileName);
-
- if (moreData)
- {
- CIniData* iniData=CIniData::NewL(fileName);
- CleanupStack::PushL(iniData);
- iInclude.Append(iniData);
- CleanupStack::Pop(iniData);
- }
- }
- User::LeaveIfError(iFs.Connect());
- }
-
-/**
- * Reads the value present from the test steps ini file within the mentioned section name and key name
- * Copies the value to the TBool reference passed in possible values TRUE, FALSE
- * @param aSectName - Section within the test steps ini file
- * @param aKeyName - Name of a key within a section
- * @return aResult - The value of the boolean
- * @return TBool - ETrue for found, EFalse for not found
- */
-TBool CDataWrapperBase::GetBoolFromConfig(const TDesC& aSectName,const TDesC& aKeyName,TBool& aResult)
- {
- TBool ret=EFalse;
- TPtrC result;
- TRAPD(err, ret=GetCommandStringParameterL(aSectName, aKeyName, result));
- if ( err != KErrNone )
- {
- ret=EFalse;
- }
- if ( ret )
- {
- _LIT(KTrue,"true");
- aResult=(result.FindF(KTrue) != KErrNotFound);
- }
-
- return ret;
- }
-
-/**
- * Reads the value present from the test steps ini file within the mentioned section name and key name
- * Copies the value to the TInt reference passed in
- * @param aSectName - Section within the test steps ini file
- * @param aKeyName - Name of a key within a section
- * @return aResult - The value of the integer
- * @return TBool - ETrue for found, EFalse for not found
- */
-TBool CDataWrapperBase::GetIntFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult)
- {
- TPtrC result;
- TBool ret=EFalse;
- TRAPD(err, ret=GetCommandStringParameterL(aSectName, aKeyName, result));
- if ( err != KErrNone )
- {
- ret=EFalse;
- }
- if ( ret )
- {
- TLex lex(result);
- ret=(lex.Val(aResult)==KErrNone);
- }
-
- return ret;
- }
-
-/**
- * Reads the value present from the test steps ini file within the mentioned section name and key name
- * Copies the value to the TPtrC reference passed in
- * @param aSectName - Section within the test steps ini file
- * @param aKeyName - Name of a key within a section
- * @return aResult - Reference to the string on the heap
- * @return TBool - ETrue for found, EFalse for not found
- */
-TBool CDataWrapperBase::GetStringFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult)
- {
- TBool ret=EFalse;
- TRAPD(err, ret=GetCommandStringParameterL(aSectName, aKeyName, aResult));
- if ( err != KErrNone )
- {
- ret=EFalse;
- }
- return ret;
- }
-
-/**
- * Reads the value present from the test steps ini file within the mentioned section name and key name
- * Copies the value to the TInt reference passed in. The value can optionally be prefixed with 0x
- * @param aSectName - Section within the test steps ini file
- * @param aKeyName - Name of a key within a section
- * @return aResult - The integer value of the Hex input
- * @return TBool - ETrue for found, EFalse for not found
- */
-TBool CDataWrapperBase::GetHexFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TInt& aResult)
- {
- TPtrC result;
- TBool ret=EFalse;
- TRAPD(err, ret=GetCommandStringParameterL(aSectName, aKeyName, result));
- if ( err != KErrNone )
- {
- ret=EFalse;
- }
- if ( ret )
- {
- TLex lex;
- if( result.FindC(KPrefixHex)==KErrNone )
- {
- lex=result.Mid(KPrefixHex().Length());
- }
- else
- {
- lex=result;
- }
- ret=(lex.Val((TUint &)aResult, EHex)==KErrNone);
- }
-
- return ret;
- }
-
-/**
- * Reads the value present from the test steps ini file within the mentioned section name and key name
- * Copies the value to the TUint reference passed in.
- * If the value is prefixed with 0x the value is read as a hexadecimal value
- * If the value is suffixed with b the value is read as a binary value
- * If the value is prefixed with a 0 the value is read as an octal value
- * If it does not match the above it is read in as an integer
- * @param aSectName - Section within the test steps ini file
- * @param aKeyName - Name of a key within a section
- * @return aResult - The integer value of the Hex input
- * @return TBool - ETrue for found, EFalse for not found
- */
-TBool CDataWrapperBase::GetUintFromConfig(const TDesC& aSectName, const TDesC& aKeyName, TUint& aResult)
- {
- TPtrC result;
- TBool ret=EFalse;
- TRAPD(err, ret=GetCommandStringParameterL(aSectName, aKeyName, result));
- if ( err != KErrNone )
- {
- ret=EFalse;
- }
- if ( ret )
- {
- TLex lex(result);
- if( result.FindC(KPrefixHex)==KErrNone )
- {
- lex=result.Mid(KPrefixHex().Length());
- ret=(lex.Val(aResult, EHex)==KErrNone);
- }
- else
- {
- TInt binarySuffixPosition=result.Length()-KSuffixBinary().Length();
- if ( result.FindC(KSuffixBinary)==binarySuffixPosition )
- {
- lex=result.Left(binarySuffixPosition);
- ret=(lex.Val(aResult, EBinary)==KErrNone);
- }
- else
- {
- if( result.FindC(KPrefixOctal)==KErrNone )
- {
- ret=(lex.Val(aResult, EOctal)==KErrNone);
- }
- else
- {
- TInt intResult;
- ret=(lex.Val(intResult)==KErrNone);
- if ( ret )
- {
- aResult=(TUint)intResult;
- }
- }
- }
- }
- }
-
- return ret;
- }
-
-TBool CDataWrapperBase::GetCommandStringParameterL(const TDesC& aSectName, const TDesC& aKeyName, TPtrC& aResult)
- {
- TBool ret=EFalse;
-
- if ( aSectName.Length()!=0 )
- {
- ret=CDataWrapper::GetStringFromConfig(aSectName, aKeyName, aResult);
-
- for ( TInt index=iInclude.Count(); (index>0) && (!ret); )
- {
- ret=iInclude[--index]->FindVar(aSectName, aKeyName, aResult);
- }
- }
-
- if ( ret )
- {
- if ( aResult.Match(KMatch)!=KErrNotFound )
- {
- // We have an entry of the format
- // entry =*{section,entry}*
- // where * is one or more characters
- // We need to construct this from other data in the ini file replacing {*,*}
- // with the data from
- // [section]
- // entry =some_value
- HBufC* buffer=HBufC::NewLC(aResult.Length());
- buffer->Des().Copy(aResult);
-
- TInt startLength=KStart().Length();
- TInt sparatorLength=KSeparator().Length();
- TInt endLength=KEnd().Length();
- TInt bufferLength;
- TInt start;
- TInt sparator;
- TInt end;
- TPtrC remaining;
- TLex lex;
- do
- {
- bufferLength=buffer->Length();
- start=buffer->Find(KStart);
-
- remaining.Set(buffer->Des().Right(bufferLength-start-startLength));
- sparator=remaining.Find(KSeparator);
- remaining.Set(remaining.Right(remaining.Length()-sparator-sparatorLength));
- sparator += (start + startLength);
-
- end=remaining.Find(KEnd) + sparator + sparatorLength;
-
- TPtrC sectionName(buffer->Ptr()+start+startLength, sparator-start-startLength);
- TPtrC keyName(buffer->Ptr()+sparator+sparatorLength, end-sparator-sparatorLength);
- sectionName.Set(TLex(sectionName).NextToken());
- keyName.Set(TLex(keyName).NextToken());
-
- TInt entrySize=0;
- TPtrC entryData;
- TBool found=CDataWrapper::GetStringFromConfig(sectionName, keyName, entryData);
- for ( TInt index=iInclude.Count(); (index>0) && (!found); )
- {
- found=iInclude[--index]->FindVar(sectionName, keyName, entryData);
- }
- if ( found )
- {
- entrySize=entryData.Length();
- }
-
- TInt newLength=start + bufferLength - end - endLength + entrySize;
- HBufC* bufferNew=HBufC::NewLC(newLength);
- bufferNew->Des().Copy(buffer->Ptr(), start);
- if ( entrySize>0 )
- {
- bufferNew->Des().Append(entryData);
- }
- bufferNew->Des().Append(buffer->Ptr() + end + endLength, bufferLength - end - endLength);
- CleanupStack::Pop(bufferNew);
- CleanupStack::PopAndDestroy(buffer);
- buffer=bufferNew;
- CleanupStack::PushL(buffer);
- }
- while ( buffer->Match(KMatch)!=KErrNotFound );
- iBuffer.Append(buffer);
- CleanupStack::Pop(buffer);
- aResult.Set(*buffer);
- INFO_PRINTF4(KDataRead, &aSectName, &aKeyName , &aResult);
- }
- }
-
- return ret;
- }
-
-
-/**
- *Utility function to produce time delay
- * @param aTimeoutInSecs Times in micro seconds
- */
-void CDataWrapperBase::Timedelay(TInt aTimeoutInSecs)
- {
- TRequestStatus status;
- iTimer.After(status, aTimeoutInSecs);
- User::WaitForRequest(status);
- }
-
-
-/** Validates the returned valua as a Bool. Compares aValue with the expected result in the ini file and Sets the block result to EFail if not equal.
- * @param aSection - Section within the ini file to read the expected value
- * @param aValue - The value we need to validate
- * @param aForceValidation - ETrue forces validation if there's a missing parameter.
- * @param aErrorMessage - Contains a descriptor with a custom error message
- * @return - Print error messages to log file
- * @return - Sets test block result
- */
-void CDataWrapperBase::GetValidationBool(const TDesC& aSection, TInt aValue, TBool aForceValidation, const TDesC& aErrorMessage)
- {
- TBool expectedValue;
- TBool ret=GetBoolFromConfig(aSection, KExpected(), expectedValue);
- if ( !ret )
- {
- if ( aForceValidation )
- {
- ERR_PRINTF2(KLogMissingParameter, & KExpected);
- SetBlockResult(EFail);
- }
- }
- else
- {
- if ( aValue!=expectedValue )
- {
- SetBlockResult(EFail);
- ERR_PRINTF1(aErrorMessage);
- ERR_PRINTF3(_L("Retrived Value(%d) != expectedValue(%d)"), aValue, expectedValue);
- }
- }
- }
-
-
-/**
- * Validates the returned valua as a TInt. Compares aValue with the expected result in the ini file and Sets the block result to EFail if not equal.
- * @param aSection - Section within the ini file to read the expected value
- * @param aValue - The value we need to validate
- * @param aForceValidation - ETrue forces validation if there's a missing parameter.
- * @param aErrorMessage - Contains a descriptor with a custom error message
- * @return - Print error messages to log file
- * @return - Sets test block result
- */
-void CDataWrapperBase::GetValidationInt(const TDesC& aSection, TInt aValue, TBool aForceValidation, const TDesC& aErrorMessage)
- {
- TInt expectedValue;
- TBool ret=GetIntFromConfig(aSection, KExpected(), expectedValue);
- if ( !ret )
- {
- if ( aForceValidation )
- {
- ERR_PRINTF2(KLogMissingParameter, &KExpected());
- SetBlockResult(EFail);
- }
- }
- else
- {
- if ( aValue!=expectedValue )
- {
- SetBlockResult(EFail);
- ERR_PRINTF1(aErrorMessage);
- ERR_PRINTF3(_L("Retrived Value(%d) != expectedValue(%d)"), aValue, expectedValue);
- }
- }
- }
-
-/**
- * Validates the returned valua as a TUint. Compares aValue with the expected result in the ini file and Sets the block result to EFail if not equal.
- * @param aSection - Section within the ini file to read the expected value
- * @param aValue - The value we need to validate
- * @param aForceValidation - ETrue forces validation if there's a missing parameter.
- * @param aErrorMessage - Contains a descriptor with a custom error message
- * @return - Print error messages to log file
- * @return - Sets test block result
- */
-void CDataWrapperBase::GetValidationUint(const TDesC& aSection, TInt aValue, TBool aForceValidation, const TDesC& aErrorMessage)
- {
- TUint expectedValue;
- TBool ret=GetUintFromConfig(aSection, KExpected(), expectedValue);
- if ( !ret )
- {
- if ( aForceValidation )
- {
- ERR_PRINTF2(KLogMissingParameter, &KExpected());
- SetBlockResult(EFail);
- }
- }
- else
- {
- if ( aValue!=expectedValue )
- {
- SetBlockResult(EFail);
- ERR_PRINTF1(aErrorMessage);
- ERR_PRINTF3(_L("Retrived Value(%d) != expectedValue(%d)"), aValue, expectedValue);
- }
- }
- }
-
-
-/**
- * Return array of string parameters i.e. key=a1,a2,a3 returns array which contains
- * String a1, a2 and a3.
- * @return ret - EFalse if can't get a String parameter from Config file. ETrue if KErrNone
- */
-TBool CDataWrapperBase::GetArrayFromConfig(const TDesC& aSectName, const TDesC& aKeyName, RPointerArray& aResult)
- {
- TBool ret=EFalse;
- TPtrC completeArray;
-
- TRAPD(err, ret=GetCommandStringParameterL(aSectName, aKeyName, completeArray));
- if ( err != KErrNone )
- {
- ret=EFalse;
- }
-
- TLex16 lex(completeArray); // Here we have the array as a string i.e. "a1,a2,a3"
- TBuf<256> buf;
- TChar chr;
-
- while(!lex.Eos())
- {
- chr = lex.Get();
- // Check if there was a list separator
- if (chr == ',')
- {
- HBufC* param = buf.AllocLC();
- buf.Zero();
- aResult.Append(param);
- CleanupStack::Pop(param); // pointer to buf is stored in RPointerArray
- }
- // If not separator character we can store the character into array
- else
- {
- buf.Append(chr);
- }
- }
- // Remember to put last token into array (,a3)
- HBufC* param = buf.AllocLC();
- aResult.Append(param);
- CleanupStack::Pop(param);
-
- return ret;
- }
-
-
-TBool CDataWrapperBase::GetEnumFromConfig(const TDesC& aSectName, const TDesC& aKeyName, const TEnumEntryTable* aTable, TInt& aResult)
- {
- TPtrC str;
- TBool ret=GetStringFromConfig(aSectName, aKeyName, str);
-
- if ( ret )
- {
- TBool found=EFalse;
- TInt index=0;
- while ( (aTable[index].iValue!=-1) && !found )
- {
- if ( aTable[index].iString==str )
- {
- found=ETrue;
- aResult=aTable[index].iValue;
- }
- else
- {
- ++index;
- }
- }
-
- if ( !found )
- {
- ret=GetIntFromConfig(aSectName, aKeyName, aResult);
- }
- }
-
- return ret;
- }
-
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/group/bld.inf
--- a/wlanapitest/wlanhaitest/group/bld.inf Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-//
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-//
-
-#include "../wlan/group/bld.inf"
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/group/device.cfg
--- a/wlanapitest/wlanhaitest/group/device.cfg Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-//
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-//
-
-
-// Used within the build process to export the correct files for the supported devices
-// Uncomment only one of the devices definied in listed below
-
-#define TEST_DEVICE_DEVLON52
-//#define TEST_DEVICE_TUBE
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/group/release.txt
--- a/wlanapitest/wlanhaitest/group/release.txt Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-NOTESRC_RELEASER
-Nokia Corporation
-
-NOTESRC_RELEASE_REASON
-WLAN SALT
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/group/testdriversetup.bat
--- a/wlanapitest/wlanhaitest/group/testdriversetup.bat Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-@rem
-@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description:
-@rem
-
-perl testdriversetup.pl
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/group/testdriversetup.pl
--- a/wlanapitest/wlanhaitest/group/testdriversetup.pl Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-#
-# Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-#
-use Cwd;
-
-my $theEpocRoot=$ENV{EPOCROOT};
-my $epoc32Location="$theEpocRoot.\\epoc32";
-
-my $currentDirectory=cwd;
-$currentDirectory =~ s/Group//i;
-$currentDirectory =~ s/\//\\/g;
-
-my $currentDrive = substr($currentDirectory,0,2);
-
-my $cmd="TestDriver config";
-my $suite="file:/$currentDrive$epoc32Location\\testdriver\\salt\\wlanhai.driver";
-$suite =~ s.\\./.g;
-$suite =~ s\/./\/\g;
-
-$cmd .= " --bldclean OFF";
-$cmd .= " --bldmake OFF";
-$cmd .= " -e $currentDrive$theEpocRoot";
-$cmd .= " -x $currentDrive$epoc32Location\\testdriver\\salt";
-$cmd .= " --repos $currentDrive$epoc32Location\\testdriver\\Repository";
-$cmd .= " -c $currentDrive$epoc32Location\\testdriver\\Results";
-$cmd .= " -i $currentDirectory";
-$cmd .= " -s $suite";
-$cmd .= " --source $currentDirectory";
-$cmd .= " --tp $currentDirectory";
-$cmd .= " --testexec auto";
-$cmd .= " --statlite false";
-$cmd .= " --teflite true";
-$cmd .= " --commdb overwrite";
-system("$cmd");
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/group/wlanhaitest.mrp
--- a/wlanapitest/wlanhaitest/group/wlanhaitest.mrp Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-#
-# Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-#
-component wlanhaitest
-source \sf\os\wlan\wlanapitest\wlanhaitest
-notes_source \sf\os\wlan\wlanapitest\wlanhaitest\group\release.txt
-ipr T
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/testsuites/group/bld.inf
--- a/wlanapitest/wlanhaitest/testsuites/group/bld.inf Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-//
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-//
-
-PRJ_TESTEXPORTS
-../wlan/wlanhai.driver /epoc32/testdriver/salt/wlanhai.driver
\ No newline at end of file
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/testsuites/wlan/wlanhai.driver
--- a/wlanapitest/wlanhaitest/testsuites/wlan/wlanhai.driver Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-
-
-
-
-
-
-
-
- t_wlan
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/group/T_Wlan.mmp
--- a/wlanapitest/wlanhaitest/wlan/group/T_Wlan.mmp Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#include
-OS_LAYER_SYSTEMINCLUDE_SYMBIAN
-
-TARGET t_wlan.exe
-TARGETTYPE exe
-UID 0x102863E6 0xA00041CB
-VENDORID 0x70000001
-
-capability All -Tcb
-
-SOURCEPATH ../src
-
-SOURCE ../../common/src/datawrapperbase.cpp
-SOURCE t_wlandriverserver.cpp
-SOURCE t_wlanmgmtclientdata.cpp
-SOURCE t_wlanscaninfodata.cpp
-SOURCE t_rsocketservdata.cpp
-SOURCE t_rconnectiondata.cpp
-SOURCE t_ccommsdatabasedata.cpp
-SOURCE t_ccommsdbtableviewdata.cpp
-SOURCE t_rsocketdata.cpp
-SOURCE t_rfiledata.cpp
-
-USERINCLUDE ../inc
-USERINCLUDE ../../common/inc
-
-
-SYSTEMINCLUDE /epoc32/include
-SYSTEMINCLUDE /epoc32/include/test
-SYSTEMINCLUDE /epoc32/include/kernel
-SYSTEMINCLUDE /epoc32/include/ecom
-SYSTEMINCLUDE /epoc32/include/mw
-
-LIBRARY testexecuteutils.lib
-LIBRARY testexecutelogclient.lib
-LIBRARY iniparser.lib
-LIBRARY euser.lib
-LIBRARY ecom.lib
-LIBRARY flogger.lib
-LIBRARY commdb.lib
-LIBRARY esock.lib
-LIBRARY insock.lib
-LIBRARY wlandbif.lib
-LIBRARY efsrv.lib
-LIBRARY eikcore.lib
-LIBRARY apengine.lib
-
-SMPSAFE
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/group/bld.inf
--- a/wlanapitest/wlanhaitest/wlan/group/bld.inf Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-//
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-//
-
-#include "../../group/device.cfg"
-#include "../../testsuites/group/bld.inf"
-
-PRJ_TESTEXPORTS
-t_wlan.iby /epoc32/rom/haitests/t_wlan.iby
-t_wlan_binaries.iby /epoc32/rom/haitests/t_wlan_binaries.iby
-t_wlan_testdata.iby /epoc32/rom/haitests/t_wlan_testdata.iby
-
-../pkg/t_wlan.bat c:/nt/wlan/t_wlan.bat
-
-../scripts/networking-wlan-validation-automated-connection.script c:/nt/wlan/networking-wlan-validation-automated-connection.script
-../scripts/networking-wlan-validation-automated-instantiate.script c:/nt/wlan/networking-wlan-validation-automated-instantiate.script
-../scripts/networking-wlan-validation-automated-transfer.script c:/nt/wlan/networking-wlan-validation-automated-transfer.script
-../testdata/networking-wlan-validation-automated-connection.ini c:/nt/wlan/networking-wlan-validation-automated-connection.ini
-../testdata/networking-wlan-validation-automated-instantiate.ini c:/nt/wlan/networking-wlan-validation-automated-instantiate.ini
-../testdata/networking-wlan-validation-automated-transfer.ini c:/nt/wlan/networking-wlan-validation-automated-transfer.ini
-../testdata/t_wlan_environment.ini c:/nt/wlan/t_wlan_environment.ini
-
-#if defined(TEST_DEVICE_DEVLON52)
-../testdata/devlon52/t_wlan.ini c:/nt/wlan/t_wlan.ini
-../testdata/devlon52/t_wlan.tcs c:/nt/wlan/t_wlan.tcs
-#endif
-
-#if defined(TEST_DEVICE_TUBE)
-../testdata/tube/t_wlan.ini c:/nt/wlan/t_wlan.ini
-../testdata/tube/t_wlan.tcs c:/nt/wlan/t_wlan.tcs
-#endif
-
-PRJ_TESTMMPFILES
-t_wlan.mmp
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/group/t_wlan.iby
--- a/wlanapitest/wlanhaitest/wlan/group/t_wlan.iby Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-//
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-//
-
-#if (!defined __T_WLAN_IBY__)
-#define __T_WLAN_IBY__
-
-//Test Includes
-#include <..\haitests\t_wlan_binaries.iby>
-#include <..\haitests\t_wlan_testdata.iby>
-
-#endif
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/group/t_wlan_binaries.iby
--- a/wlanapitest/wlanhaitest/wlan/group/t_wlan_binaries.iby Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-//
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-//
-
-#if (!defined __T_WLAN_BINARIES_IBY__)
-#define __T_WLAN_BINARIES_IBY__
-
-#if (!defined EKA2)
-file=\Epoc32\Release\armv5\urel\t_wlan.exe \sys\bin\t_wlan.exe
-#else
-file=\Epoc32\Release\armv5\urel\t_wlan.exe \sys\bin\t_wlan.exe
-#endif
-
-#endif
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/group/t_wlan_testdata.iby
--- a/wlanapitest/wlanhaitest/wlan/group/t_wlan_testdata.iby Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-//
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-//
-
-#if (!defined __T_WLAN_TESTDATA_IBY__)
-#define __T_WLAN_TESTDATA_IBY__
-
-data=EPOCROOT##Epoc32\data\c\nt\wlan\t_wlan.bat nt\wlan\t_wlan.bat
-data=EPOCROOT##Epoc32\data\c\nt\wlan\networking-wlan-validation-automated-connection.script nt\wlan\networking-wlan-validation-automated-connection.script
-data=EPOCROOT##Epoc32\data\c\nt\wlan\networking-wlan-validation-automated-instantiate.script nt\wlan\networking-wlan-validation-automated-instantiate.script
-data=EPOCROOT##Epoc32\data\c\nt\wlan\networking-wlan-validation-automated-transfer.script nt\wlan\networking-wlan-validation-automated-transfer.script
-data=EPOCROOT##Epoc32\data\c\nt\wlan\networking-wlan-validation-automated-connection.ini nt\wlan\networking-wlan-validation-automated-connection.ini
-data=EPOCROOT##Epoc32\data\c\nt\wlan\networking-wlan-validation-automated-instantiate.ini nt\wlan\networking-wlan-validation-automated-instantiate.ini
-data=EPOCROOT##Epoc32\data\c\nt\wlan\networking-wlan-validation-automated-transfer.ini nt\wlan\networking-wlan-validation-automated-transfer.ini
-data=EPOCROOT##Epoc32\data\c\nt\wlan\t_wlan_environment.ini nt\wlan\t_wlan_environment.ini
-data=EPOCROOT##Epoc32\data\c\nt\wlan\t_wlan.ini nt\wlan\t_wlan.ini
-data=EPOCROOT##Epoc32\data\c\nt\wlan\t_wlan.tcs nt\wlan\t_wlan.tcs
-
-#endif
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/group/user_input.oby
--- a/wlanapitest/wlanhaitest/wlan/group/user_input.oby Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-//
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-//
-
-file=\Epoc32\Release\armv5\urel\testexecutelogclient.dll \sys\bin\testexecutelogclient.dll
-file=\Epoc32\Release\armv5\urel\testexecutelogengine.exe \sys\bin\testexecutelogengine.exe
-file=\Epoc32\Release\armv5\urel\cinidata.dll \sys\bin\cinidata.dll
-file=\Epoc32\Release\armv5\urel\RFileLoggerClient.dll \sys\bin\RFileLoggerClient.dll
-file=\Epoc32\Release\armv5\urel\RFileLoggerServer.exe \sys\bin\RFileLoggerServer.exe
-file=\Epoc32\Release\armv5\urel\testexecute.exe \sys\bin\testexecute.exe
-file=\Epoc32\Release\armv5\urel\testexecuteutils.dll \sys\bin\testexecuteutils.dll
-data=\Epoc32\data\c\system\data\testexecute.ini \system\data\testexecute.ini
-
-file=\Epoc32\Release\armv5\urel\statapi.exe \sys\bin\statapi.exe
-data=\Epoc32\data\c\system\data\stat.ini \system\data\stat.ini
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/inc/T_CCommsDatabaseData.h
--- a/wlanapitest/wlanhaitest/wlan/inc/T_CCommsDatabaseData.h Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-#ifndef T_CCOMMSDATABASEDATA_H_
-#define T_CCOMMSDATABASEDATA_H_
-
-//User Includes
-#include "datawrapperbase.h"
-
-//Epoc includes
-#include
-
-class CT_CCommsDatabaseData: public CDataWrapperBase
- {
-public:
- static CT_CCommsDatabaseData* NewL();
- virtual ~CT_CCommsDatabaseData();
-
-public:
- virtual TAny* GetObject();
- virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
-
-protected:
- CT_CCommsDatabaseData();
- void ConstructL();
-
-private:
- void DoCmdNewL();
- void DoCmdDestructor();
- void DestroyData();
-
-private:
- /**
- * Wrapped object
- */
- CCommsDatabase* iCommsDat;
-
- };
-
-#endif /*T_CCOMMSDATABASEDATA_H_*/
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/inc/T_CCommsDbTableViewData.h
--- a/wlanapitest/wlanhaitest/wlan/inc/T_CCommsDbTableViewData.h Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-#ifndef T_CCOMMSDBTABLEVIEWDATA_H_
-#define T_CCOMMSDBTABLEVIEWDATA_H_
-
-//User Includes
-#include "datawrapperbase.h"
-
-//Epoc includes
-#include
-
-class CT_CCommsDbTableViewData: public CDataWrapperBase
- {
-public:
- static CT_CCommsDbTableViewData* NewL();
- virtual ~CT_CCommsDbTableViewData();
-
-public:
- virtual TAny* GetObject();
- virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
-
-protected:
- CT_CCommsDbTableViewData();
- void ConstructL();
-
-private:
- void DoCmdNewL(const TTEFSectionName& aSection);
- void DoCmdDestructor();
- void DestroyData();
-
-private:
- /**
- * Wrapped object
- */
- CCommsDbTableView* iSearchView;
-
- };
-
-#endif /*T_CCOMMSDBTABLEVIEW_H_*/
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/inc/T_RConnectionData.h
--- a/wlanapitest/wlanhaitest/wlan/inc/T_RConnectionData.h Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-
-#ifndef T_RCONNECTIONDATA_H_
-#define T_RCONNECTIONDATA_H_
-
-//User Includes
-#include "datawrapperbase.h"
-
-//Epoc includes
-#include //RConnection
-
-class CT_RConnectionData: public CDataWrapperBase
- {
- public:
- static CT_RConnectionData* NewL();
- virtual ~CT_RConnectionData();
-
-public:
- virtual TAny* GetObject();
- virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
-
-protected:
- CT_RConnectionData();
- void ConstructL();
-
-private:
- void DoCmdOpen(const TTEFSectionName& aSection);
- void DoCmdStart(const TTEFSectionName& aSection);
- void DoCmdClose();
- void Close();
-
-private:
- /**
- * Wrapped object
- */
- RConnection* iConnection;
- };
-#endif /*T_RCONNECTIONDATA_H_*/
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/inc/T_RFileData.h
--- a/wlanapitest/wlanhaitest/wlan/inc/T_RFileData.h Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-
-#ifndef T_RFILEDATA_H_
-#define T_RFILEDATA_H_
-
-//User Includes
-#include "datawrapperbase.h"
-
-class CT_RFileData: public CDataWrapperBase
- {
-public:
- static CT_RFileData* NewL();
- virtual ~CT_RFileData();
-
-public:
- virtual TAny* GetObject();
- virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
-
-protected:
- CT_RFileData();
- void ConstructL();
-
-private:
- void DoCmdGenerateFile(const TTEFSectionName& aSection);
-
-private:
- /**
- * For create a file
- */
- RFile* iFile;
-
- /**
- * Handle for file server session
- */
- RFs iFs;
- };
-
-#endif /*T_RFILEDATA_H_*/
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/inc/T_RSocketData.h
--- a/wlanapitest/wlanhaitest/wlan/inc/T_RSocketData.h Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-#ifndef T_RSOCKETDATA_H_
-#define T_RSOCKETDATA_H_
-
-//User Includes
-#include "datawrapperbase.h"
-
-//Epoc includes
-#include // RSocketServ, RConnection
-#include // KAfInet
-#include
-#include
-
-
-class CT_RSocketData: public CDataWrapperBase
- {
-public:
- static CT_RSocketData* NewL();
- void RunL(CActive* aActive, TInt aIndex);
- virtual ~CT_RSocketData();
-
-public:
- virtual TAny* GetObject();
- void ErrorMessage(const TInt aMessage);
- virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
-
-protected:
- CT_RSocketData();
- void ConstructL();
-
-private:
- void DoCmdOpen(const TTEFSectionName& aSection);
- void DoCmdConnect(const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
- void DoCmdShutdown(const TInt aAsyncErrorIndex);
- void DoCmdClose();
- void DoCmdHttpGet();
- void DoCmdCheckSupportedRates(const TTEFSectionName& aSection);
- void DoCmdUploadSendHTTPPost(const TTEFSectionName& aSection);
- void CreateHTTPHeaderStart(TDes8& aRequest, TInt aDataSize, TDesC& aFileServer,TDesC& clientID,TDesC& serverScript);
- void SendFileToSocketL(const TDesC& aFilename);
- TInt ReadFileSizeL(const TDesC& aFilename);
- void CreateHTTPHeaderEnd(TDes8& aRequest);
- TBool CheckSupportedRates(const TDesC8& aSupportedRates, const TUint8 aRate);
- void Shutdown();
- void DoCmdDownloadSendHTTPGet(const TTEFSectionName& aSection, const TInt aAsyncErrorIndex );
- void DoCmdRecvOneOrMore(const TTEFSectionName& aSection);
- void Close();
- TReal ThroughputInMegaBits( TTimeIntervalMicroSeconds aDuration, TInt aTotalTransferred );
- void RecvOneOrMore(TRequestStatus& status);
-
-private:
- /**
- * Wrapped object
- */
- RSocket* iSocket;
- /**
- * Used in the command DoCmdDownloadSendHTTPGet for RSocket::Write
- */
- CActiveCallback* iActiveCallback;
- /**
- * Used in the command DoCmdConnect for RSocket::Connect
- */
- CActiveCallback* iActCallConnectSocket;
- /**
- * Used in the command DoCmdConnectSocket for RSocket::Connect
- */
- CActiveCallback* iActCallShutDownSocket;
- /**
- * Flag to review if the Socket is Open with RSocket::Connect
- */
- TBool iSocketOpened;
- /**
- * flag to review if the Socket was shutdown
- */
- TBool iSocketStarted;
- /**
- * Async data
- */
- TInt iAsyncErrorIndex;
- /**
- * Buffer for Download in DoCmdReceiveHTTPResponse command
- */
- HBufC8* iDownloadBuffer;
- /**
- * Buffer for Upload in SendFileToSocket
- */
- HBufC8* iUploadBuffer;
- /**
- * Header for response HTPP
- */
- RBuf8 iHttpResponseHeader;
- /**
- * Download throughput
- */
- TReal iDownloadThroughput;
- /**
- * Handle for Filse server session
- */
- RFs iFs;
- /**
- * Upload throughput
- */
- TReal iUploadThroughput;
- /**
- * Bytes received in DoCmdHttpGet
- */
- TInt itotalReceived;
- };
-
-#endif /*T_RSOCKETDATA_H_*/
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/inc/T_RSocketServData.h
--- a/wlanapitest/wlanhaitest/wlan/inc/T_RSocketServData.h Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-#ifndef T_RSOCKETSERVDATA_H_
-#define T_RSOCKETSERVDATA_H_
-
-//User Includes
-#include "datawrapperbase.h"
-
-//Epoc includes
-#include // RSocketServ, RConnection
-
-class CT_RSocketServData: public CDataWrapperBase
- {
-public:
- static CT_RSocketServData* NewL();
- virtual ~CT_RSocketServData();
-
-public:
- virtual TAny* GetObject();
- virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
- void SetIapID(TUint32 );
- TUint32 GetIapID(){return iIapID;}
-
-protected:
- CT_RSocketServData();
- void ConstructL();
-
-private:
- void DoCmdSetOutgoingIap(const TTEFSectionName& aSection);
- void DoCmdConnect();
- void DoCmdClose();
- void Close();
-
-private:
- /**
- * Wrapped object
- */
- RSocketServ* iSocketServ;
- /**
- * Flag to review RSocketServ is in Connected state
- */
- TBool iSocketServConnected;
- /**
- * Store de ID of the IAP
- */
- TUint32 iIapID;
-
- };
-#endif /*T_RSOCKETSERVDATA_H_*/
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/inc/T_WlanDriverServer.h
--- a/wlanapitest/wlanhaitest/wlan/inc/T_WlanDriverServer.h Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-#ifndef T_WLAN_DRIVER_SERVER_H
-#define T_WLAN_DRIVER_SERVER_H
-
-//Epoc includes
-#include
-
-/**
- * This wrapper class extends the test server and creates test server for Wlan driver
- */
-class CT_WlanDriverServer : public CTestServer2
- {
-private:
- class CT_WlanDriverBlock : public CTestBlockController
- {
- public:
- inline CT_WlanDriverBlock();
- inline ~CT_WlanDriverBlock();
-
- CDataWrapper* CreateDataL( const TDesC& aData );
- };
-
-public:
- static CT_WlanDriverServer* NewL();
- inline CTestBlockController* CreateTestBlock();
- };
-
-#include "t_wlandriverserver.inl"
-
-#endif // T_WLAN_DRIVER_SERVER_H
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/inc/T_WlanDriverServer.inl
--- a/wlanapitest/wlanhaitest/wlan/inc/T_WlanDriverServer.inl Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-CT_WlanDriverServer::CT_WlanDriverBlock::CT_WlanDriverBlock()
-: CTestBlockController()
- {
- }
-
-CT_WlanDriverServer::CT_WlanDriverBlock::~CT_WlanDriverBlock()
- {
- }
-
-CTestBlockController* CT_WlanDriverServer::CreateTestBlock()
- {
- return new CT_WlanDriverBlock();
- }
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/inc/T_WlanMgmtClientData.h
--- a/wlanapitest/wlanhaitest/wlan/inc/T_WlanMgmtClientData.h Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-#ifndef T_WLANMGMTCLIENTDATA_H_
-#define T_WLANMGMTCLIENTDATA_H_
-
-//User Includes
-#include "datawrapperbase.h"
-
-//forward
-class CWlanMgmtClient;
-
-class CT_WlanMgmtClientData: public CDataWrapperBase
- {
-public:
- static CT_WlanMgmtClientData* NewL();
- ~CT_WlanMgmtClientData();
-
-public:
- virtual TAny* GetObject();
- virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
-
-protected:
- CT_WlanMgmtClientData();
- void ConstructL();
-
-private:
- void DoCmdNewL();
- void DoCmdGetScanResults(const TTEFSectionName& aSection);
- void DoCmdDestructor();
- void DestroyData();
-
-private:
- /**
- * Wrapped object
- */
- CWlanMgmtClient* iData;
-
-};
-
-
-#endif /*T_WLANMGMTCLIENTDATA_H_*/
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/inc/T_WlanScanInfoData.h
--- a/wlanapitest/wlanhaitest/wlan/inc/T_WlanScanInfoData.h Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-
-#ifndef T_WLANSCANINFODATA_H_
-#define T_WLANSCANINFODATA_H_
-
-//User Includes
-#include "datawrapperbase.h"
-
-//forward class
-class CWlanScanInfo;
-
-class CT_WlanScanInfoData: public CDataWrapperBase
- {
-public:
- static CT_WlanScanInfoData* NewL();
- ~CT_WlanScanInfoData();
-
-public:
- virtual TAny* GetObject();
- virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
-
-protected:
- CT_WlanScanInfoData();
- void ConstructL();
-
-private:
- void DoCmdNewL(const TTEFSectionName& aSection);
- void DoCmdDestructor();
- void DestroyData();
- void DoCmdInformationElement(const TTEFSectionName& aSection);
-
-private:
- /**
- * Wrapped object
- */
- CWlanScanInfo* iData;
- /**
- * For storing ECom instance UID (needed when destroying the instance)
- */
- TUid iScanInfoInstanceIdentifier;
- };
-
-#endif /*T_WLANSCANINFODATA_H_*/
-
-
\ No newline at end of file
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/pkg/t_wlan.bat
--- a/wlanapitest/wlanhaitest/wlan/pkg/t_wlan.bat Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-@rem
-@rem Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-@rem All rights reserved.
-@rem This component and the accompanying materials are made available
-@rem under the terms of "Eclipse Public License v1.0"
-@rem which accompanies this distribution, and is available
-@rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
-@rem
-@rem Initial Contributors:
-@rem Nokia Corporation - initial contribution.
-@rem
-@rem Contributors:
-@rem
-@rem Description:
-@rem
-
-testexecute c:\nt\wlan\networking-wlan-validation-automated-connection.script -tcx c:\nt\wlan\t_wlan.tcs
-testexecute c:\nt\wlan\networking-wlan-validation-automated-instantiate.script -tcx c:\nt\wlan\t_wlan.tcs
-testexecute c:\nt\wlan\networking-wlan-validation-automated-transfer.script -tcx c:\nt\wlan\t_wlan.tcs
\ No newline at end of file
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/scripts/networking-wlan-validation-automated-connection.script
--- a/wlanapitest/wlanhaitest/wlan/scripts/networking-wlan-validation-automated-connection.script Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,357 +0,0 @@
-//
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-//
-//! @file
-//! @SYMTestSuiteName networking-wlan-validation-automated-connection
-//! @SYMScriptTestEnvironment This test script requires a basic ROM.
-//
-// Tests all public elements of the RConnection, RSocket, RSocketServ, CWLanMgmtClient, CWLanScanInfo, CComsDataBase, CComsDbTableView
-// classes as a means of confidence that the APIs work as expected.
-//
-// The purpose is to provide a regression test suite of PublishedAll
-// APIs for: RConnection, RSocket, RSocketServ, CWLanMgmtClient, CWLanScanInfo, CComsDataBase, CComsDbTableView
-// The tests are fully automated.
-//
-
-
-
-LOAD_SUITE T_Wlan
-
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0001
-
-//!@SYMTestCaseID NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0001
-//!@SYMAPI
-//! CWlanMgmtClient::NewL();
-//! REComSession::CreateImplementationL(TUid, TUid{ref});
-//! MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
-//! MWlanScanInfoBase::InformationElement( TUint8, TUint8{ref}, const TUint8{ptr}{ptr} ) ;
-//! REComSession::DestroyedImplementation(TUid);
-//!@SYMAuthor alavariega
-//!@SYMCreationDate 23/06/2008
-//!@SYMTestCaseDesc Wlan scan
-//!@SYMTestActions
-//! 1.- Instantiate management client. Scan for broadcasted Wireless network names; SSIDs: NewL
-//! 2.- Instantiate Scan Info. Check that the given SSIDs were found:NewL ( WlanScanUid = {UID, Uid} )
-//! 3.- GetScanResults ( scaninfo = wlansinf )
-//! 4.- SelectScanInfo ( DEFAULT_SSID_Ssid = {IAP,Iap} )
-//! 5.- Destroy Scan information: ~
-//! 6.- Destroy management client: ~
-//!@SYMTestStatus Verified
-//!@SYMTestPriority Normal
-//!@SYMTestExpectedResults
-//! TEF reports the test case passed.
-//!@SYMTestType CIT
-
- START_TEST_BLOCK 100 T_Wlan \nt\wlan\networking-wlan-validation-automated-connection.ini
- CREATE_OBJECT WlanMgmtClient wmgmtcnt
- CREATE_OBJECT WlanScanInfo wlansinf
- COMMAND wmgmtcnt NewL
- COMMAND wlansinf NewL NETWORKING-Wlan-Connection-0001-0001-NewL_command02
- COMMAND wmgmtcnt GetScanResults NETWORKING-Wlan-Connection-0001-0001-GetScanResults_command03
- COMMAND wlansinf InformationElement NETWORKING-Wlan-Connection-0001-0001-InformationElement_command04
- COMMAND wlansinf ~
- COMMAND wmgmtcnt ~
- END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0001
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0002
-
-//!@SYMTestCaseID NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0002
-//!@SYMAPI
-//! CCommsDatabase::NewL(TBool);
-//! CCommsDbTableView::OpenIAPTableViewMatchingBearerSetLC(TUint32, TCommDbConnectionDirection);
-//! CWlanMgmtClient::NewL();
-//! MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
-//! MWlanScanInfoBase::InformationElement( TUint8, TUint8{ref}, const TUint8{ptr}{ptr} ) ;
-//! CCommsDbTableView::GotoFirstRecord();
-//! CCommsDbTableView::ReadTextL(const TDesC{ref}, TDes16{ref});
-//! CCommsDbTableView::ReadUintL(const TDesC{ref}, TUint32{ref});
-//! CWLanSettings::GetWlanSettings(TUint32,SWLANSettings{ref});
-//! CWLanSettings::WriteWlanSettings(SWLANSettings{ref});
-//! CWLanSettings::Disconnect();
-//! CCommsDbTableView::GotoNextRecord();
-//! RSocketServ::Connect(TUint);
-//! RSocket::Open(RSocketServ{ref}, TUint);
-//! RConnection::Start(TConnPref{ref});
-//! RConnection::Open(RSocketServ{ref},TUint,TUint,TUint, RConnection{ref});
-//! RSocket::Connect(TSockAddr{ref},TRequestStatus{ref});
-//! RSocket::RecvOneOrMore(TDes8{ref},TUint,TRequestStatus{ref},TSockXfrLength{ref});
-//! Shutdown(TShutdown,TRequestStatus{ref});
-//!@SYMAuthor alavariega
-//!@SYMCreationDate 23/06/2008
-//!@SYMTestCaseDesc Wlan connect
-//!@SYMTestActions
-//! 1.- Instantiate a CCOMMSDB : NewL
-//! 2.- instantiate a CCOMMSDBTABLEVIEW: NewL ( commsdb = comsdb )
-//! 3.- SetOutgoingIap ( WLANIAP = {IAP,Iap}; DEFAULT_SSID = {IAP,Ssid}; commsdbtableview = comsdbtblview )
-//! 4.- Destroy a CCOMMSDBTABLEVIEW object: ~
-//! 5.- Destroy a CCOMMSDB object: ~
-//! 6.- ConnectSocketServ
-//! 7.- OpenRConnection ( socketserv = scktserv )
-//! 8.- StartRConnection ( socketserv = scktserv )
-//! 9.- OpenSocket ( socketserv = scktserv; connection = rcntion )
-//! 10.- ConnectSocket ( Ip = {DownloadServer,Ip}; Port = {DownloadServer,Port} )
-//! 11.- HttpGet
-//! 12.- ShutDownSocket
-//! 13.- CloseSocket
-//! 14.- CloseConnection
-//! 15.- CloseSocketServ
-//!
-
-//!@SYMTestStatus Verified
-//!@SYMTestPriority Normal
-//!@SYMTestExpectedResults
-//! Connect to a WLAN with no errors
-//!@SYMTestType CIT
-
- START_TEST_BLOCK 600 T_Wlan \nt\wlan\networking-wlan-validation-automated-connection.ini
- CREATE_OBJECT CCommsDatabase comsdb
- CREATE_OBJECT CCommsDbTableView comsdbtblview
- CREATE_OBJECT RSocketServ scktserv
- CREATE_OBJECT RConnection rcntion
- CREATE_OBJECT RSocket rsckt
- COMMAND comsdb NewL
- COMMAND comsdbtblview NewL NETWORKING-Wlan-Connection-0002-0001-NewL_command02
- COMMAND scktserv SetOutgoingIap NETWORKING-Wlan-Connection-0002-0001-SetOutgoingIap_command03
- COMMAND comsdbtblview ~
- COMMAND comsdb ~
- COMMAND scktserv Connect
- COMMAND rcntion Open NETWORKING-Wlan-Connection-0002-0001-Open_command07
- COMMAND rcntion Start NETWORKING-Wlan-Connection-0002-0001-Start_command08
- COMMAND rsckt Open NETWORKING-Wlan-Connection-0002-0001-Open_command09
- COMMAND rsckt Connect NETWORKING-Wlan-Connection-0002-0001-Connect_command10
- OUTSTANDING
- COMMAND rsckt HttpGet
- COMMAND rsckt Shutdown
- OUTSTANDING
- COMMAND rsckt Close
- COMMAND rcntion Close
- COMMAND scktserv Close
- END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0002
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0003
-
-//!@SYMTestCaseID NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0003
-//!@SYMAPI
-//! CCommsDatabase::NewL(TBool);
-//! CCommsDbTableView::OpenIAPTableViewMatchingBearerSetLC(TUint32, TCommDbConnectionDirection);
-//! CWlanMgmtClient::NewL();
-//! REComSession::CreateImplementationL(TUid, TUid{ref});
-//! MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
-//! MWlanScanInfoBase::InformationElement( TUint8, TUint8{ref}, const TUint8{ptr}{ptr} ) ;
-//! CCommsDbTableView::GotoFirstRecord();
-//! CCommsDbTableView::ReadTextL(const TDesC{ref}, TDes16{ref});
-//! CCommsDbTableView::ReadUintL(const TDesC{ref}, TUint32{ref});
-//! CWLanSettings::GetWlanSettings(TUint32,SWLANSettings{ref});
-//! CWLanSettings::WriteWlanSettings(SWLANSettings{ref});
-//! CWLanSettings::Disconnect();
-//! CCommsDbTableView::GotoNextRecord();
-//! RSocketServ::Connect(TUint);
-//! RConnection::Open(RSocketServ{ref}, TUint);
-//! RConnection::Start(TConnPref{ref});
-//! REComSession::DestroyedImplementation(TUid);
-//! RSocket::Open(RSocketServ{ref},TUint,TUint,TUint, RConnection{ref});
-//! RSocket::Connect(TSockAddr{ref},TRequestStatus{ref});
-//! RSocket::RecvOneOrMore(TDes8{ref},TUint,TRequestStatus{ref},TSockXfrLength{ref});
-//! RSocket::Shutdown(TShutdown,TRequestStatus{ref});
-//!
-//!@SYMAuthor alavariega
-//!@SYMCreationDate 23/06/2008
-//!@SYMTestCaseDesc Wlan Connection to 802.11b Router
-//!@SYMTestActions
-//! 1.- InstantiateMgmtClient: NewL
-//! 2.- InstantiateScanInfo: NewL ( WlanScanUid = {UID, Uid} )
-//! 3.- Instantiate a CCOMMSDB: NewL
-//! 4.- Instantiate a CCOMMSDBTABLEVIEW: NewL ( commsdb = comsdb )
-//! 5.- GetScanResultsL ( scaninfo = wlansinf )
-//! 6.- SelectScanInfo ( DEFAULT_SSID_Ssid = {IAP80211b,Iap} )
-//! 7.- CheckSupportedRates ( rate = 2; scaninfo = wlansinf )
-//! 8.- CheckSupportedRates ( rate = 4; scaninfo = wlansinf )
-//! 9.- CheckSupportedRates ( rate = 11; scaninfo = wlansinf )
-//! 10.- CheckSupportedRates ( rate = 22; scaninfo = wlansinf )
-//! 11.- SetOutgoingIap ( WLANIAP = {IAP,Iap};DEFAULT_SSID = {IAP80211b,Iap}; commsdbtableview = comsdbtblview )
-//! 12.- Destroy a CCOMMSDBTABLEVIEW object: ~
-//! 13.- Destroy a CCOMMSDB object: ~
-//! 14.- ConnectSocketServ
-//! 15.- OpenRConnection ( socketserv = scktserv )
-//! 16.- StartRConnection ( socketserv = scktserv )
-//! 17.- OpenSocket ( socketserv = scktserv;connection = rcntion )
-//! 18.- ConnectSocket ( Ip = {DownloadServer,Ip}; Port = {DownloadServer,Port} )
-//! 19.- HttpGet
-//! 20.- ShutDownSocket
-//! 21.- CloseSocket
-//! 22.- CloseConnection
-//! 23.- CloseSocketServ
-//! 24.- DestroyScanInfo: ~
-//! 25.- DestroyMgmtClient: ~
-//!@SYMTestStatus Verified
-//!@SYMTestPriority Normal
-//!@SYMTestExpectedResults
-//! Test case passes if the DUT can connect to the WLAN 802.11b router broadcasting the defined SSID.
-//!@SYMTestType CIT
-
- START_TEST_BLOCK 600 T_Wlan \nt\wlan\networking-wlan-validation-automated-connection.ini
- CREATE_OBJECT WlanMgmtClient wmgmtcnt
- CREATE_OBJECT WlanScanInfo wlansinf
- CREATE_OBJECT CCommsDatabase comsdb
- CREATE_OBJECT CCommsDbTableView comsdbtblview
- CREATE_OBJECT RSocketServ scktserv
- CREATE_OBJECT RConnection rcntion
- CREATE_OBJECT RSocket rsckt
- COMMAND wmgmtcnt NewL
- COMMAND wlansinf NewL NETWORKING-Wlan-Connection-0003-0001-NewL_command02
- COMMAND comsdb NewL
- COMMAND comsdbtblview NewL NETWORKING-Wlan-Connection-0003-0001-NewL_command04
- COMMAND wmgmtcnt GetScanResults NETWORKING-Wlan-Connection-0003-0001-GetScanResults_command05
- COMMAND wlansinf InformationElement NETWORKING-Wlan-Connection-0003-0001-InformationElement_command06
- COMMAND rsckt CheckSupportedRates NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command07
- COMMAND rsckt CheckSupportedRates NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command08
- COMMAND rsckt CheckSupportedRates NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command09
- COMMAND rsckt CheckSupportedRates NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command10
- COMMAND scktserv SetOutgoingIap NETWORKING-Wlan-Connection-0003-0001-SetOutgoingIap_command12
- COMMAND comsdbtblview ~
- COMMAND comsdb ~
- COMMAND scktserv Connect
- COMMAND rcntion Open NETWORKING-Wlan-Connection-0003-0001-Open_command16
- COMMAND rcntion Start NETWORKING-Wlan-Connection-0003-0001-Start_command17
- COMMAND rsckt Open NETWORKING-Wlan-Connection-0003-0001-Open_command18
- COMMAND rsckt Connect NETWORKING-Wlan-Connection-0003-0001-Connect_command19
- OUTSTANDING
- COMMAND rsckt HttpGet
- COMMAND rsckt Shutdown
- OUTSTANDING
- COMMAND rsckt Close
- COMMAND rcntion Close
- COMMAND scktserv Close
- COMMAND wlansinf ~
- COMMAND wmgmtcnt ~
- END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0003
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0004
-
-//!@SYMTestCaseID NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0004
-//!@SYMAPI
-//! CCommsDatabase::NewL(TBool);
-//! CCommsDbTableView::OpenIAPTableViewMatchingBearerSetLC(TUint32, TCommDbConnectionDirection);
-//! CWlanMgmtClient::NewL();
-//! REComSession::CreateImplementationL(TUid, TUid{ref});
-//! MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
-//! MWlanScanInfoBase::InformationElement( TUint8, TUint8{ref}, const TUint8{ptr}{ptr} ) ;
-//! CCommsDbTableView::GotoFirstRecord();
-//! CCommsDbTableView::ReadTextL(const TDesC{ref}, TDes16{ref});
-//! CCommsDbTableView::ReadUintL(const TDesC{ref}, TUint32{ref});
-//! CWLanSettings::GetWlanSettings(TUint32,SWLANSettings{ref});
-//! CWLanSettings::WriteWlanSettings(SWLANSettings{ref});
-//! CWLanSettings::Disconnect();
-//! CCommsDbTableView::GotoNextRecord();
-//! RSocketServ::Connect(TUint);
-//! RConnection::Open(RSocketServ{ref}, TUint);
-//! RConnection::Start(TConnPref{ref});
-//! REComSession::DestroyedImplementation(TUid);
-//! RSocket::Open(RSocketServ{ref},TUint,TUint,TUint, RConnection{ref});
-//! RSocket::Connect(TSockAddr{ref},TRequestStatus{ref});
-//! RSocket::RecvOneOrMore(TDes8{ref},TUint,TRequestStatus{ref},TSockXfrLength{ref});
-//! RSocket::Shutdown(TShutdown,TRequestStatus{ref});
-//!
-//!@SYMAuthor alavariega
-//!@SYMCreationDate 23/06/2008
-//!@SYMTestCaseDesc Wlan Connection to 802.11g Router
-//!@SYMTestActions
-//! 1.- InstantiateMgmtClient: NewL
-//! 2.- InstantiateScanInfo: NewL ( WlanScanUid = {UID, Uid} )
-//! 3.- Instantiate a CCOMMSDB: NewL
-//! 4.- Instantiate a CCOMMSDBTABLEVIEW: NewL ( commsdb = comsdb)
-//! 5.- GetScanResultsL ( scaninfo = wlansinf )
-//! 6.- SelectScanInfo ( DEFAULT_SSID_Ssid = {IAP80211g,Iap} )
-//! 7.- CheckSupportedRates ( rate = 2;scaninfo = wlansinf )
-//! 8.- CheckSupportedRates ( rate = 4;scaninfo = wlansinf )
-//! 9.- CheckSupportedRates ( rate = 11;scaninfo = wlansinf )
-//! 10.- CheckSupportedRates ( rate = 22;scaninfo = wlansinf )
-//! 11.- SetOutgoingIap ( WLANIAP = {IAP,Iap}; DEFAULT_SSID = {IAP80211g,Iap}; commsdbtableview = comsdbtblview )
-//! 12.- Destroy a CCOMMSDBTABLEVIEW object: ~
-//! 13.- Destroy a CCOMMSDB object: ~
-//! 14.- ConnectSocketServ
-//! 15.- OpenRConnection ( socketserv = scktserv )
-//! 16.- StartRConnection ( socketserv = scktserv )
-//! 17.- OpenSocket ( socketserv = scktserv; connection = rcntion)
-//! 18.- ConnectSocket ( Ip = {DownloadServer,Ip}; Port ={DownloadServer,Port} )
-//! 19.- HttpGet
-//! 20.- ShutDownSocket
-//! 21.- CloseSocket
-//! 22.- CloseConnection
-//! 23.- CloseSocketServ
-//! 24.- DestroyScanInfo: ~
-//! 25.- DestroyMgmtClient: ~
-//!@SYMTestStatus Verified
-//!@SYMTestPriority Normal
-//!@SYMTestExpectedResults
-//! Test case passes if the DUT can connect to the WLAN 802.11g router broadcasting the defined SSID.
-//!@SYMTestType CIT
-
- START_TEST_BLOCK 600 T_Wlan \nt\wlan\networking-wlan-validation-automated-connection.ini
- CREATE_OBJECT WlanMgmtClient wmgmtcnt
- CREATE_OBJECT WlanScanInfo wlansinf
- CREATE_OBJECT CCommsDatabase comsdb
- CREATE_OBJECT CCommsDbTableView comsdbtblview
- CREATE_OBJECT RSocketServ scktserv
- CREATE_OBJECT RConnection rcntion
- CREATE_OBJECT RSocket rsckt
- COMMAND wmgmtcnt NewL
- COMMAND wlansinf NewL NETWORKING-Wlan-Connection-0004-0001-NewL_command02
- COMMAND comsdb NewL
- COMMAND comsdbtblview NewL NETWORKING-Wlan-Connection-0004-0001-NewL_command04
- COMMAND wmgmtcnt GetScanResults NETWORKING-Wlan-Connection-0004-0001-GetScanResults_command05
- COMMAND wlansinf InformationElement NETWORKING-Wlan-Connection-0004-0001-InformationElement_command06
- COMMAND rsckt CheckSupportedRates NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command07
- COMMAND rsckt CheckSupportedRates NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command08
- COMMAND rsckt CheckSupportedRates NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command09
- COMMAND rsckt CheckSupportedRates NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command10
- COMMAND scktserv SetOutgoingIap NETWORKING-Wlan-Connection-0004-0001-SetOutgoingIap_command12
- COMMAND comsdbtblview ~
- COMMAND comsdb ~
- COMMAND scktserv Connect
- COMMAND rcntion Open NETWORKING-Wlan-Connection-0004-0001-Open_command16
- COMMAND rcntion Start NETWORKING-Wlan-Connection-0004-0001-Start_command17
- COMMAND rsckt Open NETWORKING-Wlan-Connection-0004-0001-Open_command18
- COMMAND rsckt Connect NETWORKING-Wlan-Connection-0004-0001-Connect_command19
- OUTSTANDING
- COMMAND rsckt HttpGet
- COMMAND rsckt Shutdown
- OUTSTANDING
- COMMAND rsckt Close
- COMMAND rcntion Close
- COMMAND scktserv Close
- COMMAND wlansinf ~
- COMMAND wmgmtcnt ~
- END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-CONNECTION-0004
-
-DELAY 10000
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/scripts/networking-wlan-validation-automated-instantiate.script
--- a/wlanapitest/wlanhaitest/wlan/scripts/networking-wlan-validation-automated-instantiate.script Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-//
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-//
-//! @file
-//! @SYMTestSuiteName networking-wlan-validation-automated-instantiate
-//! @SYMScriptTestEnvironment This test script requires a basic ROM.
-//
-// Tests all public elements of the RConnection, RSocket, RSocketServ, CWLanMgmtClient, CWLanScanInfo, CComsDataBase, CComsDbTableView
-// classes as a means of confidence that the APIs work as expected.
-//
-// The purpose is to provide a regression test suite of PublishedAll
-// APIs for: RConnection, RSocket, RSocketServ, CWLanMgmtClient, CWLanScanInfo, CComsDataBase, CComsDbTableView
-// The tests are fully automated.
-//
-
-
-
-LOAD_SUITE T_Wlan
-
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-INSTANTIATE-0001
-
-//!@SYMTestCaseID NETWORKING-WLAN-VALIDATION-AUTOMATED-INSTANTIATE-0001
-//!@SYMAPI
-//! REComSession::CreateImplementationL(TUid, TUid{ref});
-//! REComSession::DestroyedImplementation(TUid);
-//!@SYMAuthor alavariega
-//!@SYMCreationDate 23/06/2008
-//!@SYMTestCaseDesc Instantiate ScanInfo
-//!@SYMTestActions
-//! 1.- Instantiate WLAN Scan Info: NewL ( WlanScanUid = {UID, Uid} )
-//! 2.- Destroy Scan Info: ~
-//!@SYMTestStatus Verified
-//!@SYMTestPriority Normal
-//!@SYMTestExpectedResults
-//! Instantiate WLAN Scan Info with no errors
-//!@SYMTestType CIT
-
- START_TEST_BLOCK 100 T_Wlan \nt\wlan\networking-wlan-validation-automated-instantiate.ini
- CREATE_OBJECT WlanScanInfo wlansinf
- COMMAND wlansinf NewL NETWORKING-Wlan-Instantiate-0001-0001-NewL_command01
- COMMAND wlansinf ~
- END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-INSTANTIATE-0001
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-INSTANTIATE-0002
-
-//!@SYMTestCaseID NETWORKING-WLAN-VALIDATION-AUTOMATED-INSTANTIATE-0002
-//!@SYMAPI
-//! CWlanMgmtClient::NewL();
-//!
-//!@SYMAuthor alavariega
-//!@SYMCreationDate 23/06/2008
-//!@SYMTestCaseDesc Instantiate WlanMgmtClient
-//!@SYMTestActions
-//! 1.- Instantiate WLAN Mgmt Client: NewL
-//! 2.- Destroy Mgmt Client: ~
-//!@SYMTestStatus Verified
-//!@SYMTestPriority Normal
-//!@SYMTestExpectedResults
-//! Instantiate WLAN Management Client with no errors
-//!@SYMTestType CIT
-
- START_TEST_BLOCK 100 T_Wlan \nt\wlan\networking-wlan-validation-automated-instantiate.ini
- CREATE_OBJECT WlanMgmtClient wmgmtcnt
- COMMAND wmgmtcnt NewL
- COMMAND wmgmtcnt ~
- END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-INSTANTIATE-0002
-
-DELAY 10000
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/scripts/networking-wlan-validation-automated-transfer.script
--- a/wlanapitest/wlanhaitest/wlan/scripts/networking-wlan-validation-automated-transfer.script Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,361 +0,0 @@
-//
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-// All rights reserved.
-// This component and the accompanying materials are made available
-// under the terms of "Eclipse Public License v1.0"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-//
-//! @file
-//! @SYMTestSuiteName networking-wlan-validation-automated-transfer
-//! @SYMScriptTestEnvironment This test script requires a basic ROM.
-//
-// Tests all public elements of the RConnection, RSocket, RSocketServ, CWLanMgmtClient, CWLanScanInfo, CComsDataBase, CComsDbTableView
-// classes as a means of confidence that the APIs work as expected.
-//
-// The purpose is to provide a regression test suite of PublishedAll
-// APIs for: RConnection, RSocket, RSocketServ, CWLanMgmtClient, CWLanScanInfo, CComsDataBase, CComsDbTableView
-// The tests are fully automated.
-//
-
-
-
-LOAD_SUITE T_Wlan
-
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0001
-
-//!@SYMTestCaseID NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0001
-//!@SYMAPI
-//! CCommsDatabase::NewL(TBool);
-//! CCommsDbTableView::OpenIAPTableViewMatchingBearerSetLC(TUint32, TCommDbConnectionDirection);
-//! CWlanMgmtClient::NewL()
-//! MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
-//! MWlanScanInfoBase::InformationElement( TUint8, TUint8{ref}, const TUint8{ptr}{ptr}) ;
-//! CCommsDbTableView::GotoFirstRecord();
-//! CCommsDbTableView::ReadTextL(const TDesC{ref}, TDes16{ref});
-//! CCommsDbTableView::ReadUintL(const TDesC{ref}, TUint32{ref});
-//! CWLanSettings::GetWlanSettings(TUint32,SWLANSettings{ref});
-//! CWLanSettings::WriteWlanSettings(SWLANSettings{ref});
-//! CWLanSettings::Disconnect();
-//! CCommsDbTableView::GotoNextRecord();
-//! RSocketServ::Connect(TUint);
-//! RConnection::Open(RSocketServ{ref}, TUint);
-//! RConnection::Start(TConnPref{ref});
-//! RSocket::Open(RSocketServ{ref},TUint,TUint,TUint, RConnection{ref});
-//! RSocket::Connect(TSockAddr{ref},TRequestStatus{ref});
-//! RSocket::RecvOneOrMore(TDes8{ref},TUint,TRequestStatus{ref},TSockXfrLength{ref});
-//! RSocket::Shutdown(TShutdown,TRequestStatus{ref});
-//!
-//!@SYMAuthor alavariega
-//!@SYMCreationDate 23/06/2008
-//!@SYMTestCaseDesc Wlan Download 100kB to User Disk
-//!@SYMTestActions
-//! 1.- Instantiate a CCOMMSDB: NewL
-//! 2.- Instantiate a CCOMMSDBTABLEVIEW: NewL ( commsdb = comsdb )
-//! 3.- SetOutgoingIap ( WLANIAP = {IAP,Iap}; DEFAULT_SSID = {IAP,Ssid} ; commsdbtableview = comsdbtblview )
-//! 4.- Destroy a CCOMMSDBTABLEVIEW object: ~
-//! 5.- Destroy a CCOMMSDB object: ~
-//! 6.- ConnectSocketServ
-//! 7.- OpenRConnection socketserv ( socketserv = scktserv )
-//! 8.- StartRConnection socketserv ( socketserv = scktserv )
-//! 9.- OpenSocket( socketserv = scktserv; connection = rcntion )
-//! 10.- ConnectSocket ( Ip = {DownloadServer,Ip}; Port = {DownloadServer,Port} )
-//! 11.- DownloadSendHTTPGet ( Host = {DownloadServer,Ip}; File = /nokia/0100k.bin )
-//! 12.- ReceiveHTTPResponse( Save = {driveC,mmc}\0100k.bin )
-//! 13.- ShutDownSocket
-//! 14.- CloseSocket
-//! 15.- CloseConnection
-//! 16.- CloseSocketServ
-//!@SYMTestStatus Verified
-//!@SYMTestPriority Normal
-//!@SYMTestExpectedResults
-//! TEF reports the test case passed.
-//!@SYMTestType CIT
-
- START_TEST_BLOCK 600 T_Wlan \nt\wlan\networking-wlan-validation-automated-transfer.ini
- CREATE_OBJECT CCommsDatabase comsdb
- CREATE_OBJECT CCommsDbTableView comsdbtblview
- CREATE_OBJECT RSocketServ scktserv
- CREATE_OBJECT RConnection rcntion
- CREATE_OBJECT RSocket rsckt
- COMMAND comsdb NewL
- COMMAND comsdbtblview NewL NETWORKING-Wlan-Transfer-0001-0001-NewL_command02
- COMMAND scktserv SetOutgoingIap NETWORKING-Wlan-Transfer-0001-0001-SetOutgoingIap_command03
- COMMAND comsdbtblview ~
- COMMAND comsdb ~
- COMMAND scktserv Connect
- COMMAND rcntion Open NETWORKING-Wlan-Transfer-0001-0001-Open_command07
- COMMAND rcntion Start NETWORKING-Wlan-Transfer-0001-0001-Start_command08
- COMMAND rsckt Open NETWORKING-Wlan-Transfer-0001-0001-Open_command09
- COMMAND rsckt Connect NETWORKING-Wlan-Transfer-0001-0001-Connect_command10
- OUTSTANDING
- COMMAND rsckt DownloadSendHTTPGet NETWORKING-Wlan-Transfer-0001-0001-DownloadSendHTTPGet_command11
- OUTSTANDING
- COMMAND rsckt RecvOneOrMore NETWORKING-Wlan-Transfer-0001-0001-RecvOneOrMore_command12
- COMMAND rsckt Shutdown
- OUTSTANDING
- COMMAND rsckt Close
- COMMAND rcntion Close
- COMMAND scktserv Close
- END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0001
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0002
-
-//!@SYMTestCaseID NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0002
-//!@SYMAPI
-//! CCommsDatabase::NewL(TBool);
-//! CCommsDbTableView::OpenIAPTableViewMatchingBearerSetLC(TUint32, TCommDbConnectionDirection);
-//! CWlanMgmtClient::NewL()
-//! MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
-//! MWlanScanInfoBase::InformationElement(TUint8, TUint8{ref}, const TUint8{ptr}{ptr}) ;
-//! CCommsDbTableView::GotoFirstRecord();
-//! CCommsDbTableView::ReadTextL(const TDesC{ref}, TDes16{ref});
-//! CCommsDbTableView::ReadUintL(const TDesC{ref}, TUint32{ref});
-//! CWLanSettings::GetWlanSettings(TUint32,SWLANSettings{ref});
-//! CWLanSettings::WriteWlanSettings(SWLANSettings{ref});
-//! CWLanSettings::Disconnect();
-//! CCommsDbTableView::GotoNextRecord();
-//! RSocketServ::Connect(TUint);
-//! RConnection::Open(RSocketServ{ref}, TUint);
-//! RConnection::Start(TConnPref{ref});
-//! RSocket::Open(RSocketServ{ref},TUint,TUint,TUint, RConnection{ref});
-//! RSocket::Connect(TSockAddr{ref},TRequestStatus{ref});
-//! RSocket::RecvOneOrMore(TDes8{ref},TUint,TRequestStatus{ref},TSockXfrLength{ref});
-//! RSocket::Shutdown(TShutdown,TRequestStatus{ref});
-//!
-//!@SYMAuthor alavariega
-//!@SYMCreationDate 23/06/2008
-//!@SYMTestCaseDesc Wlan Download 10kB to Memory Card
-//!@SYMTestActions
-//! 1.- Instantiate a CCOMMSDB: NewL
-//! 2.- Instantiate a CCOMMSDBTABLEVIEW: NewL ( commsdb = comsdb )
-//! 3.- SetOutgoingIap ( WLANIAP = {IAP,Iap}; DEFAULT_SSID = {IAP,Ssid}; commsdbtableview = comsdbtblview )
-//! 4.- Destroy a CCOMMSDBTABLEVIEW object: ~
-//! 5.- Destroy a CCOMMSDB object: ~
-//! 6.- ConnectSocketServ
-//! 7.- OpenRConnection ( socketserv = scktserv )
-//! 8.- StartRConnection socketserv ( socketserv = scktserv )
-//! 9.- OpenSocket ( socketserv = scktserv; connection = rcntion )
-//! 10.- ConnectSocket ( Ip = {DownloadServer,Ip}; Port ={DownloadServer,Port} )
-//! 11.- DownloadSendHTTPGet ( Host = {DownloadServer,Ip}; File = /nokia/0010k.bin )
-//! 12.- ReceiveHTTPResponse ( Save = {driveE,mmc}\0010k.bin )
-//! 13.- ShutDownSocket
-//! 14.- CloseSocket
-//! 15.- CloseConnection
-//! 16.- CloseSocketServ
-//!@SYMTestStatus Verified
-//!@SYMTestPriority Normal
-//!@SYMTestExpectedResults
-//! TEF reports the test case passed.
-//!@SYMTestType CIT
-
- START_TEST_BLOCK 600 T_Wlan \nt\wlan\networking-wlan-validation-automated-transfer.ini
- CREATE_OBJECT CCommsDatabase comsdb
- CREATE_OBJECT CCommsDbTableView comsdbtblview
- CREATE_OBJECT RSocketServ scktserv
- CREATE_OBJECT RConnection rcntion
- CREATE_OBJECT RSocket rsckt
- COMMAND comsdb NewL
- COMMAND comsdbtblview NewL NETWORKING-Wlan-Transfer-0002-0001-NewL_command02
- COMMAND scktserv SetOutgoingIap NETWORKING-Wlan-Transfer-0002-0001-SetOutgoingIap_command03
- COMMAND comsdbtblview ~
- COMMAND comsdb ~
- COMMAND scktserv Connect
- COMMAND rcntion Open NETWORKING-Wlan-Transfer-0002-0001-Open_command07
- COMMAND rcntion Start NETWORKING-Wlan-Transfer-0002-0001-Start_command08
- COMMAND rsckt Open NETWORKING-Wlan-Transfer-0002-0001-Open_command09
- COMMAND rsckt Connect NETWORKING-Wlan-Transfer-0002-0001-Connect_command10
- OUTSTANDING
- COMMAND rsckt DownloadSendHTTPGet NETWORKING-Wlan-Transfer-0002-0001-DownloadSendHTTPGet_command11
- OUTSTANDING
- COMMAND rsckt RecvOneOrMore NETWORKING-Wlan-Transfer-0002-0001-RecvOneOrMore_command12
- COMMAND rsckt Shutdown
- OUTSTANDING
- COMMAND rsckt Close
- COMMAND rcntion Close
- COMMAND scktserv Close
- END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0002
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0003
-
-//!@SYMTestCaseID NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0003
-//!@SYMAPI
-//! CCommsDatabase::NewL(TBool);
-//! CCommsDbTableView::OpenIAPTableViewMatchingBearerSetLC(TUint32, TCommDbConnectionDirection);
-//! CWlanMgmtClient::NewL()
-//! MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
-//! MWlanScanInfoBase::InformationElement(TUint8, TUint8{ref}, const TUint8{ptr}{ptr}) ;
-//! CCommsDbTableView::GotoFirstRecord();
-//! CCommsDbTableView::ReadTextL(const TDesC{ref}, TDes16{ref});
-//! CCommsDbTableView::ReadUintL(const TDesC{ref}, TUint32{ref});
-//! CWLanSettings::GetWlanSettings(TUint32,SWLANSettings{ref});
-//! CWLanSettings::WriteWlanSettings(SWLANSettings{ref});
-//! CWLanSettings::Disconnect();
-//! CCommsDbTableView::GotoNextRecord();
-//! RSocketServ::Connect(TUint);
-//! RConnection::Open(RSocketServ{ref}, TUint);
-//! RConnection::Start(TConnPref{ref});
-//! RSocket::Open(RSocketServ{ref},TUint,TUint,TUint, RConnection{ref});
-//! RSocket::Connect(TSockAddr{ref},TRequestStatus{ref});
-//! RSocket::RecvOneOrMore(TDes8{ref},TUint,TRequestStatus{ref},TSockXfrLength{ref});
-//! RSocket::Shutdown(TShutdown,TRequestStatus{ref});
-//!
-//!@SYMAuthor alavariega
-//!@SYMCreationDate 23/06/2008
-//!@SYMTestCaseDesc Wlan Download 10MB to User Disk
-//!@SYMTestActions
-//! 1.- Instantiate a CCOMMSDB: NewL
-//! 2.- Instantiate a CCOMMSDBTABLEVIEW: NewL ( commsdb = comsdb )
-//! 3.- SetOutgoingIap ( WLANIAP = {IAP,Iap}; DEFAULT_SSID = {IAP,Ssid}; commsdbtableview = comsdbtblview)
-//! 4.- Destroy a CCOMMSDBTABLEVIEW object: ~
-//! 5.- Destroy a CCOMMSDB object: ~
-//! 6.-ConnectSocketServ
-//! 7.-OpenRConnection ( socketserv = scktserv )
-//! 8.- StartRConnection ( socketserv = scktserv )
-//! 9.- OpenSocket socketserv connection( socketserv = scktserv; connection = rcntion )
-//! 10.- ConnectSocket ( Ip = {DownloadServer,Ip}; Port = {DownloadServer,Port} )
-//! 11.- DownloadSendHTTPGet ( Host = {DownloadServer,Ip}; File = /nokia/10MB.bin )
-//! 12.- ReceiveHTTPResponse ( Save = {driveC,mmc}\10MB.bin )
-//! 13.-ShutDownSocket
-//! 14.- CloseSocket
-//! 15.- CloseConnection
-//! 16.- CloseSocketServer
-//!@SYMTestStatus Verified
-//!@SYMTestPriority Normal
-//!@SYMTestExpectedResults
-//! Download a 10MB file to User Disk with no errors
-//!@SYMTestType CIT
-
- START_TEST_BLOCK 6000000 T_Wlan \nt\wlan\networking-wlan-validation-automated-transfer.ini
- CREATE_OBJECT CCommsDatabase comsdb
- CREATE_OBJECT CCommsDbTableView comsdbtblview
- CREATE_OBJECT RSocketServ scktserv
- CREATE_OBJECT RConnection rcntion
- CREATE_OBJECT RSocket rsckt
- COMMAND comsdb NewL
- COMMAND comsdbtblview NewL NETWORKING-Wlan-Transfer-0003-0001-NewL_command02
- COMMAND scktserv SetOutgoingIap NETWORKING-Wlan-Transfer-0003-0001-SetOutgoingIap_command03
- COMMAND comsdbtblview ~
- COMMAND comsdb ~
- COMMAND scktserv Connect
- COMMAND rcntion Open NETWORKING-Wlan-Transfer-0003-0001-Open_command07
- COMMAND rcntion Start NETWORKING-Wlan-Transfer-0003-0001-Start_command08
- COMMAND rsckt Open NETWORKING-Wlan-Transfer-0003-0001-Open_command09
- COMMAND rsckt Connect NETWORKING-Wlan-Transfer-0003-0001-Connect_command10
- OUTSTANDING
- COMMAND rsckt DownloadSendHTTPGet NETWORKING-Wlan-Transfer-0003-0001-DownloadSendHTTPGet_command11
- OUTSTANDING
- COMMAND rsckt RecvOneOrMore NETWORKING-Wlan-Transfer-0003-0001-RecvOneOrMore_command12
- COMMAND rsckt Shutdown
- OUTSTANDING
- COMMAND rsckt Close
- COMMAND rcntion Close
- COMMAND scktserv Close
- END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0003
-
-
-
-
-START_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0004
-
-//!@SYMTestCaseID NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0004
-//!@SYMAPI
-//! CCommsDatabase::NewL(TBool);
-//! CCommsDbTableView::OpenIAPTableViewMatchingBearerSetLC(TUint32, TCommDbConnectionDirection);
-//! CWlanMgmtClient::NewL()
-//! MWlanMgmtInterface::GetScanResults(CWlanScanInfo{ref});
-//! MWlanScanInfoBase::InformationElement( TUint8, TUint8{ref}, const TUint8{ptr}{ptr} ) ;
-//! CCommsDbTableView::GotoFirstRecord();
-//! CCommsDbTableView::ReadTextL(const TDesC{ref}, TDes16{ref});
-//! CCommsDbTableView::ReadUintL(const TDesC{ref}, TUint32{ref});
-//! CWLanSettings::GetWlanSettings(TUint32,SWLANSettings{ref});
-//! CWLanSettings::WriteWlanSettings(SWLANSettings{ref});
-//! CWLanSettings::Disconnect();
-//! CCommsDbTableView::GotoNextRecord();
-//! RSocketServ::Connect(TUint);
-//! RConnection::Open(RSocketServ{ref}, TUint);
-//! RConnection::Start(TConnPref{ref});
-//! RSocket::Open(RSocketServ{ref},TUint,TUint,TUint, RConnection{ref});
-//! RSocket::Connect(TSockAddr{ref},TRequestStatus{ref});
-//! RSocket::RecvOneOrMore(TDes8{ref},TUint,TRequestStatus{ref},TSockXfrLength{ref});
-//! RSocket::Shutdown(TShutdown,TRequestStatus{ref});
-//!
-//!@SYMAuthor alavariega
-//!@SYMCreationDate 23/06/2008
-//!@SYMTestCaseDesc Wlan Upload 10MB from User Disk
-//!@SYMTestActions
-//! 1.- Instantiate a CCOMMSDB: NewL
-//! 2.- Instantiate a CCOMMSDBTABLEVIEW: NewL ( commsdb = comsdb )
-//! 3.- GenerateFile ( File = {driveC,mmc}\10mb2.bin; Size = 10485760 )
-//! 4.- SetOutgoingIap ( WLANIAP = {IAP,Iap}; DEFAULT_SSID = {IAP,Ssid}; commsdbtableview = comsdbtblview )
-//! 5.- Destroy a CCOMMSDBTABLEVIEW object: ~
-//! 6.- Destroy a CCOMMSDB object: ~
-//! 7.- ConnectSocketServ
-//! 8.-OpenRConnection ( socketserv = scktserv )
-//! 9.- StartRConnection ( socketserv = scktserv )
-//! 10.- OpenSocket ( socketserv = scktserv; connection = rcntion )
-//! 11.- ConnectSocket ( Ip = {UploadServer,Ip}; Port = {UploadServer,Port} )
-//! 12.- UploadSendHTTPPost ( File = {driveC,mmc}\10mb2.bin; FileServer = 10mb2.bin; clientID = SALT; serverScript = /dy/upload/upfile.php )
-//! 13.- ReceiveHTTPResponse ( Save = KNullDesC )
-//! 14.- ShutDownSocket
-//! 15.- CloseSocket
-//! 16.- CloseConnection
-//! 17.- CloseSocketServ
-//!@SYMTestStatus Verified
-//!@SYMTestPriority Normal
-//!@SYMTestExpectedResults
-//! Upload a 10MB from User Disk with no errors
-//!@SYMTestType CIT
-
- START_TEST_BLOCK 6000000 T_Wlan \nt\wlan\networking-wlan-validation-automated-transfer.ini
- CREATE_OBJECT CCommsDatabase comsdb
- CREATE_OBJECT CCommsDbTableView comsdbtblview
- CREATE_OBJECT RSocketServ scktserv
- CREATE_OBJECT RConnection rcntion
- CREATE_OBJECT RSocket rsckt
- CREATE_OBJECT RFile rfile
- COMMAND comsdb NewL
- COMMAND comsdbtblview NewL NETWORKING-Wlan-Transfer-0004-0001-NewL_command02
- COMMAND rfile GenerateFile NETWORKING-Wlan-Transfer-0004-0001-GenerateFile_command03
- COMMAND scktserv SetOutgoingIap NETWORKING-Wlan-Transfer-0004-0001-SetOutgoingIap_command04
- COMMAND comsdbtblview ~
- COMMAND comsdb ~
- COMMAND scktserv Connect
- COMMAND rcntion Open NETWORKING-Wlan-Transfer-0004-0001-Open_command08
- COMMAND rcntion Start NETWORKING-Wlan-Transfer-0004-0001-Start_command09
- COMMAND rsckt Open NETWORKING-Wlan-Transfer-0004-0001-Open_command10
- COMMAND rsckt Connect NETWORKING-Wlan-Transfer-0004-0001-Connect_command11
- OUTSTANDING
- COMMAND rsckt UploadSendHTTPPost NETWORKING-Wlan-Transfer-0004-0001-UploadSendHTTPPost_command12
- COMMAND rsckt RecvOneOrMore NETWORKING-Wlan-Transfer-0004-0001-RecvOneOrMore_command13
- COMMAND rsckt Shutdown
- OUTSTANDING
- COMMAND rsckt Close
- COMMAND rcntion Close
- COMMAND scktserv Close
- END_TEST_BLOCK
-END_TESTCASE NETWORKING-WLAN-VALIDATION-AUTOMATED-TRANSFER-0004
-
-DELAY 10000
-
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/src/T_CCommsDatabaseData.cpp
--- a/wlanapitest/wlanhaitest/wlan/src/T_CCommsDatabaseData.cpp Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,163 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-#include "t_ccommsdatabasedata.h"
-
-/*@{*/
-//LIT's for commands of CT_CCommsDatabaseData
-_LIT(KCmdNewL, "NewL");
-_LIT(KCmdDestructor, "~");
-/*@}*/
-
-/**
- * Two phase constructor
- *
- * @leave system wide error
- */
-CT_CCommsDatabaseData* CT_CCommsDatabaseData::NewL()
- {
- CT_CCommsDatabaseData* ret = new (ELeave) CT_CCommsDatabaseData();
- CleanupStack::PushL(ret);
- ret->ConstructL();
- CleanupStack::Pop(ret);
- return ret;
- }
-
-/**
- * Public destructor
- */
-CT_CCommsDatabaseData::~CT_CCommsDatabaseData()
- {
- DestroyData();
- }
-
-/**
- * Private constructor. First phase construction
- */
-
-CT_CCommsDatabaseData::CT_CCommsDatabaseData()
-: iCommsDat(NULL)
- {
- }
-
-/**
- * Second phase construction
- *
- * @internalComponent
- *
- * @return N/A
- *
- * @pre None
- * @post None
- *
- * @leave system wide error
- */
-void CT_CCommsDatabaseData::ConstructL()
- {
- }
-
-/**
- * Return a pointer to the object that the data wraps
- *
- * @return pointer to the object that the data wraps
- */
-TAny* CT_CCommsDatabaseData::GetObject()
- {
- return iCommsDat;
- }
-
-/**
- * Process a command read from the Ini file
- * @param aCommand The command to process
- * @param aSection The section get from the *.ini file of the project T_Wlan
- * @param aAsyncErrorIndex Command index dor async calls to returns errors to
- * @return TBool ETrue if the command is process
- * @leave system wide error
- */
-TBool CT_CCommsDatabaseData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName&/* aSection*/, const TInt /*aAsyncErrorIndex*/)
- {
- TBool ret = ETrue;
-
- if(aCommand == KCmdNewL)
- {
- DoCmdNewL();
- }
- else if(aCommand == KCmdDestructor)
- {
- DoCmdDestructor();
- }
- else
- {
- ERR_PRINTF1(_L("Unknown command."));
- ret = EFalse;
- }
-
- return ret;
- }
-
-
-/**
- * Command to create an Instance of CCommsDatabase class
- * @param
- * @return
- */
-void CT_CCommsDatabaseData::DoCmdNewL()
- {
- INFO_PRINTF1(_L("*START* CT_CCommsDatabaseData::DoCmdNewL"));
- DestroyData();
-
- TRAPD(err,iCommsDat = CCommsDatabase::NewL(ETrue));
- if(err!=KErrNone)
- {
- ERR_PRINTF2(_L("CCommsDatabase* commsDat = CCommsDatabase::NewL(ETrue) left with error %d"), err);
- SetError(err);
- }
- else
- {
- INFO_PRINTF1(_L("CCommsDatabase* commsDat = CCommsDatabase::NewL(ETrue) was create"));
- }
-
- INFO_PRINTF1(_L("*END* CT_CCommsDatabaseData::DoCmdNewL"));
- }
-
-/**
- * Command to destroy an Instance of CCommsDatabase class
- * @param
- * @return
- */
-void CT_CCommsDatabaseData::DoCmdDestructor()
- {
- INFO_PRINTF1(_L("*START* CT_CCommsDatabaseData::DoCmdDestructor"));
- DestroyData();
- INFO_PRINTF1(_L("*END* CT_CCommsDatabaseData::DoCmdDestructor"));
- }
-
-/**
- *Helper function to DoCmdDelete command
- * @param
- * @return
- */
-void CT_CCommsDatabaseData::DestroyData()
- {
- if(iCommsDat)
- {
- delete iCommsDat;
- iCommsDat = NULL;
- }
- }
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/src/T_CCommsDbTableViewData.cpp
--- a/wlanapitest/wlanhaitest/wlan/src/T_CCommsDbTableViewData.cpp Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,185 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-
-#include "t_ccommsdbtableviewdata.h"
-
-// CommsDat preferences setting class.
-#include
-#include
-
-/*@{*/
-//LIT for the data read from the ini file
-_LIT(KCommsDb, "commsdb");
-/*@}*/
-
-/*@{*/
-//LIT's for the commands
-_LIT(KCmdNewL, "NewL");
-_LIT(KCmdDestructor, "~");
-/*@}*/
-
-/**
- * Two phase constructor
- *
- * @leave system wide error
- */
-CT_CCommsDbTableViewData* CT_CCommsDbTableViewData::NewL()
- {
- CT_CCommsDbTableViewData* ret = new (ELeave) CT_CCommsDbTableViewData();
- CleanupStack::PushL(ret);
- ret->ConstructL();
- CleanupStack::Pop(ret);
- return ret;
- }
-
-/**
- * Public destructor
- */
-CT_CCommsDbTableViewData::~CT_CCommsDbTableViewData()
- {
- DestroyData();
- }
-
-/**
- * Private constructor. First phase construction
- */
-CT_CCommsDbTableViewData::CT_CCommsDbTableViewData()
-: iSearchView(NULL)
- {
- }
-
-/**
- * Second phase construction
- *
- * @internalComponent
- *
- * @return N/A
- *
- * @pre None
- * @post None
- *
- * @leave system wide error
- */
-void CT_CCommsDbTableViewData::ConstructL()
- {
- }
-
-/**
- * Return a pointer to the object that the data wraps
- *
- * @return pointer to the object that the data wraps
- */
-TAny* CT_CCommsDbTableViewData::GetObject()
- {
- return iSearchView;
- }
-
-/**
-* Process a command read from the Ini file
-* @param aCommand The command to process
-* @param aSection The section get from the *.ini file of the project T_Wlan
-* @param aAsyncErrorIndex Command index dor async calls to returns errors to
-* @return TBool ETrue if the command is process
-* @leave system wide error
-*/
-
-TBool CT_CCommsDbTableViewData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt/* aAsyncErrorIndex*/)
- {
- TBool ret = ETrue;
- if(aCommand == KCmdNewL)
- {
- DoCmdNewL(aSection);
- }
- else if(aCommand == KCmdDestructor)
- {
- DoCmdDestructor();
- }
- else
- {
- ERR_PRINTF1(_L("Unknown command."));
- ret = EFalse;
- }
- return ret;
- }
-
-
-
-
-/**
- * Command to create an instance of CCommsDbTableView class
- * @param aSection The section in the ini file for this command
- * @return
- */
-void CT_CCommsDbTableViewData::DoCmdNewL(const TTEFSectionName& aSection)
- {
- INFO_PRINTF1(_L("*START* CT_CCommsDbTableViewData::DoCmdNewL"));
- DestroyData();
-
- TPtrC commsDbName;
- const TUint32 KIAPMask = 0xffffffff;
- TBool dataOk = ETrue;
-
- //param from the ini file
- if(!GetStringFromConfig(aSection, KCommsDb, commsDbName))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KCommsDb);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- if (dataOk)
- {
- CCommsDatabase* acommsDat = static_cast(GetDataObjectL(commsDbName));
- //CCommsDatabase* acommsDat = CCommsDatabase::NewL(ETrue);
- //iSearchView = acommsDat->OpenIAPTableViewMatchingBearerSetLC( KIAPMask, ECommDbConnectionDirectionOutgoing );
- iSearchView = acommsDat->OpenIAPTableViewMatchingBearerSetLC( KIAPMask, ECommDbConnectionDirectionOutgoing );
- CleanupStack::Pop();
- }
-
- INFO_PRINTF1(_L("*END* CT_CCommsDbTableViewData::DoCmdNewL"));
- }
-/**
- * Command for delete an instance of CCommsDbTableView class
- * @param
- * @return
- */
-void CT_CCommsDbTableViewData::DoCmdDestructor()
- {
- INFO_PRINTF1(_L("*START* CT_CCommsDbTableViewData::DoCmdDestructor"));
-
- //CleanupStack::Pop(iSearchView);
- DestroyData();
-
- INFO_PRINTF1(_L("*END* CT_CCommsDbTableViewData::DoCmdDestructor"));
- }
-
-/**
- * Helper function for the command DoCmdDelete
- * @param
- * @return
- */
-void CT_CCommsDbTableViewData::DestroyData()
- {
- if (iSearchView)
- {
- delete iSearchView;
- iSearchView = NULL;
- }
- }
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/src/T_RConnectionData.cpp
--- a/wlanapitest/wlanhaitest/wlan/src/T_RConnectionData.cpp Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,254 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-#include "t_rconnectiondata.h"
-#include "t_rsocketservdata.h"
-#include
-
-/*@{*/
-//LIT param read from the ini file
-_LIT(KSocketServ, "socketserv");
-/*@}*/
-
-/*@{*/
-//LITs for commands
-_LIT(KCmdOpen, "Open");
-_LIT(KCmdStart, "Start");
-_LIT(KCmdClose, "Close");
-/*@}*/
-
-
-/**
- * Two phase constructor
- *
- * @leave system wide error
- */
-CT_RConnectionData* CT_RConnectionData::NewL()
- {
- CT_RConnectionData * ret = new (ELeave)CT_RConnectionData();
- CleanupStack::PushL(ret);
- ret->ConstructL();
- CleanupStack::Pop(ret);
- return ret;
- }
-
-/**
- * Public destructor
- */
-CT_RConnectionData::~CT_RConnectionData()
- {
- if (iConnection)
- {
- delete iConnection;
- iConnection = NULL;
- }
- }
-
-/**
- * Private constructor. First phase construction
- */
-CT_RConnectionData::CT_RConnectionData()
-: iConnection(NULL)
- {
- }
-
-/**
- * Second phase construction
- *
- * @internalComponent
- *
- * @return N/A
- *
- * @pre None
- * @post None
- *
- * @leave system wide error
- */
-void CT_RConnectionData::ConstructL()
- {
- iConnection = new (ELeave)RConnection();
- }
-
-/**
- * Return a pointer to the object that the data wraps
- *
- * @return pointer to the object that the data wraps
- */
-TAny* CT_RConnectionData::GetObject()
- {
- return iConnection;
- }
-
-/**
- * Process a command read from the Ini file
- * @param aCommand The command to process
- * @param aSection The section get from the *.ini file of the project T_Wlan
- * @param aAsyncErrorIndex Command index dor async calls to returns errors to
- * @return TBool ETrue if the command is process
- * @leave system wide error
- */
-TBool CT_RConnectionData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt /*aAsyncErrorIndex*/)
- {
- TBool ret = ETrue;
- if(aCommand == KCmdOpen)
- {
- DoCmdOpen(aSection);
- }
- else if(aCommand == KCmdStart)
- {
- DoCmdStart(aSection);
- }
- else if(aCommand == KCmdClose)
- {
- DoCmdClose();
- }
- else
- {
- ERR_PRINTF1(_L("Unknown command."));
- ret= EFalse;
- }
- return ret;
- }
-
-
-/**
- * Command to open a connection (RConnection::Open). The errors are management
- * with SetError() and SetBlockResult().
- * @param aSection Section in the ini file for this command
- * @return
- */
-void CT_RConnectionData::DoCmdOpen(const TTEFSectionName& aSection)
- {
- INFO_PRINTF1(_L("*START* CT_RConnectionData::DoCmdOpen"));
- TBool dataOk = ETrue;
-
- // read param from the ini file
- TPtrC socketServName;
- if(!GetStringFromConfig(aSection, KSocketServ, socketServName))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KSocketServ);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- if (dataOk)
- {
- RSocketServ* iSocketServ = static_cast(GetDataObjectL(socketServName));
-
- // Open a connection
- TInt err = iConnection->Open(*iSocketServ);
- if(err == KErrNone)
- {
- INFO_PRINTF1(_L("The connection was opened"));
- }
- else
- {
- ERR_PRINTF2(_L("iConnection->Open( iSocketServ ) Failed with error %d"), err);
- SetError(err);
- }
-
- INFO_PRINTF1(_L("*END* CT_RConnectionData::DoCmdOpen"));
- }
- }
-
-/**
- * Command to Start a connection with the ID IAP given before in the wrapper CT_RSocketServData. The
- * errors are management with SetError() and SetBlockResult()
- * @param aSection Section in the ini file for this command
- * @return
- */
-void CT_RConnectionData::DoCmdStart(const TTEFSectionName& aSection)
- {
- INFO_PRINTF1(_L("*START* CT_RConnectionData::DoCmdStart"));
- TBool dataOk = ETrue;
-
- // read a param from the ini file
- TPtrC socketServName;
- if(!GetStringFromConfig(aSection, KSocketServ, socketServName))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KSocketServ);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- if (dataOk)
- {
- TInt err(KErrNone);
- TUint32 id;
-
- // Get complete wrapper
- CT_RSocketServData* iSocketServ = static_cast(GetDataWrapperL(socketServName));
- INFO_PRINTF2(_L("iSocketServ: %S"), &socketServName);
-
- if(iSocketServ != NULL)
- {
- // Start the connection using the given (WLAN) access point
- id = iSocketServ->GetIapID();
- INFO_PRINTF2(_L("CT_RConnectionData::DoCmdStart: Start RConnection, using IAP [%d]"), id);
-
- TCommDbConnPref* connPref = new (ELeave) TCommDbConnPref;
- connPref->SetIapId(id);
- connPref->SetDialogPreference( ECommDbDialogPrefDoNotPrompt );
- connPref->SetDirection( ECommDbConnectionDirectionOutgoing );
- connPref->SetBearerSet(KCommDbBearerUnknown);
-
- INFO_PRINTF1(_L("CT_RConnectionData: Starting connection"));
- // Wait before the connection is really made
- // Wait time is 8 seconds.
- err = iConnection->Start( *connPref ) ;
- if(err != KErrNone)
- {
- ERR_PRINTF2(_L("iConnection->Start( connPref ) Fail: %d "),err);
- SetError(err);
- }
- }
- else
- {
- ERR_PRINTF1(_L("CT_RConnectionData::DoCmdStart: iSocketServ is NULL"));
- SetBlockResult(EFail);
- }
- }
-
- INFO_PRINTF1(_L("*END* CT_RConnectionData::DoCmdStart"));
- }
-
-
-/**
- * Command to close a connection(RConnection::Close)
- * @param
- * @return
- */
-void CT_RConnectionData::DoCmdClose()
- {
- INFO_PRINTF1(_L("*START* CT_RConnectionData::DoCmdClose"));
- Close();
- INFO_PRINTF1(_L("*END* CT_RConnectionData::DoCmdClose"));
- }
-
-/**
- * Helper function for the command DoCmdConnection
- * @param
- * @return
- */
-
-void CT_RConnectionData::Close()
- {
- INFO_PRINTF1(_L("Closing connection"));
- iConnection->Close();
- }
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/src/T_RFileData.cpp
--- a/wlanapitest/wlanhaitest/wlan/src/T_RFileData.cpp Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,192 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-#include "t_rfiledata.h"
-
-/*@{*/
-//LIT for the command DoCmdGenerateFile
-_LIT(KCmdGenerateFile, "GenerateFile");
-/*@}*/
-
-/*@{*/
-//LITs for param reads from the ini file
-_LIT(KFile, "File");
-_LIT(KSize, "Size");
-/*@}*/
-
-
-/**
- * Two phase constructor
- *
- * @leave system wide error
- */
-CT_RFileData* CT_RFileData::NewL()
- {
- CT_RFileData* ret = new (ELeave) CT_RFileData();
- CleanupStack::PushL(ret);
- ret->ConstructL();
- CleanupStack::Pop(ret);
- return ret;
- }
-
-/**
- * Public destructor
- */
-CT_RFileData::~CT_RFileData()
- {
- iFs.Close();
-
- if (iFile)
- {
- delete iFile;
- iFile = NULL;
- }
- }
-
-/**
- * Private constructor. First phase construction
- */
-CT_RFileData::CT_RFileData()
-: iFile(NULL),
- iFs()
- {
- }
-
-/**
- * Second phase construction
- *
- * @internalComponent
- *
- * @return N/A
- *
- * @pre None
- * @post None
- *
- * @leave system wide error
- */
-void CT_RFileData::ConstructL()
- {
- iFile = new (ELeave)RFile();
- }
-
-/**
- * Return a pointer to the object that the data wraps
- *
- * @return pointer to the object that the data wraps
- */
-TAny* CT_RFileData::GetObject()
- {
- return iFile;
- }
-
-/**
- * Process a command read from the Ini file
- * @param aCommand The command to process
- * @param aSection The section get from the *.ini file of the project T_Wlan
- * @param aAsyncErrorIndex Command index dor async calls to returns errors to
- * @return TBool ETrue if the command is process
- * @leave system wide error
- */
-
-TBool CT_RFileData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt /*aAsyncErrorIndex*/)
- {
- TBool ret =ETrue;
- if(aCommand == KCmdGenerateFile())
- {
- DoCmdGenerateFile(aSection);
- }
- else
- {
- ERR_PRINTF1(_L("Unknown command."));
- ret = EFalse;
- }
- return ret;
- }
-
-
-/**
- * Command to generate a file for uploading in a host. If there are errors, SetBlockResult() and SetError()
- * are used for management.
- * @param aSection Section in the ini file for this command
- * @return
- */
-void CT_RFileData::DoCmdGenerateFile(const TTEFSectionName& aSection)
- {
- INFO_PRINTF1(_L("*START* CT_RFileData::DoCmdGenerateFile"));
-
- TBool dataOk = ETrue;
-
- TPtrC file;
- if(!GetStringFromConfig(aSection, KFile, file))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KFile);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- TInt size;
- if(!GetIntFromConfig(aSection, KSize, size))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KSize);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- if (dataOk)
- {
- INFO_PRINTF1(_L("Connect RFs"));
-
- CleanupClosePushL( iFs );
- CleanupClosePushL( *iFile );
-
- TInt err = iFs.Connect();
- if(err == KErrNone)
- {
- INFO_PRINTF1(_L("Replace file"));
- err = iFile->Replace( iFs, file, EFileShareAny|EFileWrite );
- if(err == KErrNone)
- {
- INFO_PRINTF1(_L("Set file size"));
- err = iFile->SetSize( size );
- if(err != KErrNone)
- {
- ERR_PRINTF2(_L("CT_RFileData::DoCmdGenerateFile: file.SetSize(...) Failed with error %d"), err);
- SetError(err);
- }
- }
- else
- {
- ERR_PRINTF2(_L("CT_RFileData::DoCmdGenerateFile: file.Replace(...) Failed with error %d"), err);
- SetError(err);
- }
- }
- else
- {
- ERR_PRINTF2(_L("CT_RFileData::DoCmdGenerateFile: fs.Connect() Failed with error %d"), err);
- SetError(err);
- }
-
- INFO_PRINTF1(_L("Close RFile handle"));
- CleanupStack::PopAndDestroy( iFile );
- INFO_PRINTF1(_L("Close RFs handle"));
- CleanupStack::PopAndDestroy( &iFs );
- }
-
- INFO_PRINTF1(_L("*END* CT_RFileData::DoCmdGenerateFile"));
- }
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/src/T_RSocketData.cpp
--- a/wlanapitest/wlanhaitest/wlan/src/T_RSocketData.cpp Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1359 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-#include
-#include "t_rsocketdata.h"
-
-/*@{*/
-// LITs from the ini file
-_LIT( KSocketServ, "socketserv");
-_LIT( KConnection, "connection");
-_LIT( KScanInfo, "scaninfo");
-_LIT( KAddress, "Ip");
-_LIT( KPort, "Port");
-_LIT( KFile, "File");
-_LIT( KSave, "Save");
-_LIT( KARates, "rate");
-_LIT( KFileServer, "FileServer");
-/*@}*/
-
-/*@{*/
-// Upload
-_LIT(KNullFile, "KNullDesC");
-/*@}*/
-
-/*@{*/
-// LITs for the commands
-_LIT( KCmdOpen, "Open");
-_LIT( KCmdConnect, "Connect");
-_LIT( KCmdHttpGet, "HttpGet");
-_LIT( KCmdDownloadSendHTTPGet, "DownloadSendHTTPGet");
-_LIT( KCmdRecvOneOrMore, "RecvOneOrMore");
-_LIT( KCmdUploadSendHTTPPost, "UploadSendHTTPPost");
-_LIT( KCmdCheckSupportedRates, "CheckSupportedRates");
-_LIT( KCmdShutdown, "Shutdown");
-_LIT( KCmdClose, "Close");
-/*@}*/
-
-/*@{*/
-// Constants for creating a HTTP request in the command DoCmdDownloadSendHTTPGet
-_LIT8( KHTTPGET, "GET");
-_LIT8( KHTTPSeparator, " ");
-_LIT8( KHTTPSuffix, "HTTP/1.1");
-_LIT( KHostS, "Host");
-_LIT8( KLineFeed, "\r\n");
-_LIT8( KEmptyLine, "\r\n\r\n");
-_LIT8( KHeaderEndMark, "\r\n\r\n" );
-_LIT8( KContentLengthField, "Content-Length: ");
-_LIT8( KFieldEnd, "\r\n" );
-_LIT8( KGETHTTP, "GET / HTTP/1.0\r\n\r\n" );
-/*@}*/
-
-/*@{*/
-// Constants for CreateHTTPHeaderStart
-_LIT8(KHTTPPOST, "POST");
-_LIT8(KLineBreak, "\r\n");
-_LIT(KClientID, "clientID");
-_LIT(KServerScript, "serverScript");
-_LIT8(KFrom, "From:");
-_LIT8(KHosts, "Host:");
-_LIT8(KContentType, "Content-Type:");
-_LIT8(KContentLength, "Content-Length:");
-_LIT8(KContentDisposition, "Content-Disposition:");
-_LIT8(KMultipartType, "multipart/form-data;");
-_LIT8(KOctetType, "application/octet-stream");
-_LIT8(KBoundary, "boundary=---------------------------sg976436h73");
-_LIT8(KBoundaryStart, "-----------------------------sg976436h73");
-_LIT8(KDisposition, "form-data; name=\"userfile\"; filename=");
-_LIT8(KBackS, "\"");
-_LIT8(KBoundaryEnd, "-----------------------------sg976436h73--");
-/*@}*/
-
-
-const TInt KHttpHeaderBufferIncrement = 4096;
-// Const for supported rates
-// The first bit includes information about BSSBasicRateSet,
-// mask it out
-
-const TUint32 KBasicRateMask = 0x7F;
-// 802.11g supported speed rate
-const TUint8 K80211Rate1Mbit = 2;
-const TUint8 K80211Rate2Mbit = 4;
-const TUint8 K80211Rate5Mbit = 11;
-const TUint8 K80211Rate11Mbit = 22;
-const TUint8 K80211Rate12Mbit = 24;
-const TUint8 K80211Rate18Mbit = 36;
-const TUint8 K80211Rate22Mbit = 44;
-const TUint8 K80211Rate24Mbit = 48;
-const TUint8 K80211Rate33Mbit = 66;
-const TUint8 K80211Rate36Mbit = 72;
-const TUint8 K80211Rate48Mbit = 96;
-const TUint8 K80211Rate54Mbit = 108;
-
-
-
-
-
-
-
-/**
- * Two phase constructor
- *
- * @leave system wide error
- */
-CT_RSocketData* CT_RSocketData::NewL()
- {
- CT_RSocketData * ret = new (ELeave)CT_RSocketData();
- CleanupStack::PushL(ret);
- ret->ConstructL();
- CleanupStack::Pop(ret);
- return ret;
- }
-
-/*
- *RunL method for management Active callbacks
- * @param aActive param to review which active call back is being fished
- * @param aIndex
- * @return void
- */
-void CT_RSocketData::RunL(CActive* aActive, TInt /*aIndex*/)
- {
- INFO_PRINTF1(_L("*START* CT_RSocketData::RunL"));
- DecOutstanding(); // One of the async calls has completed
- TInt err(KErrNone);
- if(aActive == iActiveCallback)
- {
- INFO_PRINTF1(_L("active call back for Write Socket."));
- err = iActiveCallback->iStatus.Int();
- if(err != KErrNone)
- {
- ERR_PRINTF1(_L("iSocket->Write(...) Fail"));
- SetError(err);
- }
- else
- {
- INFO_PRINTF2(_L("CT_RSocketData::SendHTTPGet [%d]"), iActiveCallback->iStatus.Int());
- INFO_PRINTF1(_L("Asynchronous task has completed. RunL called"));
- }
- }
- else if(aActive == iActCallConnectSocket)
- {
- INFO_PRINTF1(_L("active call back for Connect Socket."));
- err = iActCallConnectSocket->iStatus.Int();
- if(err != KErrNone)
- {
- ERR_PRINTF1(_L("iSocket->Connect(...) Fail"));
- SetError(err);
- }
- else
- {
- INFO_PRINTF1(_L("CT_RSocketData::DoCmdConnect(...) success"));
- iSocketOpened = ETrue;
- }
- }
- else if(aActive == iActCallShutDownSocket)
- {
- INFO_PRINTF1(_L("active call back for Shutdown Socket."));
- err = iActCallShutDownSocket->iStatus.Int();
- if(err != KErrNone)
- {
- ERR_PRINTF2(_L("iSocket->Shutdown(...): [%d] Fail"),iActCallShutDownSocket->iStatus.Int());
- SetError(err);
- }
- else
- {
- INFO_PRINTF1(_L("CT_RSocketData::Shutdown success"));
- iSocketStarted = EFalse;
- }
- }
- else
- {
- ERR_PRINTF1(_L("An unchecked active object completed"));
- SetBlockResult(EFail);
- }
-
- INFO_PRINTF1(_L("*END* CT_RSocketData::RunL"));
- }
-/*
- * public destructor
- */
-CT_RSocketData::~CT_RSocketData()
- {
- if (iSocketStarted)
- {
- INFO_PRINTF1(_L("CT_RSocketData: Shutting down socket"));
- Shutdown();
- }
- if (iSocketOpened)
- {
- Close();
- }
- if (iDownloadBuffer)
- {
- delete iDownloadBuffer;
- iDownloadBuffer = NULL;
- }
- if (iSocket)
- {
- delete iSocket;
- iSocket = NULL;
- }
- if (iActiveCallback)
- {
- delete iActiveCallback;
- iActiveCallback = NULL;
- }
- if (iActCallShutDownSocket)
- {
- delete iActCallShutDownSocket;
- iActCallShutDownSocket = NULL;
- }
- if (iActCallConnectSocket)
- {
- delete iActCallConnectSocket;
- iActCallConnectSocket = NULL;
- }
-
- iFs.Close();
-
- if (iUploadBuffer)
- {
- delete iUploadBuffer;
- iUploadBuffer = NULL;
- }
- }
-
-/**
- * Private constructor. First phase construction
- *
- */
-CT_RSocketData::CT_RSocketData()
-: iSocket(NULL),
- iActiveCallback(NULL),
- iActCallConnectSocket(NULL),
- iActCallShutDownSocket(NULL),
- iSocketOpened(EFalse),
- iSocketStarted(EFalse),
- iAsyncErrorIndex(0),
- iDownloadBuffer(NULL),
- iUploadBuffer(NULL),
- iHttpResponseHeader(),
- iDownloadThroughput(0.0),
- iFs(),
- iUploadThroughput(0.0),
- itotalReceived(0)
- {
-
- }
-
-/**
- * Second phase construction
- *
- * @internalComponent
- *
- * @return N/A
- *
- * @pre None
- * @post None
- *
- * @leave system wide error
- */
-void CT_RSocketData::ConstructL()
- {
- const TInt KDefaultBufferSize = 4096;
- TInt err(KErrNone);
- iSocket = new (ELeave) RSocket();
- iActiveCallback = CActiveCallback::NewL(*this);
- iActCallConnectSocket = CActiveCallback::NewL(*this);
- iActCallShutDownSocket = CActiveCallback::NewL(*this);
- iDownloadBuffer = HBufC8::NewL( KDefaultBufferSize);
- iUploadBuffer = HBufC8::NewL(KDefaultBufferSize);
- err = iFs.Connect();
- if(err != KErrNone)
- {
- SetError(err);
- }
- }
-
-
-/**
- * Return a pointer to the object that the data wraps
- *
- * @return pointer to the object that the data wraps
- */
-TAny* CT_RSocketData::GetObject()
- {
- return iSocket;
- }
-
-
-
-/**
- * Process a command read from the Ini file
- * @param aCommand The command to process
- * @param aSection The section get from the *.ini file of the project T_Wlan
- * @param aAsyncErrorIndex Command index for async calls to returns errors to
- * @return TBool ETrue if the command is process
- * @leave system wide error
- *
- */
-TBool CT_RSocketData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
- {
- TBool ret = ETrue;
- if(aCommand == KCmdOpen )
- {
- DoCmdOpen(aSection);
- }
- else if(aCommand == KCmdConnect)
- {
- DoCmdConnect(aSection,aAsyncErrorIndex);
- }
- else if(aCommand == KCmdDownloadSendHTTPGet)
- {
- DoCmdDownloadSendHTTPGet(aSection,aAsyncErrorIndex);
- }
- else if(aCommand == KCmdRecvOneOrMore)
- {
- DoCmdRecvOneOrMore(aSection);
- }
- else if(aCommand == KCmdUploadSendHTTPPost)
- {
- DoCmdUploadSendHTTPPost(aSection);
- }
- else if(aCommand == KCmdShutdown)
- {
- DoCmdShutdown(aAsyncErrorIndex);
- }
- else if(aCommand == KCmdClose)
- {
- DoCmdClose();
- }
- else if(aCommand == KCmdHttpGet)
- {
- DoCmdHttpGet();
- }
- else if(aCommand == KCmdCheckSupportedRates)
- {
- DoCmdCheckSupportedRates(aSection);
- }
- else
- {
- ERR_PRINTF1(_L("Unknown command."));
- ret = EFalse;
- }
- return ret;
- }
-
-
-
-
-/**
- * Open the Socket from RSocket. The errors are management with SetError() and SetBlockResult().
- * @param aSection Section in the ini file for this command.
- * @return
- */
-void CT_RSocketData::DoCmdOpen(const TTEFSectionName& aSection)
- {
- INFO_PRINTF1(_L("*START* CT_RSocketData::DoCmdOpen"));
- TBool dataOk = ETrue;
-
- TPtrC connectionName;
- if(! GetStringFromConfig(aSection, KConnection, connectionName))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KConnection);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- TPtrC socketServName;
- if(! GetStringFromConfig(aSection, KSocketServ, socketServName))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KSocketServ);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- if (dataOk)
- {
- INFO_PRINTF1(_L("Opening a TCP/IP socket"));
-
- RConnection* rConnection = static_cast(GetDataObjectL(connectionName));
- RSocketServ* rSocketServ = static_cast(GetDataObjectL(socketServName));
-
- if(rConnection != NULL && rSocketServ != NULL)
- {
- TInt error = iSocket->Open( *rSocketServ, KAfInet, KSockStream, KProtocolInetTcp, *rConnection );
-
- if(error == KErrNone)
- {
- iSocketOpened = ETrue;
- }
- else
- {
- ERR_PRINTF2(_L("Socket opening failed [%d]"), error);
- SetError(error);
- }
- }
- else
- {
- if(rConnection == NULL)
- {
- ERR_PRINTF2(_L("rConnection is NULL: %S"),rConnection);
- SetBlockResult(EFail);
- }
-
- if(rSocketServ == NULL)
- {
- INFO_PRINTF2(_L("rSocketServ is NULL: %S"),rSocketServ);
- SetBlockResult(EFail);
- }
- }
- }
-
- INFO_PRINTF1(_L("*END* CT_RSocketData::DoCmdOpen"));
- }
-
-/**
- * Command to Connect a Socket of RSocket.
- * @param aSection Section to read from the ini file
- * @param aAsyncErrorIndex Command index for async calls to returns errors to
- * @return
- */
-void CT_RSocketData::DoCmdConnect(const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
- {
- INFO_PRINTF1(_L("*START* CT_RSocketData::DoCmdConnect"));
- TBool dataOk = ETrue;
-
- //Getting from the .ini the IP Address
- TPtrC aIpAddr;
- if(!GetStringFromConfig( aSection, KAddress, aIpAddr ))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KAddress);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- //Getting the port from the file ini
- TInt aPort;
- if(!GetIntFromConfig( aSection, KPort,aPort ))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KPort);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- if(dataOk)
- {
- // Set the IP Address
- TInetAddr inetAddr;
- TInt err = inetAddr.Input( aIpAddr ) ;
- if(err == KErrNone)
- {
- INFO_PRINTF2(_L("Remote IP: %S"), &aIpAddr );
- INFO_PRINTF2( _L("Port: %d"), aPort );
- // Set the port
- inetAddr.SetPort( aPort );
- // Connect an IP through the Port 80
- iSocket->Connect( inetAddr, iActCallConnectSocket->iStatus );
- iActCallConnectSocket->Activate(aAsyncErrorIndex);
- IncOutstanding();
- }
- else
- {
- ERR_PRINTF2(_L("inetAddr.Input( aIpAddr ) Failed with error %d"), err);
- SetError(err);
- }
- }
-
- INFO_PRINTF1(_L("*END* CT_RSocketData::DoCmdConnect"));
- }
-
-/**
- * Command to send the HTTP Get, using the socket Write.
- * @param aSection Section to read from the ini file
- * @param aAsyncErrorIndex Command index for async calls to returns errors to
- * @return
- */
-void CT_RSocketData::DoCmdDownloadSendHTTPGet(const TTEFSectionName& aSection, const TInt aAsyncErrorIndex )
- {
- INFO_PRINTF1(_L("*START* CT_RSocketData::DoCmdDownloadSendHTTPGet"));
- TBool dataOk = ETrue;
-
- // Read params from the ini file
- TPtrC aHost;
- if(!GetStringFromConfig( aSection, KHostS, aHost))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KHostS);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- TPtrC aFilename;
- if(!GetStringFromConfig( aSection, KFile, aFilename ))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KFile);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- if (dataOk)
- {
- const TInt KMaxHostNameLength(256);
- if( aHost.Length() > KMaxHostNameLength )
- {
- ERR_PRINTF1(_L("Host is too long, cannot send HTTP request"));
- SetBlockResult(EFail);
- }
- else if( aFilename.Length() > KMaxFileName )
- {
- ERR_PRINTF1(_L("Filename is too long, cannot send HTTP request"));
- SetBlockResult(EFail);
- }
- else
- {
- INFO_PRINTF1(_L("Create HTTP GET request"));
- // Buffer that will hold the request.
- TBuf8< sizeof( KHTTPGET ) +
- sizeof( KHTTPSeparator ) +
- KMaxFileName +
- sizeof( KHTTPSeparator ) +
- sizeof( KHTTPSuffix ) +
- sizeof( KLineFeed ) +
- sizeof( KHosts ) +
- KMaxHostNameLength +
- sizeof( KEmptyLine ) > request;
- // Construct the final request.
- request.Copy( KHTTPGET );
- request.Append( KHTTPSeparator );
- request.Append( aFilename );
- request.Append( KHTTPSeparator );
- request.Append( KHTTPSuffix );
- request.Append( KLineFeed );
- request.Append( KHosts );
- request.Append( aHost );
- request.Append( KEmptyLine );
-
- INFO_PRINTF1(_L("Write to socket"));
- // Send the request through socket
- iSocket->Write(request, iActiveCallback->iStatus);
- iActiveCallback->Activate(aAsyncErrorIndex);
- IncOutstanding();
- }
- }
-
- INFO_PRINTF1(_L("*END* CT_RSocketData::DoCmdDownloadSendHTTPGet"));
- }
-
-/**
- * Command to receive an HTTP Response for Upload and Download of files.
- * @param aSection Section to read from the ini file
- * @return
- */
-void CT_RSocketData::DoCmdRecvOneOrMore(const TTEFSectionName& aSection)
- {
- INFO_PRINTF1(_L("*START* CT_RSocketData::DoCmdRecvOneOrMore"));
- TBool dataOk = ETrue;
-
- // Read from the ini file
- TPtrC aFilename;
- if(!GetStringFromConfig( aSection, KSave,aFilename ))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KSave);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- if (dataOk)
- {
- RFile file;
- TInt error = KErrNone;
-
- //if KNullFile then Upload
- TBool discardData = ( aFilename == KNullFile);
- INFO_PRINTF2(_L("File and path to Download: %S"),&aFilename);
- if( !discardData )
- {
- INFO_PRINTF1( _L("Data is not discarded, creating file") );
- error = file.Replace( iFs, aFilename, EFileShareAny|EFileWrite );
- }
- else
- {
- INFO_PRINTF1( _L("Discarding downloaded data") );
- }
-
- if( error == KErrNone )
- {
- TSockXfrLength received;
- TInt totalReceived = 0;
- TInt contentReceived = 0;
- TInt timedReceived = 0;
- TInt contentLength = 0;
- TRequestStatus status;
- TPtr8 downloadBufferPtr( iDownloadBuffer->Des() );
-
- downloadBufferPtr.SetMax();
- INFO_PRINTF2( _L("Using buffer size [%d]"), downloadBufferPtr.MaxSize() );
-
- INFO_PRINTF1(_L("Set time stamps for download"));
- TTime endTime;
- TTime startTime;
-
- INFO_PRINTF1( _L("Receiving data"));
-
- // Let's assume that we receive a HTTP header first
- TBool header( ETrue );
- TBool timerStarted( EFalse );
- TBool failure = EFalse; // a flag to delete multiple returns
-
- iHttpResponseHeader.Zero();
- // receive until RecvOneOrMore fails or all content is received
- do
- {
- if( !timerStarted && !header)
- {
- startTime.HomeTime();
- endTime.HomeTime();
- timerStarted = ETrue;
- }
-
- iSocket->RecvOneOrMore( downloadBufferPtr, 0, status, received );
- User::WaitForRequest( status );
- if( !header )
- {
- timedReceived += received();
- }
-
- if( KErrNone == status.Int() )
- {
- // Check if we are still receiving the HTTP header
- if( header )
- {
- //Increase httpResponseheader size if needed
- if(iHttpResponseHeader.Length() + downloadBufferPtr.Length() > iHttpResponseHeader.MaxLength())
- {
- error = iHttpResponseHeader.ReAlloc(iHttpResponseHeader.MaxLength() + KHttpHeaderBufferIncrement);
- if(error != KErrNone)
- {
- ERR_PRINTF2( _L("iHttpResponseHeader.ReAlloc(...) Failed with error %d"), error);
- SetError( error );
- failure = ETrue;
- break;
- }
- }
-
- //Append the donwloaded content to headerbuffer
- iHttpResponseHeader.Append(downloadBufferPtr);
- TInt headerEndIndex = iHttpResponseHeader.Find( KHeaderEndMark );
- if( headerEndIndex != KErrNotFound )
- {
- INFO_PRINTF1( _L("Header end mark found"));
- //Parse Content-Length field and extract content length
- TInt contentLengthStart = iHttpResponseHeader.Find( KContentLengthField );
- //If Content-Length field is found
- if( contentLengthStart != KErrNotFound )
- {
- INFO_PRINTF1(_L("Content-Length field found from HTTP response"));
- contentLengthStart += KContentLengthField().Length();
- TPtrC8 contentLengthDes;
- contentLengthDes.Set(iHttpResponseHeader.Mid( contentLengthStart ));
- TInt contentLengthEnd = contentLengthDes.Find( KFieldEnd );
- contentLengthDes.Set(contentLengthDes.Mid(0, contentLengthEnd));
- TLex8 lex;
- lex.Assign( contentLengthDes );
- lex.Val(contentLength);
- INFO_PRINTF2( _L("Content-Length: [%d]"), contentLength );
- }
- else
- {
- INFO_PRINTF1( _L("No Content-Length field found from HTTP response"));
- INFO_PRINTF1( _L("Assuming Content-Length: 0"));
- contentLength = 0;
- file.Close();
- error = iFs.Delete(aFilename);
- if(error != KErrNone)
- {
- INFO_PRINTF3(_L("Error [%d] for delete the file %S"), &aFilename,error);
- SetError(error);
- failure = ETrue;
- break;
- }
- ERR_PRINTF2(_L("File %S was not found"), &aFilename);
- SetBlockResult(EFail);
- failure = ETrue;
- break;
- }
- // Header was found
- headerEndIndex += KHeaderEndMark().Length();
- //Convert the headerEndIndex in httpResponseheader to index in downloadBuffer
- headerEndIndex -= totalReceived;
- //Delete remaining parts of the HTTP header from the download buffer
- downloadBufferPtr.Delete( 0, headerEndIndex );
- header = EFalse;
- }
- }
-
- // Increase the total received amount as we receive more data.
- // Note: received data count also counts headers, this is taken
- // into account in timing (startTime)
- totalReceived += received();
- if(!header)
- {
- contentReceived += downloadBufferPtr.Length();
- }
-
- if( !discardData )
- {
- error = file.Write( *iDownloadBuffer );
- if( KErrNone != error )
- {
- ERR_PRINTF2( _L("Failed to write local file [%d]"), error );
- file.Close();
- SetError(error);
- failure = ETrue;
- break;
- }
- }
- }
- else
- {
- INFO_PRINTF1(_L("Set end time"));
- endTime.HomeTime();
- INFO_PRINTF2( _L("Receiving err [%d]"), status.Int());
- break;
- }
- }
- while( KErrNone == status.Int() && contentReceived < contentLength );
-
- if (!failure)
- {
- endTime.HomeTime();
- INFO_PRINTF2( _L("Received total of [%d] bytes (inc headers)"), totalReceived );
- INFO_PRINTF2( _L("Content received [%d] bytes"), contentReceived );
-
- //Set this printing optional
- //Print only if any amount of datatransfer was timed (skipped in the case of very short data transfers)
- if( timerStarted )
- {
- INFO_PRINTF1(_L("Calculate duration of the transfer"));
- TTimeIntervalMicroSeconds duration = endTime.MicroSecondsFrom( startTime );
- INFO_PRINTF2( _L("Duration for the timed data transfer was [%Ld] microseconds"), duration.Int64() );
- INFO_PRINTF2( _L("Received [%d] bytes during timed data transfer"), timedReceived);
- iDownloadThroughput = ThroughputInMegaBits( duration, timedReceived );
- }
- else
- {
- INFO_PRINTF1( _L("Data transfer too short for throughput calculation"));
- }
-
- // We allow any response to our reply at the moment.
- if( !discardData )
- {
- file.Close();
- }
- }
- }
- else
- {
- ERR_PRINTF2( _L("Failed to open local file [%d]"), error );
- SetError(error);
- }
- }
-
- INFO_PRINTF1(_L("*END* CT_RSocketData::DoCmdRecvOneOrMore"));
- }
-
-/**
- * Create an HTTP Post for uploading files.
- * @param aSection Section to read from the ini file
- * @return
- */
-void CT_RSocketData::DoCmdUploadSendHTTPPost(const TTEFSectionName& aSection)
- {
- INFO_PRINTF1(_L("*START* CT_RSocketData::DoCmdUploadSendHTTPPost"));
- TBool dataOk = ETrue;
-
- INFO_PRINTF1( _L("Write to socket"));
-
- TPtrC aFilename;
- if(!GetStringFromConfig(aSection,KFile,aFilename))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KFile);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- TPtrC fileServer;
- if(!GetStringFromConfig(aSection,KFileServer,fileServer))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KFileServer);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- TPtrC clientID;
- if(!GetStringFromConfig(aSection,KClientID,clientID))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KClientID);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- TPtrC serverScript;
- if(!GetStringFromConfig(aSection,KServerScript,serverScript))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KServerScript);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- if (dataOk)
- {
- const TInt KMaxTag = 256;
- // KHeaderWithoutData will change if you alter the header in any way that changes the
- // amount of characters in it! SO REMEMBER to calclulate header size again.
- const TInt KHeaderWithoutData = 200;
- TBuf8 request;
- TRequestStatus status;
-
- CreateHTTPHeaderStart(request, ReadFileSizeL(aFilename),fileServer, clientID, serverScript);
-
- iSocket->Write( request,status);
- User::WaitForRequest( status );
- if(status.Int() == KErrNone)
- {
- INFO_PRINTF1( _L("HTTP POST request send, sending payload next"));
- // Send file to iSocket
- SendFileToSocketL(aFilename);
- request.SetLength( 0 );
- CreateHTTPHeaderEnd(request);
-
- // Send the rest of the header
- INFO_PRINTF1(_L("Sending boundary end"));
- iSocket->Write( request, status );
- User::WaitForRequest( status );
- if(status.Int() != KErrNone)
- {
- ERR_PRINTF2(_L("CT_RSocketData::DoCmdUploadSendHTTPPost: iSocket->Write( request,status) Failed with error %d"), status.Int());
- SetError(status.Int());
- }
- }
- else
- {
- ERR_PRINTF2(_L("CT_RSocketData::DoCmdUploadSendHTTPPost: iSocket->Write( request,status) Failed with error %d"), status.Int());
- SetError(status.Int());
- }
- }
-
- INFO_PRINTF1(_L("*END* CT_RSocketData::DoCmdUploadSendHTTPPost"));
- }
-
-/**
- * Create or build the header for POST.
- * @param aRequest Descriptor with a lenght of 456 that contain the parameters for the POST
- * @param aDataSize Size of the file
- * @return
- */
-void CT_RSocketData::CreateHTTPHeaderStart(TDes8& aRequest, TInt aDataSize,TDesC& aFileServer, TDesC& clientID,TDesC& serverScript)
- {
- // Manually created HTTP Post request is difficult to maintain.
- // Request and server responce is logged into file during test run.
-
- // KHeaderWithoutData will change if you alter the header in any way
- // that changes the amount of characters in it! SO REMEMBER to calclulate
- // header size again.
- const TInt KHeaderWithoutData = 200;
- INFO_PRINTF1( _L("Set socket remote name"));
- TSockAddr address;
- iSocket->RemoteName( address );
-
- // Construct request
- aRequest.Append(KHTTPPOST);
- aRequest.Append(KHTTPSeparator);
- aRequest.Append(serverScript);
- aRequest.Append(KHTTPSeparator);
- aRequest.Append(KHTTPSuffix);
- aRequest.Append(KLineBreak);
-
- aRequest.Append(KHosts);
- aRequest.Append(KHTTPSeparator);
- aRequest.Append(address);
- aRequest.Append(KLineBreak);
-
- aRequest.Append(KFrom);
- aRequest.Append(KHTTPSeparator);
- aRequest.Append(clientID);
- aRequest.Append(KLineBreak);
-
- aRequest.Append(KContentType);
- aRequest.Append(KHTTPSeparator);
- aRequest.Append(KMultipartType);
- aRequest.Append(KHTTPSeparator);
- aRequest.Append(KBoundary);
- aRequest.Append(KLineBreak);
-
- aRequest.Append(KContentLength);
- aRequest.Append(KHTTPSeparator);
- // aRequest size + size of the data to be sent. Server must know how much
- // data is coming.
- aRequest.AppendNum(KHeaderWithoutData+aDataSize);
- aRequest.Append(KLineBreak);
-
- // extra line break
- aRequest.Append(KLineBreak);
-
- aRequest.Append(KBoundaryStart);
- aRequest.Append(KLineBreak);
-
- aRequest.Append(KContentDisposition);
- aRequest.Append(KHTTPSeparator);
- aRequest.Append(KDisposition);
- aRequest.Append(KBackS);
- aRequest.Append(aFileServer);
- aRequest.Append(KBackS);
- aRequest.Append(KLineBreak);
-
- aRequest.Append(KContentType);
- aRequest.Append(KHTTPSeparator);
- aRequest.Append(KOctetType);
- aRequest.Append(KLineBreak);
-
- aRequest.Append(KLineBreak);
- }
-
-/**
- * Send aFilename parameter to the Socket with RSocket::Write
- * @param aFilename name of the file send to the Socket
- * @return
- */
-void CT_RSocketData::SendFileToSocketL(const TDesC& aFilename)
- {
- TInt err(KErrNone);
- TPtr8 buffer( iUploadBuffer->Des() );
- buffer.SetMax();
- INFO_PRINTF2( _L("Using buffer size [%d]"), buffer.MaxSize() );
- TInt bytesSent = 0;
-
- INFO_PRINTF1( _L("Open file"));
- RFile file;
-
- err = file.Open(iFs, aFilename, EFileShareAny|EFileRead);
-
- if(err == KErrNone)
- {
- CleanupClosePushL( file );
- INFO_PRINTF1(_L("Read file size"));
- TInt fileSize = ReadFileSizeL(aFilename);
-
- INFO_PRINTF1( _L("Set time stamps for upload"));
- TTime endTime;
- endTime.HomeTime();
- TTime startTime;
- startTime.HomeTime();
-
- INFO_PRINTF1( _L("Send file"));
- // Loop while enough bytes are sent to socket
- while( bytesSent < fileSize )
- {
- TInt err = file.Read( buffer );
-
- if( err == KErrEof )
- {
- INFO_PRINTF1(_L("File sending finished"));
- INFO_PRINTF2( _L("Upload buffer length is [%d]"), buffer.Length());
- break;
- }
- else if( err != KErrNone )
- {
- ERR_PRINTF2( _L("Failed to read file [%d]"), err );
- SetError( err );
- break;
- }
-
- TRequestStatus status(KRequestPending);
- iSocket->Write( buffer, status );
- User::WaitForRequest( status );
- err = status.Int();
- if(err != KErrNone)
- {
- ERR_PRINTF2(_L("CT_RSocketData::SendFileToSocketL:iSocket->Write(...) Fail [%d] "),err);
- SetError(err);
- break;
- }
-
- bytesSent += ( buffer.Length() );
- }
-
- if (err == KErrNone || err == KErrEof)
- {
- INFO_PRINTF1( _L("Set end time"));
- endTime.HomeTime();
- INFO_PRINTF2( _L("Sent [%d] bytes to server"), bytesSent);
-
- INFO_PRINTF1( _L("Calculate duration of the transfer"));
- TTimeIntervalMicroSeconds duration = endTime.MicroSecondsFrom( startTime );
- INFO_PRINTF2( _L("Duration for the data transfer was [%Ld] microseconds"), duration.Int64() );
- iUploadThroughput = ThroughputInMegaBits( duration, bytesSent );
- CleanupStack::PopAndDestroy( &file );
- }
- }
- else
- {
- ERR_PRINTF2(_L("CT_RSocket::SendFileToSocketL::file.Open(...) Failed with error %d"), err);
- SetError(err);
- }
- }
-
-/**
- * Calculated the throughput based on duration of a data transfer and total transferred bytes.
- * @param aDuration Duration of the transfer
- * @param aBytes Total transferred in bytes
- * @return Throughput in MBps
- */
-TReal CT_RSocketData::ThroughputInMegaBits(TTimeIntervalMicroSeconds aDuration, TInt aBytes )
- {
- const TReal KBitsInByte(8.0);
- TReal throughput = ( KBitsInByte * (TReal) aBytes ) / (TReal) aDuration.Int64();
- return throughput;
- }
-
-/**
- * Read the lenght of the file (aFileName)
- * @param aFileName file to read the lenght
- * @return
- */
-TInt CT_RSocketData::ReadFileSizeL(const TDesC& aFilename)
- {
- RFile file;
- TInt error = file.Open(iFs, aFilename, EFileShareAny|EFileRead);
- if ( error != KErrNone)
- {
- ERR_PRINTF2( _L("Failed to open local file [%d]"), error);
- SetError(error);
- return error;
- }
-
- TInt fileSize = 0;
- error = file.Size(fileSize);
-
- if (error!= KErrNone)
- {
- ERR_PRINTF2(_L("Failed to read file size [%d]"), error);
- file.Close();
- SetError(error);
- return error;
- }
-
- file.Close();
- return fileSize;
- }
-
-/**
- * Build the final header to POST for uploading files
- * @param aRequest Descriptor with 456 of lenght that contain the final POST request
- * @return
- */
-void CT_RSocketData::CreateHTTPHeaderEnd(TDes8& aRequest)
- {
- //TRequestStatus status;
- aRequest.SetLength( 0 );
- //Create the rest of the header data
- aRequest.Append( KLineBreak );
- aRequest.Append( KBoundaryEnd );
- aRequest.Append( KLineBreak );
- }
-
-
-/**
- * Make a HTTP request to the socket
- * @param
- * @return
- */
-void CT_RSocketData::DoCmdHttpGet()
- {
- INFO_PRINTF1(_L("*START* CT_RSocketData::DoCmdHttpGet"));
-
- TInt err(KErrNone);
- //Constant for creating a HTTP request.
- const TInt KHTTPSize = 128;
- // Buffer that will hold the request.
- TBuf8 request;
- // Construct the final request.
- request.Append( KGETHTTP );
-
- INFO_PRINTF1( _L("Write to socket") );
- TRequestStatus status( KRequestPending );
- iSocket->Write( request, status);
- User::WaitForRequest( status );
- INFO_PRINTF2( _L("CT_RSocketData::DoCmdHttpGet: Write done: [%d]"), status.Int() );
- err = status.Int();
-
- if(err == KErrNone)
- {
- INFO_PRINTF1( _L("CT_RSocketData::DoCmdHttpGet: Receive from socket") );
- // receive until RecvOneOrMore fails
- do
- {
- RecvOneOrMore(status);
- }
- while( status.Int() == KErrNone );
-
- INFO_PRINTF2( _L("CT_RSocketData::DoCmdHttpGet: Receiving finished. Received [%d] bytes in total"), itotalReceived );
-
- // Currently all error codes returned by the server are accepted.
- // Should only KErrEof be accepted?
- INFO_PRINTF2( _L("Ignoring error code from RSocket::RecvOneOrMore [%d]"), status.Int());
- }
- else
- {
- ERR_PRINTF2(_L("CT_RSocketData::DoCmdHttpGet: iSocket.Write(...) Failed with error %d"), err);
- SetError(err);
- }
-
- INFO_PRINTF1(_L("*END* CT_RSocketData::DoCmdHttpGet"));
- }
-
-/**
- * Receive data from a remote host.
- * @param status Indicates the complexion status of the request
- * @return
- */
-void CT_RSocketData::RecvOneOrMore(TRequestStatus &status)
- {
- TInt err(KErrNone);
- // Create variables for receive buffer and received data counting variables.
- const TInt KBufferSize(1024);
- TBuf8 buffer;
- TSockXfrLength received;
- iSocket->RecvOneOrMore( buffer, 0, status, received);
- User::WaitForRequest( status );
- err = status.Int();
- if( err == KErrNone )
- {
- INFO_PRINTF2( _L("CWlanTestWrapper: Received [%d] bytes"), received() );
- itotalReceived += received();
- }
- else if( err == KErrEof )
- {
- INFO_PRINTF1(_L("End of File reached"));
- }
- else
- {
- ERR_PRINTF2(_L("RecvOneOrMore async call failed with error %d"), err);
- SetError(err);
- }
- }
-
-
-
-/**
- * Check the supported rates for the IAP.
- * @param aSection Section to read from the ini file
- * @return
- */
-void CT_RSocketData::DoCmdCheckSupportedRates(const TTEFSectionName& aSection)
- {
- INFO_PRINTF1(_L("*START* CT_RSocketData::DoCmdCheckSupportedRates"));
- TBool dataOk = ETrue;
-
- // Read from the ini file
- TInt aRate;
- if(!GetIntFromConfig(aSection,KARates,aRate))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KARates);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- // Check if a scan has been made
- TPtrC iScanInfoName;
- if(!GetStringFromConfig(aSection,KScanInfo,iScanInfoName ))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KScanInfo);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- if (dataOk)
- {
- CWlanScanInfo* iScanInfo = static_cast(GetDataObjectL(iScanInfoName));
-
- // Check if a scan has been made
- if( iScanInfo != NULL )
- {
- const TUint8 KTemp80211SupRatesId = 1;
- const TUint8 KTemp80211SupRatesMaxLen = 18;
- // Scan info gives data as "information elements"
- TUint8 ieLen(0);
- const TUint8* ieData(0);
-
- TInt err = iScanInfo->InformationElement( KTemp80211SupRatesId, ieLen, &ieData );
-
- // Check supported rate if the information element was available
- if(err == KErrNone)
- {
- TBuf8 supRates8;
- supRates8.Copy( ieData, ieLen );
- TBool supported = CheckSupportedRates( supRates8, aRate );
- if(!supported)
- {
- ERR_PRINTF2( _L("%d rate not supportedRates"), aRate );
- SetError(KErrNotSupported);
- }
- }
- else
- {
- ERR_PRINTF2( _L("err: [%d]"), err );
- SetError(err);
- }
- }
- else
- {
- ERR_PRINTF1(_L("Failed to get CWlanScanInfo object"));
- SetBlockResult(EFail);
- }
- }
-
- INFO_PRINTF1(_L("*END* CT_RSocketData::DoCmdCheckSupportedRates"));
- }
-
-/**
- * Review if the rate its supported.
- * @param aSupportedRates Rate to calculate and if match with the desired rate
- * @param aRate rate to verify if is supporrted, The rate to be checked in 0.5Mb/s units.
- * Ie. 2 = 2 * 0.5Mb/s = 1Mb/s.
- * @return Etrue if the rate is supported
- */
-TBool CT_RSocketData::CheckSupportedRates(const TDesC8& aSupportedRates, const TUint8 aRate)
- {
- // Supported rates information element format is the following:
- // | element id (1 octet) | length (1 octet) | supported rates (1-8 octets) |
- // where each octet of supported rates contains one supported rate in
- // units of 500 kb/s. The first bit of supported rates field is always 1
- // if the rate belongs to the BSSBasicRateSet, if the rate does not belong
- // to the BSSBasicRateSet the first bit is 0.
-
- // For example Supported rates information element with value
- // 0x01,0x02,0x82,0x84
- // would mean that BSSBasicRateSet rates 1Mb/s and 2Mb/s are supported
-
- TBool supported( EFalse );
-
- for ( TInt i( 0 ); i < aSupportedRates.Length(); i++ )
- {
- TUint8 rate = aSupportedRates[i] & KBasicRateMask;
- if( rate == aRate ) supported = ETrue;
- //INFO_PRINTF2( _L("speed rate [%d]"), rate);
- switch( rate )
- {
- case K80211Rate1Mbit:
- INFO_PRINTF1( _L("AP can support Speed Rate 1Mbit") );
- break;
- case K80211Rate2Mbit:
- INFO_PRINTF1( _L("AP can support Speed Rate 2Mbit") );
- break;
- case K80211Rate5Mbit:
- INFO_PRINTF1( _L("AP can support Speed Rate 5Mbit") );
- break;
- case K80211Rate11Mbit:
- INFO_PRINTF1( _L("AP can support Speed Rate 11Mbit") );
- break;
- case K80211Rate12Mbit:
- INFO_PRINTF1( _L("AP can support Speed Rate 12Mbit") );
- break;
- case K80211Rate18Mbit:
- INFO_PRINTF1( _L("AP can support Speed Rate 18Mbit") );
- break;
- case K80211Rate22Mbit:
- INFO_PRINTF1( _L("AP can support Speed Rate 22Mbit") );
- break;
- case K80211Rate24Mbit:
- INFO_PRINTF1( _L("AP can support Speed Rate 24Mbit") );
- break;
- case K80211Rate36Mbit:
- INFO_PRINTF1( _L("AP can support Speed Rate 36Mbit") );
- break;
- case K80211Rate48Mbit:
- INFO_PRINTF1( _L("AP can support Speed Rate 48Mbit") );
- break;
- case K80211Rate54Mbit:
- INFO_PRINTF1( _L("AP can support Speed Rate 54Mbit") );
- break;
-
- default:
- break;
- }
- }
-
- return supported;
- }
-
-/**
- * Shutdown the socket (RSocket::Shutdown).
- * @param aAsyncErrorIndex Command index for async calls to returns errors to
- * @return
- */
-void CT_RSocketData::DoCmdShutdown( const TInt aAsyncErrorIndex)
- {
- INFO_PRINTF1(_L("*START* CT_RSocketData::DoCmdShutdown"));
- INFO_PRINTF1(_L("Starting to shutdown Socket"));
- iSocket->Shutdown( RSocket::ENormal, iActCallShutDownSocket->iStatus);
- iActCallShutDownSocket->Activate(aAsyncErrorIndex);
- IncOutstanding();
- INFO_PRINTF1(_L("*END* CT_RSocketData::DoCmdShutdown"));
- }
-/**
- * Helper function calling from the destroyer.
- * @param
- * @return
- */
-void CT_RSocketData::Shutdown()
- {
- TInt err(KErrNone);
- TRequestStatus status;
- iSocket->Shutdown(RSocket::ENormal, status);
- User::WaitForRequest( status );
- err = status.Int();
- if( err != KErrNone )
- {
- ERR_PRINTF2( _L("CT_RSocketData::Shutdown(): error[%d]"), err);
- SetError(err);
- }
- }
-
-/**
- * Close de socket.
- * @param
- * @return
- */
-void CT_RSocketData::DoCmdClose()
- {
- INFO_PRINTF1(_L("*START* CT_RSocketData::DoCmdClose"));
- Close();
- INFO_PRINTF1(_L("*END* CT_RSocketData::DoCmdClose"));
- }
-/**
- * Helper function to close the socket.
- * @param
- * @return
- */
-void CT_RSocketData::Close()
- {
- iSocket->Close();
- iSocketOpened = EFalse;
- }
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/src/T_RSocketServData.cpp
--- a/wlanapitest/wlanhaitest/wlan/src/T_RSocketServData.cpp Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,431 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-#include "t_rsocketservdata.h"
-#include
-#include
-#include
-#include
-#include
-#include
-/*@{*/
-//LIT's params fron the ini file
-_LIT(KWlanIap, "WLANIAP");
-_LIT(KWlanSsid, "DEFAULT_SSID");
-_LIT(KCommsDbTableView, "commsdbtableview");
-_LIT(KCommsDatabase, "commsdatabase");
-/*@}*/
-
-/*@{*/
-//LIT's commands
-_LIT(KCmdSetOutgoingIap, "SetOutgoingIap");
-_LIT(KCmdConnect, "Connect");
-_LIT(KCmdClose, "Close");
-/*@}*/
-
-
-/**
- * Two phase constructor
- *
- * @leave system wide error
- */
-CT_RSocketServData* CT_RSocketServData::NewL()
- {
- CT_RSocketServData * ret = new (ELeave) CT_RSocketServData();
- CleanupStack::PushL(ret);
- ret->ConstructL();
- CleanupStack::Pop(ret);
- return ret;
- }
-
-/*
- * public destructor
- */
-CT_RSocketServData::~CT_RSocketServData()
- {
- if(iSocketServConnected)
- {
- Close();
- }
- if(iSocketServ)
- {
- delete iSocketServ;
- iSocketServ = NULL;
- }
- }
-
-/**
- * Private constructor. First phase construction
- */
-CT_RSocketServData::CT_RSocketServData()
-: iSocketServ(NULL),
- iSocketServConnected(EFalse),
- iIapID(0)
- {
- }
-
-/**
- * Second phase construction
- *
- * @internalComponent
- *
- * @return N/A
- *
- * @pre None
- * @post None
- *
- * @leave system wide error
- */
-void CT_RSocketServData::ConstructL()
- {
- iSocketServ = new (ELeave)RSocketServ();
- }
-
-
-/**
- * Return a pointer to the object that the data wraps
- *
- * @return pointer to the object that the data wraps
- */
-TAny* CT_RSocketServData::GetObject()
- {
- return iSocketServ;
- }
-
-void CT_RSocketServData::SetIapID(TUint32 aIapID)
- {
- iIapID = aIapID;
- }
-
-/**
- * Process a command read from the Ini file
- * @param aCommand The command to process
- * @param aSection The section get from the *.ini file of the project T_Wlan
- * @param aAsyncErrorIndex Command index dor async calls to returns errors to
- * @return TBool ETrue if the command is process
- * @leave system wide error
- */
-TBool CT_RSocketServData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt /*aAsyncErrorIndex*/)
- {
- TBool ret = ETrue;
-
- if(aCommand == KCmdSetOutgoingIap)
- {
- DoCmdSetOutgoingIap(aSection);
- }
- else if(aCommand == KCmdConnect)
- {
- DoCmdConnect();
- }
- else if(aCommand == KCmdClose)
- {
- DoCmdClose();
- }
- else
- {
- ERR_PRINTF1(_L("Unknown command."));
- ret = EFalse;
- }
- return ret;
- }
-
-
-/**
- * Get IAP, matching the name given (KWlanIap parameter read from the ini file). Set SSID of the
- * IAP to the given value (KWlanSsid parameter read from the ini file).
- * Store the ID of the IAP locally to allow using the IAP for connecting.
- * If there are errors, are management for SetBlockResult() and SetError()
- * @param aSection Section to review in the ini file for this command
- * @return void
- */
-void CT_RSocketServData::DoCmdSetOutgoingIap(const TTEFSectionName& aSection)
- {
- INFO_PRINTF1(_L("*START* CT_RSocketServData::DoCmdSetOutgoingIap"));
- TBool dataOk = ETrue;
-
- TPtrC aIapName;
- if(!GetStringFromConfig(aSection, KWlanIap, aIapName))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KWlanIap);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- TPtrC aSsid;
- if(!GetStringFromConfig(aSection, KWlanSsid, aSsid))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KWlanSsid);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- TPtrC commsdbtableName;
- if(!GetStringFromConfig(aSection, KCommsDbTableView, commsdbtableName))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"),&KCommsDbTableView);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- TPtrC commsdbName;
- if(!GetStringFromConfig(aSection, KCommsDatabase, commsdbName))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"),&KCommsDatabase);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- if (dataOk)
- {
- // reset IAP id
- SetIapID(0);
-
- TBool apFound = EFalse;
- // Open view to IAP table, select all outgoing IAPs.
- CCommsDbTableView* searchView = static_cast(GetDataObjectL(commsdbtableName));
- CCommsDatabase* commsDatabase = static_cast(GetDataObjectL(commsdbName));
-
- // Make sure the view was available.
- if( searchView != NULL && commsDatabase != NULL )
- {
- CleanupStack::PushL(searchView);
- INFO_PRINTF1(_L("Start browsing through the IAPs."));
- TInt error = searchView->GotoFirstRecord();
-
- if( error == KErrNone )
- {
- // Buffer for reading IAP names from CommsDat. Buffer size is set to
- // maximum readable value from CommsDat.
- TBuf iapName;
- TUint32 iapID = 0;
- INFO_PRINTF1(_L("CT_RSocketServData: CommsDat ready for searching, going through all outgoing IAPs"));
- TUint32 iapservice = 0;
-
- TBool failed = EFalse;
-
- // Go through all IAPs.
- while( error == KErrNone )
- {
- iapName.FillZ();
-
- // Read IAP ID and name from IAP table in CommsDat.
- TRAPD(err, searchView->ReadTextL( TPtrC( COMMDB_NAME ), iapName ));
-
- if(err == KErrNone)
- {
- TRAP(err, searchView->ReadUintL( TPtrC( COMMDB_ID ), iapID ));
-
- if(err == KErrNone)
- {
- INFO_PRINTF3(_L("CT_RSocketServData: IAP (ID = [%d]): %S"), iapID, &iapName );
-
- // Try to match the name with user input in the ini file.
- if( iapName.Match( aIapName ) == KErrNone )
- {
- INFO_PRINTF2(_L("CT_RSocketServData: Matching IAP name found with IAP ID = [%d]"), iapID );
-
- apFound = ETrue;
-
- // Return the found IAP ID
- SetIapID(iapID);
-
- // Read IAP service from IAP table in CommsDat.
- TRAPD(err, searchView->ReadUintL( TPtrC( IAP_SERVICE ), iapservice ));
-
- if(err == KErrNone)
- {
- INFO_PRINTF2(_L("Service of the AP: %d"),iapservice);
-
- // Write the ssid given as a parameter in WLANServiceTable in CommsDat
- INFO_PRINTF1(_L("CT_RSocketServData: Get WlanSettings from WLANServiceTable"));
- CWLanSettings* wlanset = new (ELeave) CWLanSettings();
- CleanupStack::PushL( wlanset );
-
- // Connect to CommsDat
- err = wlanset->Connect();
-
- if( err == KErrNone )
- {
- // Get wlan settings corresponding IAP service info from IAP table
- SWLANSettings wlanSettings;
- err = wlanset->GetWlanSettings( iapservice, wlanSettings );
-
- if( err == KErrNone )
- {
- INFO_PRINTF2(_L("CT_RSocketServData: CommsDat: wlanSettings.Name = %S"), &wlanSettings.Name );
- INFO_PRINTF2(_L("CT_RSocketServData: CommsDat: wlanSettings.SSID = %S"), &wlanSettings.SSID );
-
- // Set the new ssid from the ini file
- wlanSettings.SSID = aSsid;
- INFO_PRINTF2(_L("CT_RSocketServData: New value for wlanSettings.SSID = %S"), &wlanSettings.SSID );
-
- // Write the new settings in CommsDat
- err = wlanset->WriteWlanSettings(wlanSettings );
-
- if( err == KErrNone )
- {
- INFO_PRINTF1(_L("CT_RSocketServData: WlanSettings saved in CommsDat"));
- wlanset->Disconnect();
- CleanupStack::PopAndDestroy( wlanset );
- }
- else
- {
- ERR_PRINTF2(_L("CT_RSocketServData: WriteWlanSettings error: [%d]"), err );
- SetError(err);
- failed = ETrue;
- break;
- }
- }
- else
- {
- ERR_PRINTF2(_L("CT_RSocketServData: Get WlanSettings error: [%d]"), err );
- SetError(err);
- failed = ETrue;
- break;
- }
- }
- else
- {
- ERR_PRINTF2(_L("CT_RSocketServData: WLanSettings connect failed! [%d]"), err );
- SetError(err);
- failed = ETrue;
- break;
- }
- }
- else
- {
- ERR_PRINTF2(_L("searchView->ReadUintL left with error %d"), err);
- SetError(err);
- failed = ETrue;
- break;
- }
- }
-
- error = searchView->GotoNextRecord();
- if(error == KErrNotFound)
- {
- INFO_PRINTF2(_L("searchView->GotoNextRecord() not found [%d]"), error);
- INFO_PRINTF1(_L("No more records to look for"));
- }
- else if(error != KErrNone)
- {
- ERR_PRINTF2(_L("searchView->GotoNextRecord() Failed with error = %d"),error);
- SetError(err);
- failed = ETrue;
- break;
- }
- }
- else
- {
- ERR_PRINTF2(_L("searchView->ReadUintL left with error %d"), err);
- SetError(err);
- failed = ETrue;
- break;
- }
- }
- else
- {
- ERR_PRINTF2(_L("searchView->ReadTextL left with error %d"), err);
- SetError(err);
- failed = ETrue;
- break;
- }
- }
-
- CleanupStack::Pop( searchView );
-
- //if( !failed && GetIapID() == 0 )
- // {
- // ERR_PRINTF1(_L("No valid IAP found"));
- // SetBlockResult(EFail);
- // }
- }
- else
- {
- INFO_PRINTF2(_L("CT_RSocketServData: No IAPs found [%d]"), error );
- }
-
- if(apFound == EFalse)
- {
- CApAccessPointItem *wlan = CApAccessPointItem::NewLC();
- wlan->SetNamesL(aIapName);
- wlan->SetBearerTypeL(EApBearerTypeWLAN);
- wlan->WriteTextL(EApWlanNetworkName, aSsid);
- CApDataHandler *handler = CApDataHandler::NewLC(*commsDatabase);
- TUint32 apId = handler->CreateFromDataL(*wlan);
- INFO_PRINTF4(_L("Add new IAP ID: %d, name:%S, SSID: %S"), apId,&aIapName,&aSsid);
- SetIapID(apId);
- CleanupStack::PopAndDestroy(2);
- }
- }
- else
- {
- ERR_PRINTF1(_L("CT_RSocketServData: No IAPs found"));
- ERR_PRINTF1(_L("CommsDat, no view and database were available."));
- SetBlockResult(EFail);
- }
- }
-
- INFO_PRINTF1(_L("*END* CT_RSocketServData::DoCmdSetOutgoingIap"));
- }
-
-/**
- * Command to calls RSocketServ::Connect. The error is management for SetError() helper
- * @param
- * @return
- */
-void CT_RSocketServData::DoCmdConnect()
- {
- INFO_PRINTF1(_L("*START* CT_RSocketServData::DoCmdConnect"));
-
- TInt err = iSocketServ->Connect();
- if(err != KErrNone)
- {
- ERR_PRINTF1(_L("iSocketServ->Connect() Fail"));
- SetError(err);
- }
- else
- {
- iSocketServConnected = ETrue;
- }
-
- INFO_PRINTF1(_L("*END* CT_RSocketServData::DoCmdConnect"));
- }
-/**
- * Command to close RSocketServ instance
- * @param
- * @return
- */
-void CT_RSocketServData::DoCmdClose()
- {
- INFO_PRINTF1(_L("*START* CT_RSocketServData::DoCmdClose"));
- Close();
- INFO_PRINTF1(_L("*END* CT_RSocketServData::DoCmdClose"));
- }
-
-/**
- * Helper for the command DoCmdCloseSocketServ: RSocketServ::Close
- * @param
- * @return
- */
-void CT_RSocketServData::Close()
- {
- iSocketServ->Close();
- iSocketServConnected = EFalse;
- }
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/src/T_WlanDriverServer.cpp
--- a/wlanapitest/wlanhaitest/wlan/src/T_WlanDriverServer.cpp Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-#include "t_wlandriverserver.h"
-#include "t_wlanmgmtclientdata.h"
-#include "t_wlanscaninfodata.h"
-#include "t_rsocketservdata.h"
-#include "t_ccommsdatabasedata.h"
-#include "t_ccommsdbtableviewdata.h"
-#include "t_rconnectiondata.h"
-#include "t_rfiledata.h"
-#include "t_rsocketdata.h"
-
-
-/*@{*/
-_LIT(KT_WlanMgmtClient, "WlanMgmtClient");
-_LIT(KT_WlanScanInfo, "WlanScanInfo");
-_LIT(KT_WlanSocketServ, "RSocketServ");
-_LIT(KT_CCommsDB, "CCommsDatabase");
-_LIT(KT_CCommsDBTable, "CCommsDbTableView");
-_LIT(KT_RConnection, "RConnection");
-_LIT(KT_RSocket, "RSocket");
-_LIT(KT_RFile, "RFile");
-/*@}*/
-
-
-/**
- *
- * Same code for Secure and non-secure variants
- * Called inside the MainL() function to create and start the
- * CTestServer derived server.
- * @return - Instance of the test server
- */
-CT_WlanDriverServer* CT_WlanDriverServer::NewL()
- {
- CT_WlanDriverServer* server = new (ELeave) CT_WlanDriverServer();
- CleanupStack::PushL(server);
- server->ConstructL();
- CleanupStack::Pop(server);
- return server;
- }
-
-/**
- * Secure variant
- * Much simpler, uses the new Rendezvous() call to sync with the client
- */
-LOCAL_C void MainL()
- {
-#if (defined __DATA_CAGING__)
- RProcess().DataCaging(RProcess::EDataCagingOn);
- RProcess().SecureApi(RProcess::ESecureApiOn);
-#endif
- CActiveScheduler* sched = NULL;
- sched = new(ELeave) CActiveScheduler;
- CActiveScheduler::Install(sched);
- CT_WlanDriverServer* server = NULL;
-
- // Create the CTestServer derived server
- TRAPD(err, server = CT_WlanDriverServer::NewL());
- if(!err)
- {
- // Sync with the client and enter the active scheduler
- RProcess::Rendezvous(KErrNone);
- sched->Start();
- }
-
- delete server;
- delete sched;
- }
-
-/**
- *
- * Secure variant only
- * Process entry point. Called by client using RProcess API
- * @return - Standard Epoc error code on process exit
- */
-GLDEF_C TInt E32Main()
- {
- __UHEAP_MARK;
- CTrapCleanup* cleanup = CTrapCleanup::New();
- if(cleanup == NULL)
- {
- return KErrNoMemory;
- }
-
-#if (defined TRAP_IGNORE)
- TRAP_IGNORE(MainL());
-#else
- TRAPD(err,MainL());
-#endif
-
- delete cleanup;
- __UHEAP_MARKEND;
- return KErrNone;
- }
-/*
- * Creates an instance of CDataWrapper that wraps a CT_WlanDriverData object
- * @return wrapper - a CDataWrapper instance that wraps the CT_WlanDriverData object
- */
-CDataWrapper* CT_WlanDriverServer::CT_WlanDriverBlock::CreateDataL(const TDesC& aData)
- {
- CDataWrapper* wrapper = NULL;
-
- if( KT_WlanMgmtClient() == aData )
- {
- wrapper = CT_WlanMgmtClientData::NewL();
- }
- else if(KT_WlanScanInfo() == aData)
- {
- wrapper = CT_WlanScanInfoData::NewL();
- }
- else if(KT_WlanSocketServ() == aData)
- {
- wrapper = CT_RSocketServData::NewL();
- }
- else if(KT_CCommsDB() == aData)
- {
- wrapper = CT_CCommsDatabaseData::NewL();
- }
- else if(KT_CCommsDBTable() == aData)
- {
- wrapper = CT_CCommsDbTableViewData::NewL();
- }
- else if(KT_RConnection() == aData)
- {
- wrapper = CT_RConnectionData::NewL();
- }
- else if(KT_RSocket() == aData)
- {
- wrapper = CT_RSocketData::NewL();
- }
- else if(KT_RFile() == aData)
- {
- wrapper = CT_RFileData::NewL();
- }
- return wrapper;
- }
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/src/T_WlanMgmtClientData.cpp
--- a/wlanapitest/wlanhaitest/wlan/src/T_WlanMgmtClientData.cpp Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,218 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-
-#include "t_wlanmgmtclientdata.h"
-#include
-#include
-
-/*@{*/
-//LIT's for Constant
-_LIT(KScanInfo, "scaninfo");
-/*@}*/
-
-/*@{*/
-//LIT's for WlanMgmtClientData
-_LIT(KCmdInstantiateMgmtClient, "NewL");
-_LIT(KCmdGetScanResults, "GetScanResults");
-_LIT(KCmdDestructor, "~");
-/*@}*/
-
-
-/**
- * Two phase constructor
- *
- * @leave system wide error
- */
-CT_WlanMgmtClientData* CT_WlanMgmtClientData::NewL()
- {
- CT_WlanMgmtClientData* ret = new (ELeave) CT_WlanMgmtClientData();
- CleanupStack::PushL(ret);
- ret->ConstructL();
- CleanupStack::Pop(ret);
- return ret;
- }
-
-/**
- * Public destructor
- */
-CT_WlanMgmtClientData::~CT_WlanMgmtClientData()
- {
- DestroyData();
- }
-
-/**
- * Private constructor. First phase construction
- */
-CT_WlanMgmtClientData::CT_WlanMgmtClientData()
-: iData(NULL)
- {
- }
-
-/**
- * Second phase construction
- *
- * @internalComponent
- *
- * @return N/A
- *
- * @pre None
- * @post None
- *
- * @leave system wide error
- */
-void CT_WlanMgmtClientData::ConstructL()
- {
- }
-
-/**
- * Return a pointer to the object that the data wraps
- *
- * @return pointer to the object that the data wraps
- */
-TAny* CT_WlanMgmtClientData::GetObject()
- {
- return iData;
- }
-
-
-/**
-* Process a command read from the Ini file
-* @param aCommand The command to process
-* @param aSection The section get from the *.ini file of the project T_Wlan
-* @param aAsyncErrorIndex Command index dor async calls to returns errors to
-* @return TBool ETrue if the command is process
-* @leave system wide error
-*/
-TBool CT_WlanMgmtClientData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt /*aAsyncErrorIndex*/)
- {
- TBool ret = ETrue;
- if(aCommand == KCmdInstantiateMgmtClient)
- {
- DoCmdNewL();
- }
- else if(aCommand == KCmdGetScanResults)
- {
- DoCmdGetScanResults(aSection);
- }
- else if(aCommand == KCmdDestructor)
- {
- DoCmdDestructor();
- }
- else
- {
- ERR_PRINTF1(_L("Unknown command."));
- ret = EFalse;
- }
- return ret;
- }
-
-
-/**
- * Creates an Instance of CWlanMgmtClient
- * @param
- * @return
- */
-void CT_WlanMgmtClientData::DoCmdNewL()
- {
- INFO_PRINTF1(_L("*START* CT_WlanMgmtClientData::DoCmdNewL"));
-
- DestroyData();
-
- TRAPD(err,iData = CWlanMgmtClient::NewL());
- if(err != KErrNone)
- {
- ERR_PRINTF2(_L("CWlanMgmtClient was not constructed, err=%d" ),err);
- SetError(err);
- }
-
- INFO_PRINTF1(_L("*END* CT_WlanMgmtClientData::DoCmdNewL"));
- }
-
-
-/**
- * Test getting Wlan scan info from Wlan management interface. Call
- * DoCmdNewL for instantiate the CWlanMgmtClient and DoCmdNewL of CWlanScanInfo first.
- * @param aSection Section to read from the ini file
- * @return
- */
-void CT_WlanMgmtClientData::DoCmdGetScanResults(const TTEFSectionName& aSection)
- {
- INFO_PRINTF1(_L("*START* CT_WlanMgmtClientData::DoCmdGetScanResults"));
- TBool dataOk = ETrue;
-
- TPtrC scanInfoName;
- if(!GetStringFromConfig(aSection, KScanInfo, scanInfoName))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KScanInfo);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- if (dataOk)
- {
- CWlanScanInfo* iScanInfo = static_cast(GetDataObjectL(scanInfoName));
- if ( iScanInfo != NULL )
- {
- TInt err = iData->GetScanResults( *iScanInfo ) ;
- if(err == KErrNone)
- {
- INFO_PRINTF2(_L("iScanInfo size [%d]"),iScanInfo->Size());
- }
- else
- {
- ERR_PRINTF2(_L("iData->GetScanResults( *iScanInfo ) Failed with error %d"), err);
- SetError(err);
- }
- }
- else
- {
- ERR_PRINTF1(_L("iScanInfo is NULL"));
- SetBlockResult(EFail);
- }
- }
-
- INFO_PRINTF1(_L("*END* CT_WlanMgmtClientData::DoCmdGetScanResults"));
- }
-
-/**
- * Destructor for CWlanMgmtClient
- * @param
- * @return
- */
-void CT_WlanMgmtClientData::DoCmdDestructor()
- {
- INFO_PRINTF1(_L("*START* CT_WlanMgmtClientData::DoCmdDestructor"));
- DestroyData();
- INFO_PRINTF1(_L("*END* CT_WlanMgmtClientData::DoCmdDestructor"));
- }
-
-/**
- * Destroy the object of CWlanMgmtClient, call made from DoCmdDestructor()
- * @param
- * @return
- */
-void CT_WlanMgmtClientData::DestroyData()
- {
- if(iData)
- {
- delete iData;
- iData = NULL;
- }
- }
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/src/T_WlanScanInfoData.cpp
--- a/wlanapitest/wlanhaitest/wlan/src/T_WlanScanInfoData.cpp Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,266 +0,0 @@
-/*
-* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-#include "t_wlanscaninfodata.h"
-//class CWlanScanInfo
-#include
-#include
-
-/*@{*/
-//LITs from the ini
-_LIT(KSsidParam, "DEFAULT_SSID_Ssid");
-_LIT(KUid, "WlanScanUid");
-/*@}*/
-
-/*@{*/
-//LIT's for the commands
-_LIT(KCmdNewL, "NewL");
-_LIT(KCmdDestructor, "~");
-_LIT(KCmdInformationElement, "InformationElement");
-/*@}*/
-
-/**
- * Two phase constructor
- *
- * @leave system wide error
- */
-CT_WlanScanInfoData* CT_WlanScanInfoData::NewL()
- {
- CT_WlanScanInfoData* ret = new(ELeave) CT_WlanScanInfoData();
- CleanupStack::PushL(ret);
- ret->ConstructL();
- CleanupStack::Pop(ret);
- return ret;
- }
-
-/**
- * Public destructor
- */
-CT_WlanScanInfoData::~CT_WlanScanInfoData()
- {
- DestroyData();
- }
-
-/**
- * Private constructor. First phase construction
- */
-CT_WlanScanInfoData::CT_WlanScanInfoData()
-: iData(NULL),
- iScanInfoInstanceIdentifier(KNullUid)
- {
- }
-
-
-/**
- * Second phase construction
- *
- * @internalComponent
- *
- * @return N/A
- *
- * @pre None
- * @post None
- *
- * @leave system wide error
- */
-void CT_WlanScanInfoData::ConstructL()
- {
- }
-
-/**
- * Return a pointer to the object that the data wraps
- *
- * @return pointer to the object that the data wraps
- */
-TAny* CT_WlanScanInfoData::GetObject()
- {
- return iData;
- }
-
-
-/**
- * Process a command read from the Ini file
- * @param aCommand The command to process
- * @param aSection The section get from the *.ini file of the project T_Wlan
- * @param aAsyncErrorIndex Command index dor async calls to returns errors to
- * @return TBool ETrue if the command is process
- * @leave system wide error
- */
-TBool CT_WlanScanInfoData::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt /*aAsyncErrorIndex*/)
- {
- TBool ret = ETrue;
-
- if(aCommand == KCmdNewL)
- {
- DoCmdNewL(aSection);
- }
- else if(aCommand == KCmdDestructor)
- {
- DoCmdDestructor();
- }
- else if(aCommand == KCmdInformationElement)
- {
- DoCmdInformationElement(aSection);
- }
- else
- {
- ret = EFalse;
- ERR_PRINTF1(_L("Unknown command"));
- }
-
- return ret;
- }
-
-
-/**
- * Create an instance of CWlanScanInfo
- * @param
- * @return
- */
-void CT_WlanScanInfoData::DoCmdNewL(const TTEFSectionName& aSection)
- {
- INFO_PRINTF1(_L("*START* CT_WlanScanInfoData::DoCmdNewL"));
- DestroyData();
-
- TBool dataOk = ETrue;
-
- TInt wsUid;
- if(!GetHexFromConfig(aSection, KUid, wsUid ))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KUid);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- if (dataOk)
- {
- const TUid WsUid = {wsUid};
- TAny* interface = NULL;
-
- TRAPD(err, interface = REComSession::CreateImplementationL( WsUid, iScanInfoInstanceIdentifier ));
- if(err == KErrNone)
- {
- iData = reinterpret_cast( interface );
-
- if(iData == NULL)
- {
- ERR_PRINTF1(_L("CT_WlanScanInfoData::DoCmdNewL() Fail"));
- SetBlockResult(EFail);
- }
- }
- else
- {
- ERR_PRINTF2(_L("Create Implementation left with error %d"), err);
- SetError(err);
- }
- }
-
- INFO_PRINTF1(_L("*END* CT_WlanScanInfoData::DoCmdNewL"));
- }
-
-/**
- * Destructor for CWlanScanInfo
- * @param
- * @return
- */
-void CT_WlanScanInfoData::DoCmdDestructor()
- {
- INFO_PRINTF1(_L("*START* CT_WlanScanInfoData::DoCmdDestructor"));
- DestroyData();
- INFO_PRINTF1(_L("*END* CT_WlanScanInfoData::DoCmdDestructor"));
- }
-
-/**
- * called from DoCmdDestructor for destroy the object CWlanScanInfo
- * @param
- * @return
- */
-void CT_WlanScanInfoData::DestroyData()
- {
- // Cannot use "delete" directly because we use a member variable as an
- // ECom instance identifier
- REComSession::DestroyedImplementation( iScanInfoInstanceIdentifier );
- iData = NULL;
- }
-/**
- * Review if the IAP given in the ini file match with some Wireless Local Area Network (SelectScanInfo).
- * @param aSection Section in the ini file for this command
- * @return
- */
-void CT_WlanScanInfoData::DoCmdInformationElement(const TTEFSectionName& aSection)
- {
- INFO_PRINTF1(_L("*START* CT_WlanScanInfoData::DoCmdInformationElement"));
- TBool dataOk = ETrue;
-
- TPtrC aSsid;
- if(!GetStringFromConfig(aSection,KSsidParam, aSsid))
- {
- ERR_PRINTF2(_L("Error in getting parameter %S from INI file"), &KSsidParam);
- SetBlockResult(EFail);
- dataOk = EFalse;
- }
-
- if(dataOk)
- {
- TInt err(KErrNone);
- // Scan info gives data as "information elements"
- TUint8 ieLen(0);
- const TUint8* ieData;
- TWlanSsid ssid8;
- TBuf ssid;
- TBool match = EFalse;
-
- INFO_PRINTF2(_L("SSID to be checked: %S"),&aSsid);
- for( iData->First(); !iData->IsDone(); iData->Next() )
- {
- INFO_PRINTF1(_L("found scan info"));
- err = KErrNotReady;
- // Information Element ID for SSID as specified in 802.11.
- const TUint8 KWlan802Dot11SsidIE(0);
- err = iData->InformationElement( KWlan802Dot11SsidIE, ieLen, &ieData );
- if(err != KErrNone)
- {
- ERR_PRINTF2(_L("CScanInfo::InformationElement err: [%d]"),err);
- SetError(err);
- break;
- }
- if(ieLen)
- {
- ssid8.Copy( ieData, ieLen );
- ssid.Copy( ssid8 );
- INFO_PRINTF2(_L("Current information element SSID: %S"),&ssid);
- // check if this is an expected SSID
- if( aSsid.Compare( ssid ) == 0 )
- {
- INFO_PRINTF1(_L("SSID match!"));
- match = ETrue;
- break;
- }
- }
- }
-
- if (err == KErrNone && !match)
- {
- ERR_PRINTF2(_L("Given SSID %S NOT FOUND!"),&aSsid);
- SetBlockResult(EFail);
- }
- }
-
- INFO_PRINTF1(_L("*END* CT_WlanScanInfoData::DoCmdInformationElement"));
- }
-
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/testdata/devlon52/t_wlan.ini
--- a/wlanapitest/wlanhaitest/wlan/testdata/devlon52/t_wlan.ini Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-[UID]
-Uid = 0x101f8f01;
-
-[driveC]
-mmc=c:
-
-[driveE]
-mmc=e:
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/testdata/devlon52/t_wlan.tcs
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/testdata/networking-wlan-validation-automated-connection.ini
--- a/wlanapitest/wlanhaitest/wlan/testdata/networking-wlan-validation-automated-connection.ini Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +0,0 @@
-[wmgmtcnt]
-name = wmgmtcnt
-
-[wlansinf]
-name = wlansinf
-
-[comsdb]
-name = comsdb
-
-[comsdbtblview]
-name = comsdbtblview
-
-[scktserv]
-name = scktserv
-
-[rcntion]
-name = rcntion
-
-[rsckt]
-name = rsckt
-
-[rfile]
-name = rfile
-
-[include]
-file1 = \nt\wlan\t_wlan.ini
-file2 = \nt\wlan\t_wlan_environment.ini
-
-
-[NETWORKING-Wlan-Connection-0001-0001-NewL_command02]
-WlanScanUid = {UID, Uid}
-
-[NETWORKING-Wlan-Connection-0001-0001-GetScanResults_command03]
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0001-0001-InformationElement_command04]
-DEFAULT_SSID_Ssid = {IAP,Iap}
-
-
-
-[NETWORKING-Wlan-Connection-0002-0001-NewL_command02]
-commsdb = comsdb
-
-[NETWORKING-Wlan-Connection-0002-0001-SetOutgoingIap_command03]
-WLANIAP = {IAP,Iap}
-DEFAULT_SSID = {IAP,Ssid}
-commsdbtableview = comsdbtblview
-commsdatabase = comsdb
-
-[NETWORKING-Wlan-Connection-0002-0001-Open_command07]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Connection-0002-0001-Start_command08]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Connection-0002-0001-Open_command09]
-socketserv = scktserv
-connection = rcntion
-
-[NETWORKING-Wlan-Connection-0002-0001-Connect_command10]
-Ip = {DownloadServer,Ip}
-Port = {DownloadServer,Port}
-
-
-
-[NETWORKING-Wlan-Connection-0003-0001-NewL_command02]
-WlanScanUid = {UID, Uid}
-
-[NETWORKING-Wlan-Connection-0003-0001-NewL_command04]
-commsdb = comsdb
-
-[NETWORKING-Wlan-Connection-0003-0001-GetScanResults_command05]
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0003-0001-InformationElement_command06]
-DEFAULT_SSID_Ssid = {IAP80211b,Iap}
-
-[NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command07]
-rate = 2
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command08]
-rate = 4
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command09]
-rate = 11
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command10]
-rate = 22
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0003-0001-CheckSupportedRates_command11]
-rate = 108
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0003-0001-SetOutgoingIap_command12]
-WLANIAP = {IAP,Iap}
-DEFAULT_SSID = {IAP80211b,Iap}
-commsdbtableview = comsdbtblview
-commsdatabase = comsdb
-
-[NETWORKING-Wlan-Connection-0003-0001-Open_command16]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Connection-0003-0001-Start_command17]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Connection-0003-0001-Open_command18]
-socketserv = scktserv
-connection = rcntion
-
-[NETWORKING-Wlan-Connection-0003-0001-Connect_command19]
-Ip = {DownloadServer,Ip}
-Port = {DownloadServer,Port}
-
-
-
-[NETWORKING-Wlan-Connection-0004-0001-NewL_command02]
-WlanScanUid = {UID, Uid}
-
-[NETWORKING-Wlan-Connection-0004-0001-NewL_command04]
-commsdb = comsdb
-
-[NETWORKING-Wlan-Connection-0004-0001-GetScanResults_command05]
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0004-0001-InformationElement_command06]
-DEFAULT_SSID_Ssid = {IAP80211g,Iap}
-
-[NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command07]
-rate = 2
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command08]
-rate = 4
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command09]
-rate = 11
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command10]
-rate = 22
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0004-0001-CheckSupportedRates_command11]
-rate = 108
-scaninfo = wlansinf
-
-[NETWORKING-Wlan-Connection-0004-0001-SetOutgoingIap_command12]
-WLANIAP = {IAP,Iap}
-DEFAULT_SSID = {IAP80211g,Iap}
-commsdbtableview = comsdbtblview
-commsdatabase = comsdb
-
-[NETWORKING-Wlan-Connection-0004-0001-Open_command16]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Connection-0004-0001-Start_command17]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Connection-0004-0001-Open_command18]
-socketserv = scktserv
-connection = rcntion
-
-[NETWORKING-Wlan-Connection-0004-0001-Connect_command19]
-Ip = {DownloadServer,Ip}
-Port ={DownloadServer,Port}
-
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/testdata/networking-wlan-validation-automated-instantiate.ini
--- a/wlanapitest/wlanhaitest/wlan/testdata/networking-wlan-validation-automated-instantiate.ini Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-[wmgmtcnt]
-name = wmgmtcnt
-
-[wlansinf]
-name = wlansinf
-
-[comsdb]
-name = comsdb
-
-[comsdbtblview]
-name = comsdbtblview
-
-[scktserv]
-name = scktserv
-
-[rcntion]
-name = rcntion
-
-[rsckt]
-name = rsckt
-
-[rfile]
-name = rfile
-
-[include]
-file1 = \nt\wlan\t_wlan.ini
-file2 = \nt\wlan\t_wlan_environment.ini
-
-
-[NETWORKING-Wlan-Instantiate-0001-0001-NewL_command01]
-WlanScanUid = {UID, Uid}
-
-
-
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/testdata/networking-wlan-validation-automated-transfer.ini
--- a/wlanapitest/wlanhaitest/wlan/testdata/networking-wlan-validation-automated-transfer.ini Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-[wmgmtcnt]
-name = wmgmtcnt
-
-[wlansinf]
-name = wlansinf
-
-[comsdb]
-name = comsdb
-
-[comsdbtblview]
-name = comsdbtblview
-
-[scktserv]
-name = scktserv
-
-[rcntion]
-name = rcntion
-
-[rsckt]
-name = rsckt
-
-[rfile]
-name = rfile
-
-[include]
-file1 = \nt\wlan\t_wlan.ini
-file2 = \nt\wlan\t_wlan_environment.ini
-
-
-[NETWORKING-Wlan-Transfer-0001-0001-NewL_command02]
-commsdb = comsdb
-
-[NETWORKING-Wlan-Transfer-0001-0001-SetOutgoingIap_command03]
-WLANIAP = {IAP,Iap}
-DEFAULT_SSID = {IAP,Ssid}
-commsdbtableview = comsdbtblview
-commsdatabase = comsdb
-
-[NETWORKING-Wlan-Transfer-0001-0001-Open_command07]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Transfer-0001-0001-Start_command08]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Transfer-0001-0001-Open_command09]
-socketserv = scktserv
-connection = rcntion
-
-[NETWORKING-Wlan-Transfer-0001-0001-Connect_command10]
-Ip = {DownloadServer,Ip}
-Port = {DownloadServer,Port}
-
-[NETWORKING-Wlan-Transfer-0001-0001-DownloadSendHTTPGet_command11]
-Host = {DownloadServer,Ip}
-File = /nokia/0100k.bin
-
-[NETWORKING-Wlan-Transfer-0001-0001-RecvOneOrMore_command12]
-Save = {driveC,mmc}\0100k.bin
-
-
-
-[NETWORKING-Wlan-Transfer-0002-0001-NewL_command02]
-commsdb = comsdb
-
-[NETWORKING-Wlan-Transfer-0002-0001-SetOutgoingIap_command03]
-WLANIAP = {IAP,Iap}
-DEFAULT_SSID = {IAP,Ssid}
-commsdbtableview = comsdbtblview
-commsdatabase = comsdb
-
-[NETWORKING-Wlan-Transfer-0002-0001-Open_command07]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Transfer-0002-0001-Start_command08]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Transfer-0002-0001-Open_command09]
-socketserv = scktserv
-connection = rcntion
-
-[NETWORKING-Wlan-Transfer-0002-0001-Connect_command10]
-Ip = {DownloadServer,Ip}
-Port ={DownloadServer,Port}
-
-[NETWORKING-Wlan-Transfer-0002-0001-DownloadSendHTTPGet_command11]
-Host = {DownloadServer,Ip}
-File = /nokia/0010k.bin
-
-[NETWORKING-Wlan-Transfer-0002-0001-RecvOneOrMore_command12]
-Save = {driveE,mmc}\0010k.bin
-
-
-
-[NETWORKING-Wlan-Transfer-0003-0001-NewL_command02]
-commsdb = comsdb
-
-[NETWORKING-Wlan-Transfer-0003-0001-SetOutgoingIap_command03]
-WLANIAP = {IAP,Iap}
-DEFAULT_SSID = {IAP,Ssid}
-commsdbtableview = comsdbtblview
-commsdatabase = comsdb
-
-[NETWORKING-Wlan-Transfer-0003-0001-Open_command07]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Transfer-0003-0001-Start_command08]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Transfer-0003-0001-Open_command09]
-socketserv = scktserv
-connection = rcntion
-
-[NETWORKING-Wlan-Transfer-0003-0001-Connect_command10]
-Ip = {DownloadServer,Ip}
-Port = {DownloadServer,Port}
-
-[NETWORKING-Wlan-Transfer-0003-0001-DownloadSendHTTPGet_command11]
-Host = {DownloadServer,Ip}
-File = /nokia/10MB.bin
-
-[NETWORKING-Wlan-Transfer-0003-0001-RecvOneOrMore_command12]
-Save = {driveC,mmc}\10MB.bin
-
-
-
-[NETWORKING-Wlan-Transfer-0004-0001-NewL_command02]
-commsdb = comsdb
-
-[NETWORKING-Wlan-Transfer-0004-0001-GenerateFile_command03]
-File = {driveC,mmc}\10mb2.bin
-Size = 10485760
-
-[NETWORKING-Wlan-Transfer-0004-0001-SetOutgoingIap_command04]
-WLANIAP = {IAP,Iap}
-DEFAULT_SSID = {IAP,Ssid}
-commsdbtableview = comsdbtblview
-commsdatabase = comsdb
-
-[NETWORKING-Wlan-Transfer-0004-0001-Open_command08]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Transfer-0004-0001-Start_command09]
-socketserv = scktserv
-
-[NETWORKING-Wlan-Transfer-0004-0001-Open_command10]
-socketserv = scktserv
-connection = rcntion
-
-[NETWORKING-Wlan-Transfer-0004-0001-Connect_command11]
-Ip = {UploadServer,Ip}
-Port = {UploadServer,Port}
-
-[NETWORKING-Wlan-Transfer-0004-0001-UploadSendHTTPPost_command12]
-File = {driveC,mmc}\10mb2.bin
-FileServer = 10mb2.bin
-clientID = SALT
-serverScript = /dy/upload/upfile.php
-
-[NETWORKING-Wlan-Transfer-0004-0001-RecvOneOrMore_command13]
-Save = KNullDesC
-
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/testdata/t_wlan_environment.ini
--- a/wlanapitest/wlanhaitest/wlan/testdata/t_wlan_environment.ini Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-[DownloadServer]
-Ip = 200.78.210.108
-Port = 80
-Host = 200.78.210.108
-
-[UploadServer]
-Ip = 217.30.188.169
-Port = 80
-
-[IAP]
-Iap = nokia
-Ssid = nokia
-
-[IAP80211g]
-Iap = nokia
-
-[IAP80211b]
-Iap = nokia
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/testdata/tube/t_wlan.ini
--- a/wlanapitest/wlanhaitest/wlan/testdata/tube/t_wlan.ini Fri Jun 04 12:12:29 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-[UID]
-Uid = 0x101f8f01;
-
-[driveC]
-mmc=c:
-
-[driveE]
-mmc=e:
diff -r a0fdcd0e4c56 -r 7d966ab5304a wlanapitest/wlanhaitest/wlan/testdata/tube/t_wlan.tcs