--- a/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/inc/BtSerialClient.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/inc/BtSerialClient.h Fri Apr 16 16:37:27 2010 +0300
@@ -24,8 +24,8 @@
#include <es_sock.h>
#include <bluetooth/btpowercontrol.h>
#include <bt_sock.h>
-#include <BTextNotifiers.h>
-#include <BtSdp.h>
+#include <btextnotifiers.h>
+#include <btsdp.h>
#include "SocketObserver.h"
--- a/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/inc/btservicesearcher.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/inc/btservicesearcher.h Fri Apr 16 16:37:27 2010 +0300
@@ -24,11 +24,11 @@
#include <bttypes.h>
#include <btextnotifiers.h>
-#include "SdpAttributeParser.h"
-#include "SdpAttributeNotifier.h"
+#include "sdpattributeparser.h"
+#include "sdpattributenotifier.h"
// CONSTANTS
-#include "MessageProtocolConstants.h"
+#include "messageprotocolconstants.h"
// CLASS DECLARATIONS
/**
--- a/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/inc/messageservicesearcher.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/inc/messageservicesearcher.h Fri Apr 16 16:37:27 2010 +0300
@@ -21,7 +21,7 @@
// INCLUDES
#include <e32base.h>
-#include "BTServiceSearcher.h"
+#include "btservicesearcher.h"
// CLASS DECLARATIONS
/**
--- a/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/inc/sdpattributeparser.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/inc/sdpattributeparser.h Fri Apr 16 16:37:27 2010 +0300
@@ -21,7 +21,7 @@
// INCLUDES
#include <btsdp.h>
-#include "StaticArrayC.h"
+#include "staticarrayc.h"
// FORWARD DECLARATIONS
class MSdpAttributeNotifier;
--- a/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/inc/socketswriter.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/inc/socketswriter.h Fri Apr 16 16:37:27 2010 +0300
@@ -21,7 +21,7 @@
// INCLUDES
#include <in_sock.h>
-#include "TimeOutNotifier.h"
+#include "timeoutnotifier.h"
// FORWARD DECLARATIONS
class CTimeOutTimer;
--- a/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/inc/staticarrayc.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/inc/staticarrayc.h Fri Apr 16 16:37:27 2010 +0300
@@ -68,7 +68,7 @@
};
// INCLUDES
-#include "StaticArrayC.inl"
+#include "staticarrayc.inl"
/**
* CONSTRUCT_STATIC_ARRAY_C
--- a/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/src/BtSerialClient.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/src/BtSerialClient.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -20,7 +20,7 @@
#include <e32std.h>
#include <c32comm.h>
#include "BtSerialClient.h"
-#include "MessageServiceSearcher.h"
+#include "messageservicesearcher.h"
#include "BtSerialEngine.pan"
#include "HtiBtEngineLogging.h"
#include "socketswriter.h"
--- a/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/src/btservicesearcher.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/src/btservicesearcher.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -17,8 +17,8 @@
// INCLUDE FILES
-#include "BTServiceSearcher.h"
-#include "BTServiceSearcher.pan"
+#include "btservicesearcher.h"
+#include "btservicesearcher.pan"
#include "HtiBtEngineLogging.h"
--- a/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/src/messageservicesearcher.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/src/messageservicesearcher.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -19,8 +19,8 @@
// INCLUDE FILES
#include <bt_sock.h>
-#include "MessageServiceSearcher.h"
-#include "BTServiceSearcher.pan"
+#include "messageservicesearcher.h"
+#include "btservicesearcher.pan"
// ============================ MEMBER FUNCTIONS ===============================
--- a/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/src/sdpattributeparser.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/src/sdpattributeparser.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -19,9 +19,9 @@
// INCLUDE FILES
#include <bt_sock.h>
-#include "SdpAttributeParser.h"
-#include "SdpAttributeParser.pan"
-#include "SdpAttributeNotifier.h"
+#include "sdpattributeparser.h"
+#include "sdpattributeparser.pan"
+#include "sdpattributenotifier.h"
// ============================ MEMBER FUNCTIONS ==============================
--- a/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/src/socketsreader.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/src/socketsreader.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -18,7 +18,7 @@
// INCLUDE FILES
#include "BtSerialEngine.pan"
-#include "SocketsReader.h"
+#include "socketsreader.h"
#include "SocketObserver.h"
// -----------------------------------------------------------------------------
--- a/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/src/socketswriter.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/src/socketswriter.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -17,8 +17,8 @@
// INCLUDE FILES
-#include "SocketsWriter.h"
-#include "TimeOutTimer.h"
+#include "socketswriter.h"
+#include "timeouttimer.h"
#include "BtSerialEngine.pan"
#include "SocketObserver.h"
#include "HtiBtEngineLogging.h"
--- a/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/src/timeouttimer.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiBtCommPlugin/BtEngine/src/timeouttimer.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -17,8 +17,8 @@
// INCLUDE FILES
-#include "TimeOutTimer.h"
-#include "TimeOutNotifier.h"
+#include "timeouttimer.h"
+#include "timeoutnotifier.h"
#include "HtiBtEngineLogging.h"
// -----------------------------------------------------------------------------
--- a/hti/HtiCommPlugins/HtiBtCommPlugin/HtiBtCommEcomPlugin/inc/HtiBtCommEcomPlugin.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiBtCommPlugin/HtiBtCommEcomPlugin/inc/HtiBtCommEcomPlugin.h Fri Apr 16 16:37:27 2010 +0300
@@ -23,7 +23,7 @@
// INCLUDES
#include <c32comm.h>
-#include <HTICommPluginInterface.h> // defined in HtiFramework project
+#include <HtiCommPluginInterface.h> // defined in HtiFramework project
#include "HtiBtCommInterface.h" // RHtiBtCommInterface
--- a/hti/HtiCommPlugins/HtiBtCommPlugin/HtiBtCommEcomPlugin/src/HtiBtCommEcomPlugin.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiBtCommPlugin/HtiBtCommEcomPlugin/src/HtiBtCommEcomPlugin.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -22,8 +22,8 @@
#include "HtiBtCommEcomPlugin.h"
#include "BtSerialClient.h"
-#include <hticfg.h>
-#include <htilogging.h>
+#include <HtiCfg.h>
+#include <HtiLogging.h>
// CONSTANTS
_LIT( KHtiCfgPath, "\\" ); // root of drive
--- a/hti/HtiCommPlugins/HtiBtCommPlugin/HtiBtCommServer/src/HtiBtCommInterface.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiBtCommPlugin/HtiBtCommServer/src/HtiBtCommInterface.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -25,7 +25,7 @@
#include "HtiBtCommInterface.h"
#include <e32uid.h>
-#include <HTILogging.h>
+#include <HtiLogging.h>
// CONSTANTS
const TUint KBtCommServerDefaultMessageSlots = 4; // Read, write, readCancel, writeCancel
--- a/hti/HtiCommPlugins/HtiBtCommPlugin/HtiBtCommServer/src/HtiBtCommServerSession.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiBtCommPlugin/HtiBtCommServer/src/HtiBtCommServerSession.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -29,7 +29,7 @@
#include <e32std.h>
#include <e32svr.h>
-#include <HTICommPluginInterface.h> // KErrComModuleReset;
+#include <HtiCommPluginInterface.h> // KErrComModuleReset;
// CONSTANTS
_LIT(KBtComSessPanic, "BtComSessAssrt");
--- a/hti/HtiCommPlugins/HtiIPCommPlugin/inc/HtiConnectionManager.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiIPCommPlugin/inc/HtiConnectionManager.h Fri Apr 16 16:37:27 2010 +0300
@@ -21,10 +21,10 @@
// INCLUDES
-#include <HTICommPluginInterface.h> // defined in HtiFramework project
+#include <HtiCommPluginInterface.h> // defined in HtiFramework project
#include <es_sock.h>
#include <in_sock.h>
-#include <CommDbConnPref.h>
+#include <commdbconnpref.h>
#include "HtiIPCommServerCommon.h"
#include "HtiSocketMonitor.h"
--- a/hti/HtiCommPlugins/HtiIPCommPlugin/inc/HtiIPCommEcomPlugin.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiIPCommPlugin/inc/HtiIPCommEcomPlugin.h Fri Apr 16 16:37:27 2010 +0300
@@ -21,7 +21,7 @@
// INCLUDES
-#include <HTICommPluginInterface.h> // defined in HtiFramework project
+#include <HtiCommPluginInterface.h> // defined in HtiFramework project
#include "HtiIPCommServerClient.h"
// FORWARD DECLARATIONS
--- a/hti/HtiCommPlugins/HtiIPCommPlugin/inc/HtiSocketMonitor.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiIPCommPlugin/inc/HtiSocketMonitor.h Fri Apr 16 16:37:27 2010 +0300
@@ -21,7 +21,7 @@
// INCLUDES
-#include <HTICommPluginInterface.h> // defined in HtiFramework project
+#include <HtiCommPluginInterface.h> // defined in HtiFramework project
// FORWARD DECLARATIONS
--- a/hti/HtiCommPlugins/HtiIPCommPlugin/src/HtiConnectionManager.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiIPCommPlugin/src/HtiConnectionManager.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -20,10 +20,10 @@
#include "HtiIPCommEcomPlugin.h"
#include "HtiConnectionManager.h"
#include "HtiCfg.h"
-#include "HtiIPCommlogging.h"
+#include "HtiIPCommLogging.h"
#include <commdb.h> // CCommsDatabase
-#include <hticfg.h>
+#include <HtiCfg.h>
// CONSTANTS
--- a/hti/HtiCommPlugins/HtiIPCommPlugin/src/HtiIPCommEcomPlugin.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiIPCommPlugin/src/HtiIPCommEcomPlugin.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -18,7 +18,7 @@
// INCLUDE FILES
#include "HtiIPCommEcomPlugin.h"
-#include <htilogging.h>
+#include <HtiLogging.h>
CHtiIPCommEcomPlugin* CHtiIPCommEcomPlugin::NewL()
{
--- a/hti/HtiCommPlugins/HtiIPCommPlugin/src/HtiIPCommServerClient.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiIPCommPlugin/src/HtiIPCommServerClient.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -18,7 +18,7 @@
// INCLUDE FILES
#include <e32uid.h>
-#include <HTILogging.h>
+#include <HtiLogging.h>
#include "HtiIPCommServerCommon.h"
#include "HtiIPCommServerClient.h"
--- a/hti/HtiCommPlugins/HtiIPCommPlugin/src/HtiIPCommserver.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiIPCommPlugin/src/HtiIPCommserver.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -23,7 +23,7 @@
#include "HtiIPCommServerCommon.h"
#include "HtiIPCommServer.h"
#include "HtiIPCommServerSession.h"
-#include "HtiIPCommlogging.h"
+#include "HtiIPCommLogging.h"
CHtiIPCommServer::CHtiIPCommServer()
:CServer2( EPriorityUserInput, EUnsharableSessions ),
--- a/hti/HtiCommPlugins/HtiIPCommPlugin/src/HtiIPCommserverSession.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiIPCommPlugin/src/HtiIPCommserverSession.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -21,7 +21,7 @@
// INCLUDE FILES
#include "HtiIPCommServerCommon.h"
#include "HtiIPCommServerSession.h"
-#include "HtiIPCommlogging.h"
+#include "HtiIPCommLogging.h"
CHtiIPCommServerSession::CHtiIPCommServerSession( CHtiIPCommServer* aServer )
:iServer( aServer )
--- a/hti/HtiCommPlugins/HtiIPCommPlugin/src/HtiSocketMonitor.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiIPCommPlugin/src/HtiSocketMonitor.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -18,7 +18,7 @@
// INCLUDE FILES
#include "HtiSocketMonitor.h"
-#include "HtiIPCommlogging.h"
+#include "HtiIPCommLogging.h"
CHtiSocketMonitor* CHtiSocketMonitor::NewL( MHtiSocketObserver::TRequestType aType, MHtiSocketObserver* aObserver )
--- a/hti/HtiCommPlugins/HtiSerialCommPlugin/inc/HtiSerialCommEcomPlugin.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiSerialCommPlugin/inc/HtiSerialCommEcomPlugin.h Fri Apr 16 16:37:27 2010 +0300
@@ -23,7 +23,7 @@
// INCLUDES
#include <c32comm.h>
-#include <HTICommPluginInterface.h> // defined in HtiFramework project
+#include <HtiCommPluginInterface.h> // defined in HtiFramework project
// FORWARD DECLARATIONS
--- a/hti/HtiCommPlugins/HtiSerialCommPlugin/src/HtiSerialCommEcomPlugin.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiSerialCommPlugin/src/HtiSerialCommEcomPlugin.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -21,8 +21,8 @@
#include <f32file.h>
#include "HtiSerialCommEcomPlugin.h"
-#include <hticfg.h>
-#include <htilogging.h>
+#include <HtiCfg.h>
+#include <HtiLogging.h>
// CONSTANTS
_LIT( KHtiSerialError, "HtiSerialError" );
--- a/hti/HtiCommPlugins/HtiUsbSerialCommPlugin/group/HtiUsbSerialComm.cfg Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiUsbSerialCommPlugin/group/HtiUsbSerialComm.cfg Fri Apr 16 16:37:27 2010 +0300
@@ -20,3 +20,13 @@
#DataRate=576000
#DataRate=1152000
#DataRate=4000000
+
+# The RetryTimes parameter configures the retry amount(times) if the port opening fails.
+# Default value: 10
+
+#RetryTimes=10
+
+# The RetryInterval parameter configures the time(seconds) between retries if the port opening fails.
+# Default value: 10
+
+#RetryInterval=10
--- a/hti/HtiCommPlugins/HtiUsbSerialCommPlugin/inc/HtiUsbSerialCommEcomPlugin.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiUsbSerialCommPlugin/inc/HtiUsbSerialCommEcomPlugin.h Fri Apr 16 16:37:27 2010 +0300
@@ -21,7 +21,7 @@
// INCLUDES
#include <c32comm.h>
-#include <HTICommPluginInterface.h> // defined in HtiFramework project
+#include <HtiCommPluginInterface.h> // defined in HtiFramework project
// FORWARD DECLARATIONS
class CHtiCfg;
--- a/hti/HtiCommPlugins/HtiUsbSerialCommPlugin/src/HtiUsbSerialCommEcomPlugin.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiCommPlugins/HtiUsbSerialCommPlugin/src/HtiUsbSerialCommEcomPlugin.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -21,8 +21,8 @@
#include <f32file.h>
#include "HtiUsbSerialCommEcomPlugin.h"
-#include <hticfg.h>
-#include <htilogging.h>
+#include <HtiCfg.h>
+#include <HtiLogging.h>
// EXTERNAL DATA STRUCTURES
@@ -36,6 +36,8 @@
_LIT( KHtiUsbSerialCommCfg, "HTIUsbSerialComm.cfg" );
_LIT8( KUsbPortNumber, "PortNumber" );
_LIT8( KUsbDataRate, "DataRate" );
+_LIT8( KUsbRetryTimes, "RetryTimes" );
+_LIT8( KUsbRetryInterval, "RetryInterval" );
// _LIT( KUsbPddName, "" );
_LIT( KUsbLddName, "EUSBC" );
@@ -306,8 +308,41 @@
err = iCommPort.Open( iCommServ, commPort, ECommExclusive, ECommRoleDTE );
if ( err )
{
- HTI_LOG_FORMAT( "Failed to open port %d", err );
- ShowErrorNotifierL( _L( "Failed to open port" ), err );
+ //read retry parameters from cfg
+ TInt retryTimes = 10;
+ TRAPD( paramRetryTimesErr,
+ retryTimes = iCfg->GetParameterIntL( KUsbRetryTimes ) );
+ if ( paramRetryTimesErr != KErrNone )
+ {
+ HTI_LOG_TEXT( "RetryTimes is not defined in cfg, using default" );
+ }
+ HTI_LOG_FORMAT( " RetryTimes = %d", retryTimes );
+
+ TInt retryInterval = 10;
+ TRAPD( paramRetryIntervalErr,
+ retryInterval = iCfg->GetParameterIntL( KUsbRetryInterval ) );
+ if ( paramRetryIntervalErr != KErrNone )
+ {
+ HTI_LOG_TEXT( "RetryInterval is not defined in cfg, using default" );
+ }
+ HTI_LOG_FORMAT( " RetryInterval = %d(s)", retryInterval );
+
+ // retry to open the port
+ for( TInt i=0; i<retryTimes; i++ )
+ {
+ User::After( retryInterval * 1000000 );
+ err = iCommPort.Open( iCommServ, commPort, ECommExclusive, ECommRoleDTE );
+ if( !err )
+ {
+ break;
+ }
+ }
+
+ if( err )
+ {
+ HTI_LOG_FORMAT( "Failed to open port %d", err );
+ ShowErrorNotifierL( _L( "Failed to open port" ), err );
+ }
}
User::LeaveIfError( err );
HTI_LOG_TEXT( "Port open - checking port capabilities" );
--- a/hti/HtiFramework/group/hti.cfg Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiFramework/group/hti.cfg Fri Apr 16 16:37:27 2010 +0300
@@ -77,7 +77,7 @@
# The flag indicating whether or not HTI should start automatically when,
# device starts. 0 means no, 1 means yes. If automatic start is not enabled,
# HTI can be started manually from HtiAdmin application.
-# Default value: 0 in emulator, 1 in hardware
+# Default value: 1
#EnableHtiAutoStart=0
#EnableHtiAutoStart=1
@@ -90,3 +90,8 @@
#ShowErrorDialogs=0
#ShowErrorDialogs=1
+
+# The value in seconds that HTI will delay before reconnecting when connection lost,
+# If the value is 0, reconnect would not happen.
+# Default value: 0
+#ReconnectDelay=0
--- a/hti/HtiFramework/inc/HtiDispatcher.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiFramework/inc/HtiDispatcher.h Fri Apr 16 16:37:27 2010 +0300
@@ -94,6 +94,8 @@
* @param aMaxMsgSize maximum size for an incoming message
* @param aMaxQueueMemorySize maximum size of all messages in the
* incoming queue
+ * @param aReconnectDelay seconds of delay for reconnecting when connection
+ * lost. Value 0 means that reconnect would not happen.
* @param aShowConsole whether to open a console window for HTI
* @param aShowErrorDialogs whether to show a dialog in case of critical
* error or just silently exit
@@ -102,6 +104,7 @@
static CHtiDispatcher* NewL( const TDesC8& aCommPlugin,
TInt aMaxMsgSize,
TInt aMaxQueueMemorySize,
+ TInt aReconnectDelay,
TBool aShowConsole,
TBool aShowErrorDialogs );
@@ -113,6 +116,8 @@
* @param aMaxMsgSize maximum size for an incoming message
* @param aMaxQueueMemorySize maximum size of all messages in the
* incoming queue
+ * @param aReconnectDelay seconds of delay for reconnecting when connection
+ * lost. Value 0 means that reconnect would not happen.
* @param aShowConsole whether to open a console window for HTI
* @param aShowErrorDialogs whether to show a dialog in case of critical
* error or just silently exit
@@ -121,6 +126,7 @@
static CHtiDispatcher* NewLC( const TDesC8& aCommPlugin,
TInt aMaxMsgSize,
TInt aMaxQueueMemorySize,
+ TInt aReconnectDelay,
TBool aShowConsole,
TBool aShowErrorDialogs );
@@ -207,12 +213,20 @@
*/
TBool GetShowErrorDialogs();
+
+ /*
+ * Delay a period and reconnect when connection lost.
+ * If the period is 0, reconnect would not happen.
+ * @return whether reconnect
+ */
+ TBool CommReconnect();
+
protected:
/**
* Constructors
*
*/
- CHtiDispatcher( TInt aMaxQueueMemorySize, TBool aShowErrorDialogs );
+ CHtiDispatcher( TInt aMaxQueueMemorySize, TInt aReconnectDelay, TBool aShowErrorDialogs );
void ConstructL( const TDesC8& aCommPlugin,
TInt aMaxMsgSize,
@@ -460,6 +474,12 @@
* errors or just silently exit.
*/
TBool iShowErrorDialogs;
+
+ /**
+ * Delay a period and reconnect when connection lost.
+ * If the period is 0, reconnect would not happen.
+ */
+ TInt iReconnectDelay;
};
--- a/hti/HtiFramework/inc/HtiMessage.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiFramework/inc/HtiMessage.h Fri Apr 16 16:37:27 2010 +0300
@@ -27,7 +27,8 @@
const TInt KPriorityMask = 0x2;
const TInt KHtiMsgServiceUidLen = 4;
-class CHtiMessage : public CBase
+
+class CHtiMessage : public CBase
{
public:
/**
--- a/hti/HtiFramework/inc/HtiMessageQueue.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiFramework/inc/HtiMessageQueue.h Fri Apr 16 16:37:27 2010 +0300
@@ -23,7 +23,7 @@
#include "HtiMessage.h"
-class CHtiMessageQueue : public CBase
+class CHtiMessageQueue : public CBase
{
public:
/**
--- a/hti/HtiFramework/src/HtiCommAdapter.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiFramework/src/HtiCommAdapter.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -18,11 +18,11 @@
#include "HtiCommAdapter.h"
#include "HtiDispatcher.h"
-#include "HTICommPluginInterface.h"
+#include "HtiCommPluginInterface.h"
#include "HtiMessage.h"
#include "HtiNotifier.h"
-#include "HTILogging.h"
+#include "HtiLogging.h"
//default value for max message size for incoming messages
//used if value in constructor is not valid (<0)
@@ -213,6 +213,11 @@
// USB errors from d32usbc.h
else if ( -6700 > iStatus.Int() && iStatus.Int() > -6712 )
{
+ if(iDispatcher->CommReconnect())
+ {
+ return;
+ }
+
if ( iDispatcher->GetShowErrorDialogs() )
{
TBuf<48> errorText;
@@ -226,6 +231,11 @@
else if ( iStatus == KErrDisconnected )
{
// This happens if Bluetooth connection is lost.
+ if(iDispatcher->CommReconnect())
+ {
+ return;
+ }
+
if ( iDispatcher->GetShowErrorDialogs() )
{
CHtiNotifier::ShowErrorL(
@@ -259,6 +269,7 @@
{
HTI_LOG_FORMAT( "Error %d, reissue request", iStatus.Int() );
iDispatcher->Notify( iStatus.Int() );
+ User::After(2000000);
ReceiveMessage();
}
break;
@@ -289,7 +300,7 @@
iMsgToReceive = NULL;
iDispatcher->Notify( iStatus.Int() );
-
+ User::After(2000000);
ReceiveMessage();
}
break;
--- a/hti/HtiFramework/src/HtiDispatcher.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiFramework/src/HtiDispatcher.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -20,10 +20,10 @@
#include "HtiDispatcher.h"
#include "HtiMessage.h"
#include "HtiMessageQueue.h"
-#include "HTILogging.h"
+#include "HtiLogging.h"
#include "HtiCommAdapter.h"
-#include "HTIServicePluginInterface.h"
-#include "HTICommPluginInterface.h"
+#include "HtiServicePluginInterface.h"
+#include "HtiCommPluginInterface.h"
#include "HtiSecurityManager.h"
#include "HtiVersion.h"
@@ -113,7 +113,7 @@
*
**************************************************************************/
CHtiDispatcher::CHtiDispatcher( TInt aMaxQueueMemorySize,
- TBool aShowErrorDialogs ):
+ TInt aReconnectDelay, TBool aShowErrorDialogs ):
iIdleActive( EFalse ),
iMaxQueueMemorySize( aMaxQueueMemorySize > 0 ?
aMaxQueueMemorySize : KDefaultMaxQueueSize ),
@@ -122,7 +122,8 @@
iConsole( NULL ),
iIdleOverCommAdapter( EFalse ),
iHtiInstanceId( 0 ),
- iShowErrorDialogs( aShowErrorDialogs )
+ iShowErrorDialogs( aShowErrorDialogs ),
+ iReconnectDelay (aReconnectDelay)
{
HTI_LOG_FORMAT( "MaxQueueMemorySize %d", iMaxQueueMemorySize );
iQueueSizeLowThresold = ( iMaxQueueMemorySize / 2 ) / 2;
@@ -256,11 +257,12 @@
CHtiDispatcher* CHtiDispatcher::NewLC( const TDesC8& aCommPlugin,
TInt aMaxMsgSize,
TInt aMaxQueueMemory,
+ TInt aReconnectDelay,
TBool aShowConsole,
TBool aShowErrorDialogs )
{
CHtiDispatcher* obj = new (ELeave) CHtiDispatcher(
- aMaxQueueMemory, aShowErrorDialogs );
+ aMaxQueueMemory, aReconnectDelay,aShowErrorDialogs );
CleanupStack::PushL( obj );
obj->ConstructL( aCommPlugin, aMaxMsgSize, aShowConsole );
return obj;
@@ -269,11 +271,12 @@
CHtiDispatcher* CHtiDispatcher::NewL( const TDesC8& aCommPlugin,
TInt aMaxMsgSize,
TInt aMaxQueueMemory,
+ TInt aReconnectDelay,
TBool aShowConsole,
TBool aShowErrorDialogs )
{
CHtiDispatcher* obj = NewLC( aCommPlugin, aMaxMsgSize, aMaxQueueMemory,
- aShowConsole, aShowErrorDialogs );
+ aReconnectDelay,aShowConsole, aShowErrorDialogs );
CleanupStack::Pop();
return obj;
}
@@ -1240,3 +1243,25 @@
}
return mappedUid;
}
+
+TBool CHtiDispatcher::CommReconnect()
+ {
+ if(iReconnectDelay == 0)
+ {
+ return EFalse;
+ }
+
+ //Delay
+ HTI_LOG_FORMAT( "Reconnect deley : %d seconds", iReconnectDelay);
+ User::After(iReconnectDelay * 1000 * 1000);
+
+ //Reconnect
+ iIncomingQueue->RemoveAll();
+ iOutgoingQueue->RemoveAll();
+
+ iListener->Reset();
+ iSender->Reset();
+ iListener->ReceiveMessage();
+
+ return ETrue;
+ }
--- a/hti/HtiFramework/src/HtiFramework.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiFramework/src/HtiFramework.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -49,14 +49,16 @@
_LIT8( KEnableHtiWatchDog, "EnableHtiWatchDog" );
_LIT8( KEnableHtiAutoStart, "EnableHtiAutoStart" );
_LIT8( KShowErrorDialogs, "ShowErrorDialogs" );
+_LIT8( KReconnectDelay, "ReconnectDelay");
const static TInt KDefaultMaxWaitTime = 90; // seconds
const static TInt KDefaultStartUpDelay = 5; // seconds
const static TInt KHtiDefaultPriority = 3;
const static TInt KHtiWatchDogEnabledDefault = 0;
const static TInt KHtiConsoleEnabledDefault = 0;
-const static TInt KHtiAutoStartEnabledDefault = 0;
+const static TInt KHtiAutoStartEnabledDefault = 1;
const static TInt KHtiShowErrorDialogsDefault = 1;
+const static TInt KHtiReconnectDelay = 0;
// MACROS
@@ -101,6 +103,7 @@
TInt showConsole = KHtiConsoleEnabledDefault;
TInt enableHtiAutoStart = KHtiAutoStartEnabledDefault;
TInt showErrorDialogs = KHtiShowErrorDialogsDefault;
+ TInt reconnectDelay = KHtiReconnectDelay;
TRAPD( err, iCfg = CHtiCfg::NewL() );
if ( err == KErrNone )
@@ -212,7 +215,14 @@
HTI_LOG_TEXT( "The following parameter not defined in cfg, using default value:" );
HTI_LOG_DES( KShowErrorDialogs );
}
-
+
+ TRAP( paramErr, reconnectDelay = iCfg->GetParameterIntL( KReconnectDelay ) );
+ if ( paramErr != KErrNone )
+ {
+ HTI_LOG_TEXT( "The following parameter not defined in cfg, using default value:" );
+ HTI_LOG_DES( KReconnectDelay );
+ }
+
if ( !IsStartAcceptedL( enableHtiAutoStart ) )
{
User::Leave( KErrAbort );
@@ -220,7 +230,7 @@
WaitNormalState( maxWaitTime, startUpDelay );
iDispatcher = CHtiDispatcher::NewL( commPlugin, maxMsgSize,
- maxQueueSize, showConsole != 0, showErrorDialogs != 0 );
+ maxQueueSize, reconnectDelay, showConsole != 0, showErrorDialogs != 0 );
}
}
@@ -239,7 +249,7 @@
//create with default values
iDispatcher = CHtiDispatcher::NewL(
- KNullDesC8, 0, 0, showConsole != 0, showErrorDialogs != 0 );
+ KNullDesC8, 0, 0, 0, showConsole != 0, showErrorDialogs != 0 );
}
HTI_LOG_FORMAT( "Priority setting = %d", priority );
--- a/hti/HtiServicePlugins/HtiAppServicePlugin/inc/HtiAppServicePlugin.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiAppServicePlugin/inc/HtiAppServicePlugin.h Fri Apr 16 16:37:27 2010 +0300
@@ -23,7 +23,7 @@
// INCLUDES
#include <e32base.h>
-#include <HTIServicePluginInterface.h>
+#include <HtiServicePluginInterface.h>
// CONSTANTS
--- a/hti/HtiServicePlugins/HtiAppServicePlugin/src/HtiAppServicePlugin.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiAppServicePlugin/src/HtiAppServicePlugin.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -22,7 +22,7 @@
#include "HtiAppServicePlugin.h"
#include <HtiDispatcherInterface.h>
-#include <HTILogging.h>
+#include <HtiLogging.h>
// CONSTANTS
const static TUid KAppServiceUid = { 0x1020DEC7 };
--- a/hti/HtiServicePlugins/HtiEchoServicePlugin/inc/HtiEchoServicePlugin.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiEchoServicePlugin/inc/HtiEchoServicePlugin.h Fri Apr 16 16:37:27 2010 +0300
@@ -21,7 +21,7 @@
#define CHTIECHOSERVICEPLUGIN_H__
// INCLUDES
-#include <HTIServicePluginInterface.h>
+#include <HtiServicePluginInterface.h>
// CONSTANTS
--- a/hti/HtiServicePlugins/HtiEchoServicePlugin/src/HtiEchoServicePlugin.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiEchoServicePlugin/src/HtiEchoServicePlugin.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -17,9 +17,9 @@
// INCLUDE FILES
-#include "HtiEchoServiceplugin.h"
+#include "HtiEchoServicePlugin.h"
#include <HtiDispatcherInterface.h>
-#include <HTILogging.h>
+#include <HtiLogging.h>
// CONSTANTS
const static TUid KEchoServiceUid = { 0x1020DEBF };
--- a/hti/HtiServicePlugins/HtiFtpServicePlugin/inc/HtiFtpServicePlugin.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiFtpServicePlugin/inc/HtiFtpServicePlugin.h Fri Apr 16 16:37:27 2010 +0300
@@ -23,7 +23,7 @@
// INCLUDES
#include <e32std.h>
#include <f32file.h>
-#include <HTIServicePluginInterface.h>
+#include <HtiServicePluginInterface.h>
// CONSTANTS
enum TFtpCommand
--- a/hti/HtiServicePlugins/HtiFtpServicePlugin/src/HtiFtpServicePlugin.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiFtpServicePlugin/src/HtiFtpServicePlugin.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -20,7 +20,7 @@
#include "HtiFtpServicePlugin.h"
#include <HtiFtpBackupFakeBase.h>
#include <HtiDispatcherInterface.h>
-#include <HTILogging.h>
+#include <HtiLogging.h>
#include <e32property.h>
#include <hash.h>
--- a/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Inc/CIPProxyEngine.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Inc/CIPProxyEngine.h Fri Apr 16 16:37:27 2010 +0300
@@ -24,7 +24,7 @@
#include <e32base.h>
#include <es_sock.h>
#include "MIPProxyEngine.h"
-#include "MHostConnectionObserver.h"
+#include "Mhostconnectionobserver.h"
#include "MLocalTCPConnectionObserver.h"
#include "MTCPPortListenerObserver.h"
#include "MSocketRouterObserver.h"
--- a/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/CExprTCPClose.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/CExprTCPClose.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -88,7 +88,7 @@
TPtr8 dataToParse( aData.MidTPtr( aStartPos ) );
- TInt err = TryParsing( dataToParse, aLength );
+ TInt err = TryParsingL( dataToParse, aLength );
if ( err != KErrNone )
{
@@ -110,7 +110,7 @@
// CExprTCPClose::TryParsing
// -----------------------------------------------------------------------------
//
-TInt CExprTCPClose::TryParsing( TDes8& aData, TInt& aLength )
+TInt CExprTCPClose::TryParsingL( TDes8& aData, TInt& aLength )
{
__ASSERT_ALWAYS( aData.Left( KTCPClosePrefix().Length() ) == KTCPClosePrefix,
User::Panic( _L("Protocol"), 1 ) );
@@ -133,7 +133,7 @@
}
// send parsed results
- iObserver->CloseTCPConnection( port );
+ iObserver->CloseTCPConnectionL( port );
aLength = frameOverhead;
--- a/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/CExprTCPClose.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/CExprTCPClose.h Fri Apr 16 16:37:27 2010 +0300
@@ -68,7 +68,7 @@
public: // new functions
- TInt TryParsing( TDes8& aData, TInt& aLength );
+ TInt TryParsingL( TDes8& aData, TInt& aLength );
private:
--- a/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/CIPProxyEngine.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/CIPProxyEngine.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -19,9 +19,9 @@
// INCLUDE FILES
#include "CIPProxyEngine.h"
-#include "CTCPPortListener.h"
+#include "Ctcpportlistener.h"
#include "CLocalTCPConnection.h"
-#include "CSocketRouter.h"
+#include "Csocketrouter.h"
#include "MIPProxyEngineObserver.h"
#include "MHostConnection.h"
#include "MAbstractConnection.h"
@@ -528,6 +528,7 @@
DEBUG_PRINT( DEBUG_STRING(
"CIPProxyEngine::CloseTCPConnection(), port=%d"), aPort );
+ // Delete local TCP connections
TInt index = FindLocalTCPConn( aPort );
if ( index > -1 )
{
@@ -538,6 +539,25 @@
DEBUG_PRINT( DEBUG_STRING(
"CIPProxyEngine::CloseTCPConnection(), conn deleted.") );
}
+
+ // stop listening on this port
+ TInt peerListenerArrayCount = iPeerListenerArray->Count();
+ for ( TInt i = 0; i < peerListenerArrayCount; i++ )
+ {
+ CTCPPortListener* listener = iPeerListenerArray->At( i );
+ if(listener->Port() == aPort)
+ {
+ listener->Cancel();
+ iPeerListenerArray->Delete(i);
+ delete listener;
+ break;
+ }
+ }
+
+ if(iPeerListenerArray->Count() == 0)
+ {
+ iListening = EFalse;
+ }
}
// -----------------------------------------------------------------------------
@@ -552,6 +572,8 @@
iSocketRouter->ResetQueue();
iSocketRouter->RemoveAllPeers();
+ iLocalConnArray->ResetAndDestroy();
+
StopListening();
if ( iPeerListenerArray )
--- a/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/CProtocolTCP.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/CProtocolTCP.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -158,9 +158,9 @@
// CProtocolTCP::CloseTCPConnection
// -----------------------------------------------------------------------------
//
-void CProtocolTCP::CloseTCPConnection( TUint aPort )
+void CProtocolTCP::CloseTCPConnectionL( TUint aPort )
{
- iObserver->CloseTCPConnection( aPort );
+ iObserver->CloseTCPConnectionL( aPort );
}
// -----------------------------------------------------------------------------
--- a/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/CProtocolTCP.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/CProtocolTCP.h Fri Apr 16 16:37:27 2010 +0300
@@ -70,7 +70,7 @@
void ProtocolErrorL( TInt aErrorCode, const TDesC8& aReceivedData );
void OpenLocalTCPConnectionL( TUint aPort );
void OpenListeningTCPConnectionL( TUint aPort );
- void CloseTCPConnection( TUint aPort );
+ void CloseTCPConnectionL( TUint aPort );
void CloseAllTCPConnections();
public: // From MBPProtocol
--- a/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/CProtocolUDP.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/CProtocolUDP.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -132,22 +132,42 @@
"CProtocolUDP::WriteFrameL(), peer port=%d, original port=%d" ),
aPeerPort, aOriginalPort );
- aSocketWriter.WriteL( KUDPPrefix );
-
- TBuf8<KHexDecimalLength> portBuf;
- portBuf.Format( KHexFormat, aPeerPort );
- aSocketWriter.WriteL( portBuf );
- aSocketWriter.WriteL( KPortSuffix );
+ TInt bufSize = 0;
+ bufSize += KUDPPrefix().Length();
+ bufSize += KHexDecimalLength;
+ bufSize += KPortSuffix().Length();
+ bufSize += KHexDecimalLength;
+ bufSize += KLengthSuffix().Length();
+ bufSize += aData.Length();
+ bufSize += KDataSuffix().Length();
+ bufSize += KMessageSuffix().Length();
+
+ TBuf8<KHexDecimalLength> hexbuf;
+ HBufC8* buf = HBufC8::NewLC( bufSize );
+ TPtr8 ptr( buf->Des() );
+
+ // Append UDP prefix
+ ptr.Append( KUDPPrefix );
- TBuf8<KHexDecimalLength> lengthBuf;
- lengthBuf.Format( KHexFormat, aData.Length() );
- aSocketWriter.WriteL( lengthBuf );
+ // Append peer port
+ hexbuf.Format( KHexFormat, aPeerPort );
+ ptr.Append( hexbuf );
+ ptr.Append( KPortSuffix );
+
+ // Append data length
+ hexbuf.Format( KHexFormat, aData.Length() );
+ ptr.Append( hexbuf );
+ ptr.Append( KLengthSuffix );
- aSocketWriter.WriteL( KLengthSuffix );
- aSocketWriter.WriteL( aData );
- aSocketWriter.WriteL( KDataSuffix );
+ // Append data
+ ptr.Append( aData );
+ ptr.Append( KDataSuffix );
+ ptr.Append( KMessageSuffix );
+
+ // Write to socket
+ aSocketWriter.WriteL( *buf );
- aSocketWriter.WriteL( KMessageSuffix );
+ CleanupStack::PopAndDestroy( buf );
}
// -----------------------------------------------------------------------------
--- a/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/CSocketReader.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/CSocketReader.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -18,7 +18,7 @@
// INCLUDE FILES
-#include "CSocketReader.h"
+#include "Csocketreader.h"
#include "MSocketReaderObserver.h"
#include <badesca.h>
--- a/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/Csocket.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/Csocket.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -18,11 +18,11 @@
// INCLUDE FILES
-#include "CSocket.h"
+#include "Csocket.h"
#include <es_sock.h>
#include <in_sock.h>
#include "CSocketWriter.h"
-#include "CSocketReader.h"
+#include "Csocketreader.h"
#include "MSocketObserver.h"
#define DEBUG_FILENAME "IPProxyEngine.log"
--- a/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/Csocketrouter.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/Csocketrouter.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -18,7 +18,7 @@
// INCLUDE FILES
-#include "CSocketRouter.h"
+#include "Csocketrouter.h"
#include "CommRouterDefinitions.h"
#include "MSocketRouterObserver.h"
#include "MBPProtocol.h"
@@ -215,13 +215,14 @@
// CSocketRouter::FindPeerSocket
// -----------------------------------------------------------------------------
//
-TInt CSocketRouter::FindPeerSocket( TUint aRemotePort )
+TInt CSocketRouter::FindPeerSocket( TUint aPort )
{
DEBUG_PRINT( DEBUG_STRING( "CSocketRouter::FindPeerSocket()" ) );
TInt count = iPeerSocketArray->Count();
for ( TInt i = 0; i < count; i++ )
{
- if ( iPeerSocketArray->At( i )->RemotePort() == aRemotePort )
+ if ( iPeerSocketArray->At( i )->RemotePort() == aPort
+ || iPeerSocketArray->At( i )->LocalPort() == aPort)
{
return i;
}
@@ -648,17 +649,24 @@
// CSocketRouter::CloseTCPConnection
// -----------------------------------------------------------------------------
//
-void CSocketRouter::CloseTCPConnection( TUint aPort )
+void CSocketRouter::CloseTCPConnectionL( TUint aPort )
{
DEBUG_PRINT( DEBUG_STRING( "CloseTCPConnection, port = %d" ), aPort );
+
// Close the socket if it exists
+ CArrayPtr<CSocket>* socketArrayForDestroy = new (ELeave) CArrayPtrFlat<CSocket> ( 10 );
+ CleanupStack::PushL(socketArrayForDestroy);
TInt index = FindPeerSocket( aPort );
- if ( index > -1 )
+ while ( index > -1 )
{
- RemovePeerSocket( index );
+ socketArrayForDestroy->AppendL(iPeerSocketArray->At( index ));
+ iPeerSocketArray->Delete(index);
+ index = FindPeerSocket( aPort );
}
+ socketArrayForDestroy->ResetAndDestroy();
+ CleanupStack::PopAndDestroy(socketArrayForDestroy);
- if ( iObserver && index > -1 )
+ if ( iObserver )
{
iObserver->CloseTCPConnection( aPort );
}
--- a/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/Csocketrouter.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/Csocketrouter.h Fri Apr 16 16:37:27 2010 +0300
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32base.h>
-#include "CSocket.h"
+#include "Csocket.h"
#include "MSocketObserver.h"
#include "MProtocolObserverTCP.h"
#include "MProtocolObserverUDP.h"
@@ -101,10 +101,10 @@
/**
* Finds peer socket from the array.
- * @param aRemotePort A port to remove from the array
+ * @param aPort A port to remove from the array
* @return index of the peer socket, -1 if not found
*/
- TInt FindPeerSocket( TUint aRemotePort );
+ TInt FindPeerSocket( TUint aPort );
/**
* Removes all peer sockets from the array.
@@ -185,7 +185,7 @@
void TCPFrameParsedL( TUint aPort, const TDesC8& aData );
void OpenLocalTCPConnectionL( TUint aPort );
void OpenListeningTCPConnectionL( TUint aPort );
- void CloseTCPConnection( TUint aPort );
+ void CloseTCPConnectionL( TUint aPort );
void CloseAllTCPConnections();
protected: // From MProtocolObserverUDP
--- a/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/Ctcpportlistener.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/Ctcpportlistener.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -17,7 +17,7 @@
// INCLUDE FILES
-#include "CTCPPortListener.h"
+#include "Ctcpportlistener.h"
#include "MTCPPortListenerObserver.h"
#include <in_sock.h>
--- a/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/MExpressionObserverTCP.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/MExpressionObserverTCP.h Fri Apr 16 16:37:27 2010 +0300
@@ -40,7 +40,7 @@
virtual void OpenListeningTCPConnectionL( TUint aPort ) = 0;
- virtual void CloseTCPConnection( TUint aPort ) = 0;
+ virtual void CloseTCPConnectionL( TUint aPort ) = 0;
virtual void CloseAllTCPConnections() = 0;
};
--- a/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/MProtocolObserverTCP.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Src/MProtocolObserverTCP.h Fri Apr 16 16:37:27 2010 +0300
@@ -60,7 +60,7 @@
* Close a TCP connection
* @param aPort Remote port number to close
*/
- virtual void CloseTCPConnection( TUint aPort ) = 0;
+ virtual void CloseTCPConnectionL( TUint aPort ) = 0;
/**
* Close all TCP connections from listening & connecting ports
--- a/hti/HtiServicePlugins/HtiIpProxyServicePlugin/inc/HtiIpProxyServicePlugin.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiIpProxyServicePlugin/inc/HtiIpProxyServicePlugin.h Fri Apr 16 16:37:27 2010 +0300
@@ -21,7 +21,7 @@
#define HTIIPPROXYSERVICEPLUGIN_H__
// INCLUDES
-#include <HTIServicePluginInterface.h>
+#include <HtiServicePluginInterface.h>
#include "MSocket.h"
#include "MHostConnection.h"
#include "MAbstractConnection.h"
--- a/hti/HtiServicePlugins/HtiIpProxyServicePlugin/src/HtiIpProxyServicePlugin.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiIpProxyServicePlugin/src/HtiIpProxyServicePlugin.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -19,11 +19,11 @@
// INCLUDE FILES
#include "HtiIpProxyServicePlugin.h"
#include <HtiDispatcherInterface.h>
-#include <HTILogging.h>
+#include <HtiLogging.h>
#include <badesca.h>
#include <in_sock.h>
#include "MSocketObserver.h"
-#include "MHostConnectionObserver.h"
+#include "Mhostconnectionobserver.h"
#include "CIPProxyEngine.h"
// CONSTANTS
--- a/hti/HtiServicePlugins/HtiStifTfServicePlugin/inc/HtiStifTfIf.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiStifTfServicePlugin/inc/HtiStifTfIf.h Fri Apr 16 16:37:27 2010 +0300
@@ -23,7 +23,7 @@
// INCLUDES
#include <StifTFwIf.h>
-#include <HTIServicePluginInterface.h>
+#include <HtiServicePluginInterface.h>
// CONSTANTS
--- a/hti/HtiServicePlugins/HtiStifTfServicePlugin/inc/HtiStifTfServicePlugin.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiStifTfServicePlugin/inc/HtiStifTfServicePlugin.h Fri Apr 16 16:37:27 2010 +0300
@@ -22,7 +22,7 @@
#define HTISTIFTFSERVICEPLUGIN_H
// INCLUDES
-#include <HTIServicePluginInterface.h>
+#include <HtiServicePluginInterface.h>
// CONSTANTS
--- a/hti/HtiServicePlugins/HtiStifTfServicePlugin/src/HtiStifTfServicePlugin.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/HtiServicePlugins/HtiStifTfServicePlugin/src/HtiStifTfServicePlugin.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -21,7 +21,7 @@
// INCLUDE FILES
#include <e32std.h>
#include <HtiDispatcherInterface.h>
-#include <HTILogging.h>
+#include <HtiLogging.h>
#include "HtiStifTfServicePlugin.h"
#include "HtiStifTfIf.h"
--- a/hti/hti_plat/hti_api/inc/HtiVersion.h Tue Feb 02 01:57:15 2010 +0200
+++ b/hti/hti_plat/hti_api/inc/HtiVersion.h Fri Apr 16 16:37:27 2010 +0300
@@ -25,13 +25,13 @@
// CONSTANTS
const TUint8 KHtiVersionMajor = 2;
-const TUint8 KHtiVersionMinor = 15;
+const TUint8 KHtiVersionMinor = 18;
const TUint8 KHtiVersionBuild = 0;
-const TUint16 KHtiVersionYear = 2009;
-const TUint8 KHtiVersionMonth = 1;
-const TUint8 KHtiVersionWeek = 1;
-const TUint8 KHtiVersionDay = 8;
+const TUint16 KHtiVersionYear = 2010;
+const TUint8 KHtiVersionMonth = 3;
+const TUint8 KHtiVersionWeek = 9;
+const TUint8 KHtiVersionDay = 5;
// MACROS
--- a/memspy/symbian_version.hrh Tue Feb 02 01:57:15 2010 +0200
+++ b/memspy/symbian_version.hrh Fri Apr 16 16:37:27 2010 +0300
@@ -37,7 +37,7 @@
* used to variate the source code based on the SDK in use. The value of the
* flag should be always changed to reflect the current build environment.
*/
-#define SYMBIAN_VERSION_SUPPORT SYMBIAN_3
+#define SYMBIAN_VERSION_SUPPORT SYMBIAN_4
#endif // __SYMBIAN_VERSION_HRH
--- a/osrndtools_info/osrndtools_metadata/osrndtools_metadata.mrp Tue Feb 02 01:57:15 2010 +0200
+++ b/osrndtools_info/osrndtools_metadata/osrndtools_metadata.mrp Fri Apr 16 16:37:27 2010 +0300
@@ -1,3 +1,19 @@
+#
+# 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 osrndtools_metadata
source \sf\os\osrndtools\osrndtools_info\osrndtools_metadata
source \sf\os\osrndtools\package_definition.xml
--- a/stif/Logger/src/FileOutput.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/Logger/src/FileOutput.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -476,10 +476,13 @@
iFileAndDirName.Insert( iFileAndDirName.Length(), txtPrt );
}
- TBool isOpen( EFalse );
+// TBool isOpen( EFalse );
TInt ret( KErrNone );
- iIsFileOpen = iFileSession.IsFileOpen( iFileAndDirName, isOpen );
+
+ iIsFileOpen=iFile.Open( iFileSession, iFileAndDirName,
+ EFileWrite | EFileStreamText |
+ EFileShareAny );
if( iIsFileOpen == KErrNotFound )
{
ret = iFile.Create( iFileSession, iFileAndDirName,
@@ -498,9 +501,8 @@
}
else if( iIsFileOpen == KErrNone )
{
- ret = iFile.Open( iFileSession, iFileAndDirName,
- EFileWrite | EFileStreamText |
- EFileShareAny );
+
+ ret=KErrNone;
}
// Probably path not found
else
--- a/stif/TestCombiner/inc/StifPythonFunComb.h Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/TestCombiner/inc/StifPythonFunComb.h Fri Apr 16 16:37:27 2010 +0300
@@ -21,7 +21,7 @@
#define STIFPYTHONFUNCOMB_H
// INCLUDES
-#include <E32Base.h>
+#include <e32base.h>
// CONSTANTS
// None
--- a/stif/TestCombiner/inc/TestCase.h Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/TestCombiner/inc/TestCase.h Fri Apr 16 16:37:27 2010 +0300
@@ -20,7 +20,7 @@
#define TESTCASE_H
// INCLUDES
-#include <E32Base.h>
+#include <e32base.h>
#include <stifinternal/TestServerClient.h>
#include <StifTestModule.h>
#include "TestCaseNotify.h"
--- a/stif/TestCombiner/src/TestCombiner.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/TestCombiner/src/TestCombiner.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -1833,6 +1833,12 @@
// Checking if user wants to skip the rest of the execution in case of error @js
if(iCancelIfError && iSchedulerActive)
{
+ // Cancel event if it was waiting event
+ if(iTestRunner->iEvent.Name() != KNullDesC && iTestRunner->iEvent.Type() == TEventIf::EWaitEvent)
+ {
+ TestModuleIf().CancelEvent(iTestRunner->iEvent, &iTestRunner->iStatus);
+ }
+
// Interpret execution result type from returned result
TInt executionResult = TFullTestResult::ECaseExecuted; // Ok
if( (aTestCase->iResult.iCaseExecutionResultType >=
--- a/stif/TestEngine/inc/StifPythonFunEng.h Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/TestEngine/inc/StifPythonFunEng.h Fri Apr 16 16:37:27 2010 +0300
@@ -21,7 +21,7 @@
#define STIFPYTHONFUNENG_H
// INCLUDES
-#include <E32Base.h>
+#include <e32base.h>
// CONSTANTS
// None
--- a/stif/TestEngine/src/TestEngine.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/TestEngine/src/TestEngine.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -1351,7 +1351,12 @@
SetLoggerSettings( loggerSettings ) ;
- ReadTestModulesL( parser );
+ TRAP(r, ReadTestModulesL( parser ));
+ if(r != KErrNone)
+ {
+ __TRACE(KError, (CStifLogger::ERed, _L("Reading test modules finished with error [%d]"), r));
+ User::Leave(r);
+ }
CleanupStack::PopAndDestroy( settings );
CleanupStack::PopAndDestroy( parser );
@@ -1830,8 +1835,11 @@
sectionParser = aParser->SectionL(aSectionStart, aSectionEnd);
+ TBool sectionOK;
+
while(sectionParser)
{
+ sectionOK = ETrue;
__TRACE(KInit, (_L("Found '%S' and '%S' sections"), &aSectionStart, &aSectionEnd));
CleanupStack::PushL(sectionParser);
__TRACE(KInit, (_L("Starting to read module information")));
@@ -1842,121 +1850,130 @@
CleanupStack::PushL(item);
if(!item)
{
- CleanupStack::PopAndDestroy(item);
- __TRACE(KError, (CStifLogger::ERed, _L("'%S' not found from Module section"), &KModuleName));
- LeaveIfErrorWithNotify(KErrNotFound);
+ __TRACE(KError, (CStifLogger::ERed, _L("'%S' not found from Module section. Skipping whole section."), &KModuleName));
+ sectionOK = EFalse;
}
else
{
__TRACE(KInit, (_L("'%S' found"), &KModuleName));
}
- TPtrC name;
TName moduleName;
TInt ret(KErrNone);
- ret = item->GetString(KModuleName, name);
- if(ret != KErrNone)
- {
- CleanupStack::PopAndDestroy(item);
- __TRACE(KError, (CStifLogger::ERed, _L("Module name parsing left with error %d"), ret));
- LeaveIfErrorWithNotify(ret);
- }
- else
+
+ if(sectionOK)
{
- __TRACE(KInit, (_L("Module '%S' found from ini-file"), &name));
- moduleName.Copy(name);
- moduleName.LowerCase();
- ret = aModuleList->AddTestModule(moduleName);
- if(ret != KErrNone && ret != KErrAlreadyExists)
+ TPtrC name;
+ ret = item->GetString(KModuleName, name);
+ if(ret != KErrNone)
+ {
+ __TRACE(KError, (CStifLogger::ERed, _L("Module name parsing ended with error [%d]. Skipping whole section"), ret));
+ sectionOK = EFalse;
+ }
+ else
{
- CleanupStack::PopAndDestroy(item);
- __TRACE(KError, (CStifLogger::ERed, _L("Could not add module to list of modules. Error %d"), ret));
- LeaveIfErrorWithNotify(ret);
- }
+ __TRACE(KInit, (_L("Module '%S' found from ini-file"), &name));
+ moduleName.Copy(name);
+ moduleName.LowerCase();
+ ret = aModuleList->AddTestModule(moduleName);
+ if(ret != KErrNone && ret != KErrAlreadyExists)
+ {
+ CleanupStack::PopAndDestroy(item);
+ __TRACE(KError, (CStifLogger::ERed, _L("Could not add module to list of modules. Error %d"), ret));
+ LeaveIfErrorWithNotify(ret);
+ }
+ }
}
CleanupStack::PopAndDestroy(item);
//Get pointer to added module
- CTestModuleInfo* moduleInfo = aModuleList->GetModule(moduleName);
- if(!moduleInfo)
- {
- __TRACE(KError, (CStifLogger::ERed, _L("Could not add get module info from list")));
- LeaveIfErrorWithNotify(KErrNotFound);
- }
-
- // Get ini file, if it exists
- __TRACE(KInit, (_L("Start parsing ini file")));
- _LIT(KIniFile, "IniFile=");
- item = sectionParser->GetItemLineL(KIniFile);
- if(item)
+ if(sectionOK)
{
- __TRACE(KInit, (_L("'%S' found"), &KIniFile));
- CleanupStack::PushL(item);
- TPtrC iniFile;
- ret = item->GetString(KIniFile, iniFile);
- if(ret == KErrNone)
+ CTestModuleInfo* moduleInfo = aModuleList->GetModule(moduleName);
+ if(!moduleInfo)
+ {
+ __TRACE(KError, (CStifLogger::ERed, _L("Could not add get module info from list")));
+ LeaveIfErrorWithNotify(KErrNotFound);
+ }
+
+ // Get ini file, if it exists
+ __TRACE(KInit, (_L("Start parsing ini file")));
+ _LIT(KIniFile, "IniFile=");
+ item = sectionParser->GetItemLineL(KIniFile);
+ if(item)
{
- // Module inifile (might be empty) OK
- TFileName filename;
- filename.Copy(iniFile);
- TStifUtil::CorrectFilePathL( filename );
- filename.LowerCase();
- __TRACE(KInit, (CStifLogger::EBold, _L("Initialization file '%S' found, file can be empty"), &iniFile));
- moduleInfo->SetIniFile(filename);
+ __TRACE(KInit, (_L("'%S' found"), &KIniFile));
+ CleanupStack::PushL(item);
+ TPtrC iniFile;
+ ret = item->GetString(KIniFile, iniFile);
+ if(ret == KErrNone)
+ {
+ // Module inifile (might be empty) OK
+ TFileName filename;
+ filename.Copy(iniFile);
+ TStifUtil::CorrectFilePathL( filename );
+ filename.LowerCase();
+ __TRACE(KInit, (CStifLogger::EBold, _L("Initialization file '%S' found, file can be empty"), &iniFile));
+ moduleInfo->SetIniFile(filename);
+ }
+ else
+ {
+ __TRACE(KInit, (_L("Initialization file not found")));
+ }
+ CleanupStack::PopAndDestroy(item);
}
else
{
- __TRACE(KInit, (_L("Initialization file not found")));
+ __TRACE(KInit, (_L("'%S' not found"), &KIniFile));
}
- CleanupStack::PopAndDestroy(item);
+
+ // Get config (testcase) file
+ __TRACE(KInit, (_L("Start parsing cfg files")));
+ TPtrC cfgTag;
+ for(TInt i = 0; i < 2; i++)
+ {
+ //Set tag for config files
+ if(i == 0)
+ {
+ cfgTag.Set(_L("ConfigFile="));
+ }
+ else
+ {
+ cfgTag.Set(_L("TestCaseFile="));
+ }
+ //Read data
+ item = sectionParser->GetItemLineL(cfgTag);
+ while(item)
+ {
+ CleanupStack::PushL(item);
+ __TRACE(KInit, (_L("Item '%S' found"), &cfgTag));
+ TPtrC cfgFile;
+ ret = item->GetString(cfgTag, cfgFile);
+ if(ret == KErrNone)
+ {
+ TFileName ifile;
+ ifile.Copy(cfgFile);
+ TStifUtil::CorrectFilePathL( ifile );
+ ifile.LowerCase();
+ __TRACE(KInit, (_L("Configuration file '%S' found"), &ifile));
+ moduleInfo->AddCfgFile(ifile);
+ }
+ else
+ {
+ __TRACE(KInit, (_L("Configuration file not found")));
+ }
+ CleanupStack::PopAndDestroy(item);
+ item = sectionParser->GetNextItemLineL(cfgTag);
+ }
+ }
+
+ __TRACE(KInit, (_L("Module '%S' information read correctly"), &moduleName));
}
else
{
- __TRACE(KInit, (_L("'%S' not found"), &KIniFile));
+ __TRACE(KError, (_L("Module '%S' information skipped"), &moduleName));
}
- // Get config (testcase) file
- __TRACE(KInit, (_L("Start parsing cfg files")));
- TPtrC cfgTag;
- for(TInt i = 0; i < 2; i++)
- {
- //Set tag for config files
- if(i == 0)
- {
- cfgTag.Set(_L("ConfigFile="));
- }
- else
- {
- cfgTag.Set(_L("TestCaseFile="));
- }
- //Read data
- item = sectionParser->GetItemLineL(cfgTag);
- while(item)
- {
- CleanupStack::PushL(item);
- __TRACE(KInit, (_L("Item '%S' found"), &cfgTag));
- TPtrC cfgFile;
- ret = item->GetString(cfgTag, cfgFile);
- if(ret == KErrNone)
- {
- TFileName ifile;
- ifile.Copy(cfgFile);
- TStifUtil::CorrectFilePathL( ifile );
- ifile.LowerCase();
- __TRACE(KInit, (_L("Configuration file '%S' found"), &ifile));
- moduleInfo->AddCfgFile(ifile);
- }
- else
- {
- __TRACE(KInit, (_L("Configuration file not found")));
- }
- CleanupStack::PopAndDestroy(item);
- item = sectionParser->GetNextItemLineL(cfgTag);
- }
- }
-
- __TRACE(KInit, (_L("Module '%S' information read correctly"), &moduleName));
-
// Get next section...
CleanupStack::PopAndDestroy(sectionParser);
sectionParser = aParser->NextSectionL(aSectionStart, aSectionEnd);
@@ -1998,7 +2015,12 @@
_LIT(KTestModuleEnd, "[End_Module]");
__TRACE(KInit, (_L("Starting to search module sections")));
- ParseTestModulesL(aParser, moduleList, KTestModuleStart, KTestModuleEnd);
+ TRAPD(err, ParseTestModulesL(aParser, moduleList, KTestModuleStart, KTestModuleEnd));
+ if(err != KErrNone)
+ {
+ __TRACE(KError, (CStifLogger::ERed, _L("Parsing test modules returned error [%d]"), err));
+ User::Leave(err);
+ }
__TRACE(KInit, (CStifLogger::EBold, _L("End parsing test modules")));
__TRACE(KInit, (_L("")));
--- a/stif/TestInterface/src/TestInterface.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/TestInterface/src/TestInterface.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -430,13 +430,21 @@
TPtr moduleName = cmdLine->Des();
User().CommandLine( moduleName );
- RDebug::Print (moduleName);
+ RDebug::Print(_L("StartSession() Received data [%S]"), &moduleName);
+
+ // Extract semaphore name passed in data
+ TInt index = moduleName.Find(_L(" "));
+ RDebug::Print(_L("StartSession() Space separator found at position [%d]"), index);
+ TPtrC semaphoreName = moduleName.Mid(index + 1);
+ moduleName = moduleName.Left(index);
+
+ RDebug::Print(_L("StartSession() Extracted module name [%S] and sempahore name [%S]"), &moduleName, &semaphoreName);
// Open start-up synchronization semaphore
RSemaphore startup;
- RDebug::Print(_L(" Openingstart-up semaphore"));
- TName semaphoreName = _L("startupSemaphore");
- semaphoreName.Append( moduleName );
+ RDebug::Print(_L(" Opening start-up semaphore"));
+// TName semaphoreName = _L("startupSemaphore");
+// semaphoreName.Append( moduleName );
TInt res = startup.OpenGlobal(semaphoreName);
RDebug::Print(_L("Opening result %d"), res);
@@ -448,7 +456,7 @@
if ( r == KErrAlreadyExists )
{
// Ok, server was already started
- RDebug::Print(_L("Server already started, signaling semaphore and existing"));
+ RDebug::Print(_L("Server already started, signaling semaphore and exiting"));
startup.Signal();
//__UHEAP_MARKEND;
--- a/stif/TestInterface/src/TestModuleIf.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/TestInterface/src/TestModuleIf.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -279,6 +279,13 @@
VA_LIST list;
VA_START(list,aFmt);
TName aBuf;
+ RBuf buf;
+ TInt ret = buf.Create(1024);
+ if(ret != KErrNone)
+ {
+ __RDEBUG((_L("STF: Printf: Buffer creation failed [%d]"), ret));
+ return;
+ }
// Cut the description length
TInt len = aDefinition.Length();
@@ -293,9 +300,17 @@
TDesOverflowHandler overFlowHandler (this, aPriority, shortDescription);
// Parse parameters
- aBuf.AppendFormatList(aFmt,list, &overFlowHandler);
+ buf.AppendFormatList(aFmt, list, &overFlowHandler);
+
+ if(buf.Length() == 0)
+ {
+ __RDEBUG((_L("STF: Printf: Unable to prepare print buffer (probably printed string is too long)")));
+ }
// Print
+ aBuf.Copy(buf.Left(aBuf.MaxLength()));
+ buf.Close();
+
iTestExecution->DoNotifyPrint( aPriority, shortDescription, aBuf );
}
--- a/stif/TestModuleTemplates/HardCodedTestModuleXXX/group/HardCodedTestModuleXXX_DoxyFile.py Tue Feb 02 01:57:15 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,239 +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 the License "Symbian Foundation License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-#
-
-# Doxyfile 1.4.1
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = HardCodedTestModuleXXX
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = HardCodedTargetDirYYY
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-USE_WINDOWS_ENCODING = YES
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF =
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = NO
-JAVADOC_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP = NO
-INHERIT_DOCS = YES
-DISTRIBUTE_GROUP_DOC = NO
-TAB_SIZE = 8
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = YES
-OPTIMIZE_OUTPUT_JAVA = NO
-SUBGROUPING = YES
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = NO
-EXTRACT_LOCAL_CLASSES = NO
-EXTRACT_LOCAL_METHODS = NO
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = YES
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = YES
-SORT_BRIEF_DOCS = NO
-SORT_BY_SCOPE_NAME = NO
-GENERATE_TODOLIST = NO
-GENERATE_TESTLIST = NO
-GENERATE_BUGLIST = NO
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = YES
-SHOW_DIRECTORIES = YES
-FILE_VERSION_FILTER =
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = HardCodedTargetDirYYY
-FILE_PATTERNS = *.h \
- *.rh \
- *.hrh
-RECURSIVE = YES
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = YES
-VERBATIM_HEADERS = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 5
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = NO
-HTML_OUTPUT = html
-HTML_FILE_EXTENSION = .html
-HTML_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = YES
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-BINARY_TOC = YES
-TOC_EXPAND = YES
-DISABLE_INDEX = YES
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = YES
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT = latex
-LATEX_CMD_NAME = latex
-MAKEINDEX_CMD_NAME = makeindex
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-LATEX_HIDE_INDICES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = YES
-RTF_OUTPUT = Doc
-COMPACT_RTF = YES
-RTF_HYPERLINKS = YES
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT = man
-MAN_EXTENSION = .3
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-XML_OUTPUT = xml
-XML_SCHEMA =
-XML_DTD =
-XML_PROGRAMLISTING = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-PERLMOD_LATEX = NO
-PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = YES
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED = NONSHARABLE_CLASS
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-TAGFILES =
-GENERATE_TAGFILE =
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-PERL_PATH = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = YES
-HIDE_UNDOC_RELATIONS = YES
-HAVE_DOT = NO
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-GROUP_GRAPHS = YES
-UML_LOOK = NO
-TEMPLATE_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-CALL_GRAPH = NO
-GRAPHICAL_HIERARCHY = YES
-DIRECTORY_GRAPH = YES
-DOT_IMAGE_FORMAT = png
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1024
-MAX_DOT_GRAPH_DEPTH = 0
-DOT_TRANSPARENT = NO
-DOT_MULTI_TARGETS = NO
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
--- a/stif/TestModuleTemplates/HardCodedTestModuleXXX/group/HardCodedTestModuleXXX_DoxyFile.txt Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/TestModuleTemplates/HardCodedTestModuleXXX/group/HardCodedTestModuleXXX_DoxyFile.txt Fri Apr 16 16:37:27 2010 +0300
@@ -2,13 +2,14 @@
# 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 the License "Symbian Foundation License v1.0"
+# under the terms of "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
-# at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
# Initial Contributors:
# Nokia Corporation - initial contribution.
#
+#
# Contributors:
#
# Description:
--- a/stif/TestModuleTemplates/STIFUnitXXX/src/STIFUnitXXX.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/TestModuleTemplates/STIFUnitXXX/src/STIFUnitXXX.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -33,6 +33,8 @@
//#define STIFUNIT_OOMTESTINITIALIZEL
//#define STIFUNIT_OOMHANDLEWARNINGL
//#define STIFUNIT_OOMTESTFINALIZEL
+// Uncomment following define, if you want to increase heap or stack size.
+// #define STIFUNIT_SETHEAPANDSTACKSIZE
/******************************************************************************/
@@ -57,6 +59,28 @@
#include <StifUnitGeneric.h>
/*
+ * Implementation of setHeapAndStack virtual methods.
+ * To changes heap and stack size provide new values to iTestThreadStackSize, iTestThreadMinHeap and iTestThreadMaxHeap.
+*/
+
+#ifdef STIFUNIT_SETHEAPANDSTACKSIZE
+EXPORT_C TInt SetRequirements( CTestModuleParam*& aTestModuleParam,
+ TUint32& aParameterValid )
+ {
+ aParameterValid = KStifTestModuleParameterChanged;
+ CTestModuleParamVer01* param = CTestModuleParamVer01::NewL();
+ // Stack size
+ param->iTestThreadStackSize= 16384; // 16K stack
+ // Heap sizes
+ param->iTestThreadMinHeap = 4096; // 4K heap min
+ param->iTestThreadMaxHeap = 1048576;// 1M heap max
+
+ return KErrNone;
+ }
+#undef STIFUNIT_SETHEAPANDSTACKSIZE
+#endif
+
+/*
* User implementation of OOM virtual methods.
* Providing own implementation requires uncommenting defines at the
* beginnig of this file.
--- a/stif/TestModuleTemplates/TemplateKernelScriptXXX/group/TemplateKernelScriptXXX_DoxyFile.py Tue Feb 02 01:57:15 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,239 +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 the License "Symbian Foundation License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-#
-
-# Doxyfile 1.4.1
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = TemplateKernelScriptXXX
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = TemplateKernelScriptTargetDirYYY
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-USE_WINDOWS_ENCODING = YES
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF =
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = NO
-JAVADOC_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP = NO
-INHERIT_DOCS = YES
-DISTRIBUTE_GROUP_DOC = NO
-TAB_SIZE = 8
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = YES
-OPTIMIZE_OUTPUT_JAVA = NO
-SUBGROUPING = YES
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = NO
-EXTRACT_LOCAL_CLASSES = NO
-EXTRACT_LOCAL_METHODS = NO
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = YES
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = YES
-SORT_BRIEF_DOCS = NO
-SORT_BY_SCOPE_NAME = NO
-GENERATE_TODOLIST = NO
-GENERATE_TESTLIST = NO
-GENERATE_BUGLIST = NO
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = YES
-SHOW_DIRECTORIES = YES
-FILE_VERSION_FILTER =
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = TemplateKernelScriptTargetDirYYY
-FILE_PATTERNS = *.h \
- *.rh \
- *.hrh
-RECURSIVE = YES
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = YES
-VERBATIM_HEADERS = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 5
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = NO
-HTML_OUTPUT = html
-HTML_FILE_EXTENSION = .html
-HTML_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = YES
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-BINARY_TOC = YES
-TOC_EXPAND = YES
-DISABLE_INDEX = YES
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = YES
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT = latex
-LATEX_CMD_NAME = latex
-MAKEINDEX_CMD_NAME = makeindex
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-LATEX_HIDE_INDICES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = YES
-RTF_OUTPUT = Doc
-COMPACT_RTF = YES
-RTF_HYPERLINKS = YES
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT = man
-MAN_EXTENSION = .3
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-XML_OUTPUT = xml
-XML_SCHEMA =
-XML_DTD =
-XML_PROGRAMLISTING = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-PERLMOD_LATEX = NO
-PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = YES
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED = NONSHARABLE_CLASS
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-TAGFILES =
-GENERATE_TAGFILE =
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-PERL_PATH = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = YES
-HIDE_UNDOC_RELATIONS = YES
-HAVE_DOT = NO
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-GROUP_GRAPHS = YES
-UML_LOOK = NO
-TEMPLATE_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-CALL_GRAPH = NO
-GRAPHICAL_HIERARCHY = YES
-DIRECTORY_GRAPH = YES
-DOT_IMAGE_FORMAT = png
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1024
-MAX_DOT_GRAPH_DEPTH = 0
-DOT_TRANSPARENT = NO
-DOT_MULTI_TARGETS = NO
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
--- a/stif/TestModuleTemplates/TemplateKernelScriptXXX/group/TemplateKernelScriptXXX_DoxyFile.txt Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/TestModuleTemplates/TemplateKernelScriptXXX/group/TemplateKernelScriptXXX_DoxyFile.txt Fri Apr 16 16:37:27 2010 +0300
@@ -2,13 +2,14 @@
# 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 the License "Symbian Foundation License v1.0"
+# under the terms of "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
-# at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
# Initial Contributors:
# Nokia Corporation - initial contribution.
#
+#
# Contributors:
#
# Description:
--- a/stif/TestModuleTemplates/TemplateScriptXXX/group/TemplateScriptXXX_DoxyFile.py Tue Feb 02 01:57:15 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,239 +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 the License "Symbian Foundation License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-#
-
-# Doxyfile 1.4.1
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = TemplateScriptXXX
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = TemplateScriptTargetDirYYY
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-USE_WINDOWS_ENCODING = YES
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF =
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = NO
-JAVADOC_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP = NO
-INHERIT_DOCS = YES
-DISTRIBUTE_GROUP_DOC = NO
-TAB_SIZE = 8
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = YES
-OPTIMIZE_OUTPUT_JAVA = NO
-SUBGROUPING = YES
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = NO
-EXTRACT_LOCAL_CLASSES = NO
-EXTRACT_LOCAL_METHODS = NO
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = YES
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = YES
-SORT_BRIEF_DOCS = NO
-SORT_BY_SCOPE_NAME = NO
-GENERATE_TODOLIST = NO
-GENERATE_TESTLIST = NO
-GENERATE_BUGLIST = NO
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = YES
-SHOW_DIRECTORIES = YES
-FILE_VERSION_FILTER =
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = TemplateScriptTargetDirYYY
-FILE_PATTERNS = *.h \
- *.rh \
- *.hrh
-RECURSIVE = YES
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = YES
-VERBATIM_HEADERS = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 5
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = NO
-HTML_OUTPUT = html
-HTML_FILE_EXTENSION = .html
-HTML_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = YES
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-BINARY_TOC = YES
-TOC_EXPAND = YES
-DISABLE_INDEX = YES
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = YES
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT = latex
-LATEX_CMD_NAME = latex
-MAKEINDEX_CMD_NAME = makeindex
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-LATEX_HIDE_INDICES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = YES
-RTF_OUTPUT = Doc
-COMPACT_RTF = YES
-RTF_HYPERLINKS = YES
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT = man
-MAN_EXTENSION = .3
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-XML_OUTPUT = xml
-XML_SCHEMA =
-XML_DTD =
-XML_PROGRAMLISTING = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-PERLMOD_LATEX = NO
-PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = YES
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED = NONSHARABLE_CLASS
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-TAGFILES =
-GENERATE_TAGFILE =
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-PERL_PATH = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = YES
-HIDE_UNDOC_RELATIONS = YES
-HAVE_DOT = NO
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-GROUP_GRAPHS = YES
-UML_LOOK = NO
-TEMPLATE_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-CALL_GRAPH = NO
-GRAPHICAL_HIERARCHY = YES
-DIRECTORY_GRAPH = YES
-DOT_IMAGE_FORMAT = png
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1024
-MAX_DOT_GRAPH_DEPTH = 0
-DOT_TRANSPARENT = NO
-DOT_MULTI_TARGETS = NO
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
--- a/stif/TestModuleTemplates/TemplateScriptXXX/group/TemplateScriptXXX_DoxyFile.txt Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/TestModuleTemplates/TemplateScriptXXX/group/TemplateScriptXXX_DoxyFile.txt Fri Apr 16 16:37:27 2010 +0300
@@ -2,13 +2,14 @@
# 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 the License "Symbian Foundation License v1.0"
+# under the terms of "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
-# at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
# Initial Contributors:
# Nokia Corporation - initial contribution.
#
+#
# Contributors:
#
# Description:
Binary file stif/TestModuleTemplates/TestModuleTemplates.zip has changed
--- a/stif/TestModuleTemplates/TestModuleXXX/group/TestModuleXXX_DoxyFile.py Tue Feb 02 01:57:15 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,239 +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 the License "Symbian Foundation License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-#
-
-# Doxyfile 1.4.1
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = TestModuleXXX
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = TestModuleTargetDirYYY
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-USE_WINDOWS_ENCODING = YES
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF =
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = NO
-JAVADOC_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP = NO
-INHERIT_DOCS = YES
-DISTRIBUTE_GROUP_DOC = NO
-TAB_SIZE = 8
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = YES
-OPTIMIZE_OUTPUT_JAVA = NO
-SUBGROUPING = YES
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = NO
-EXTRACT_LOCAL_CLASSES = NO
-EXTRACT_LOCAL_METHODS = NO
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = YES
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = YES
-SORT_BRIEF_DOCS = NO
-SORT_BY_SCOPE_NAME = NO
-GENERATE_TODOLIST = NO
-GENERATE_TESTLIST = NO
-GENERATE_BUGLIST = NO
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = YES
-SHOW_DIRECTORIES = YES
-FILE_VERSION_FILTER =
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = TestModuleTargetDirYYY
-FILE_PATTERNS = *.h \
- *.rh \
- *.hrh
-RECURSIVE = YES
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = YES
-VERBATIM_HEADERS = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 5
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = NO
-HTML_OUTPUT = html
-HTML_FILE_EXTENSION = .html
-HTML_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = YES
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-BINARY_TOC = YES
-TOC_EXPAND = YES
-DISABLE_INDEX = YES
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = YES
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT = latex
-LATEX_CMD_NAME = latex
-MAKEINDEX_CMD_NAME = makeindex
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-LATEX_HIDE_INDICES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = YES
-RTF_OUTPUT = Doc
-COMPACT_RTF = YES
-RTF_HYPERLINKS = YES
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT = man
-MAN_EXTENSION = .3
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-XML_OUTPUT = xml
-XML_SCHEMA =
-XML_DTD =
-XML_PROGRAMLISTING = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-PERLMOD_LATEX = NO
-PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = YES
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED = NONSHARABLE_CLASS
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-TAGFILES =
-GENERATE_TAGFILE =
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-PERL_PATH = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = YES
-HIDE_UNDOC_RELATIONS = YES
-HAVE_DOT = NO
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-GROUP_GRAPHS = YES
-UML_LOOK = NO
-TEMPLATE_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-CALL_GRAPH = NO
-GRAPHICAL_HIERARCHY = YES
-DIRECTORY_GRAPH = YES
-DOT_IMAGE_FORMAT = png
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1024
-MAX_DOT_GRAPH_DEPTH = 0
-DOT_TRANSPARENT = NO
-DOT_MULTI_TARGETS = NO
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
--- a/stif/TestModuleTemplates/TestModuleXXX/group/TestModuleXXX_DoxyFile.txt Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/TestModuleTemplates/TestModuleXXX/group/TestModuleXXX_DoxyFile.txt Fri Apr 16 16:37:27 2010 +0300
@@ -2,13 +2,14 @@
# 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 the License "Symbian Foundation License v1.0"
+# under the terms of "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
-# at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
# Initial Contributors:
# Nokia Corporation - initial contribution.
#
+#
# Contributors:
#
# Description:
--- a/stif/TestScripter/src/TestScripter.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/TestScripter/src/TestScripter.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -2361,14 +2361,17 @@
iTestScripter->TestModuleIf().Printf( KPrintPriLow, _L("Runner"),
_L("%S"), &aKeyword );
- TName buf;
+ RBuf buf;
+ buf.CreateL(1024);
+ CleanupClosePushL(buf);
+
TPtrC tmp;
while( aItem->GetNextString( tmp ) == KErrNone )
{
if( buf.Length() + tmp.Length() >= buf.MaxLength() )
{
- break;
+ buf.ReAllocL(buf.MaxLength() + tmp.Length() * 10);
}
buf.Append( tmp );
buf.Append( _L(" ") );
@@ -2378,6 +2381,7 @@
_L("Test"),
_L("%S"), &buf);
RDebug::Print( _L("Print : Test : %S"), &buf );
+ CleanupStack::PopAndDestroy(&buf);
}
break;
case TTestKeywords::EAllowNextResult:
--- a/stif/TestServer/src/TestServerClient.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/TestServer/src/TestServerClient.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -103,16 +103,37 @@
{
TFileName serverName;
- TInt ret;
+ TInt ret = KErrNone;
- // Create global semaphore start-up
+ // Create global semaphore start-up. It will be indexed (if given name already exsists, index will be increased)
RSemaphore startSemaphore;
TName semaphoreName = _L("startupSemaphore");
semaphoreName.Append( aModuleName );
- ret = startSemaphore.CreateGlobal( semaphoreName, 0);
- if ( ret != KErrNone )
+ TInt x = 0;
+ RBuf semName;
+ ret = semName.Create(KMaxName);
+ if(ret != KErrNone)
+ {
+ RDebug::Print(_L("RTestServer::Connect() Could not create buffer for semaphore name [%d]"), ret);
+ return ret;
+ }
+ do
{
- startSemaphore.Close();
+ semName.Format(_L("%S%d"), &semaphoreName, x);
+ ret = startSemaphore.CreateGlobal(semName, 0);
+ RDebug::Print(_L("RTestServer::Connect() Creating global semaphore [%S] with result [%d]"), &semName, ret);
+ if(ret != KErrAlreadyExists)
+ {
+ semaphoreName.Copy(semName);
+ break;
+ }
+ x++;
+ } while (ETrue);
+ semName.Close();
+
+ if ( ret != KErrNone )
+ {
+ startSemaphore.Close();
return ret;
}
@@ -129,7 +150,18 @@
RProcess pr;
- ret = KErrNone;
+ // Data to be passed to new process. It will contain module name and synchronization semaphore name separated with space.
+ // I.e. it will be: "mymodule startupSemaphore0"
+ RBuf data;
+ ret = data.Create(KMaxName);
+ if(ret != KErrNone)
+ {
+ RDebug::Print(_L("RTestServer::Connect() Could not create buffer for data to be passed to process [%d]"), ret);
+ return ret;
+ }
+ data.Format(_L("%S %S"), &aModuleName, &semaphoreName);
+ RDebug::Print(_L("RTestServer::Connect() Data for new process prepared [%S]"), &data);
+
// Indication is Create() operation needed
TBool doCreate( ETrue );
@@ -138,11 +170,11 @@
// Create without path(Uses Symbian default path).
// Note: If TestScriter used then module name is format:
// testscripter_testcasefilename
- ret = pr.Create( aModuleName, aModuleName );
+
+ ret = pr.Create( aModuleName, data );
if( ret == KErrNone )
{
- RDebug::Print( _L( "Combination (1): Caps modifier[%S], Module[%S]" ),
- &aModuleName, &aModuleName );
+ RDebug::Print(_L("RTestServer::Connect() Combination (1): Caps modifier [%S], Data [%S]"), &aModuleName, &data);
doCreate = EFalse;
}
#endif // __WINS__
@@ -161,17 +193,16 @@
ret_caps = GetCapsModifier( aConfigFile, capsModifierName );
if( ret_caps != KErrNone )
{
- RDebug::Print( _L( "Caps modifier was not defined. Default modifier will be used" ) );
+ RDebug::Print( _L( "RTestServer::Connect() Caps modifier was not defined. Default modifier will be used" ) );
}
else
{
#ifdef __WINS__ // CodeWarrior(emulator)
// Create without path(Uses Symbian default path)
- ret = pr.Create( capsModifierName, aModuleName );
+ ret = pr.Create( capsModifierName, data );
if( ret == KErrNone )
{
- RDebug::Print( _L( "Combination (2): Caps modifier[%S], Module[%S]" ),
- &capsModifierName, &aModuleName );
+ RDebug::Print( _L( "RTestServer::Connect() Combination (2): Caps modifier [%S], Data [%S]"), &capsModifierName, &data);
doCreate = EFalse;
}
#endif // __WINS__
@@ -200,7 +231,7 @@
if( find_ret != KErrNone )
{
// Module was not found, using default exe: testserverstarter.exe
- RDebug::Print( _L( "Correct caps modifier module not found, capabilities cannot set" ) );
+ RDebug::Print( _L( "RTestServer::Connect() Correct caps modifier module not found, capabilities cannot set" ) );
if ( aModuleName.Find( _L( "testscripter_ui_" ) ) == 0 )
{
pathAndExeModule.Copy( KDefaultUiExeName );
@@ -213,8 +244,9 @@
if( trapd_ret != KErrNone )
{
// FindExeL fails
- RDebug::Print( _L( "Caps modifier module searching fails with error: %d" ), trapd_ret );
+ RDebug::Print( _L( "RTestServer::Connect() Caps modifier module searching fails with error: %d" ), trapd_ret );
startSemaphore.Close();
+ data.Close();
return trapd_ret;
}
@@ -222,16 +254,17 @@
if ( doCreate )
{
- ret = pr.Create( pathAndExeModule, aModuleName );
+ ret = pr.Create( pathAndExeModule, data );
RDebug::Print(
- _L( "Combination (3): Caps modifier[%S], Module[%S]. Result: %d" ),
- &pathAndExeModule, &aModuleName, ret );
+ _L( "RTestServer::Connect() Combination (3): Caps modifier [%S], Data [%S], Result [%d]" ),
+ &pathAndExeModule, &data, ret );
}
-
+ data.Close();
+
if ( ret != KErrNone )
{
- startSemaphore.Close();
+ startSemaphore.Close();
return ret;
}
--- a/stif/TestServer/src/Testserversession.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/TestServer/src/Testserversession.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -646,8 +646,14 @@
// Get data from message
TFileName config;
TRAPD( res, aMessage.ReadL( 0, config ) );
- if( res != KErrNone )
+ if(res == KErrDied)
{
+ RDebug::Print(_L("CTestModule::EnumerateTestCasesL() Reading from RMessage ended with KErrDied. Client is not alive anymore and this request will be ignored"));
+ return res;
+ }
+ else if( res != KErrNone )
+ {
+ RDebug::Print(_L("CTestModule::EnumerateTestCasesL() #1 Panic client with [%d], res=[%d]"), EBadDescriptor, res);
PanicClient( EBadDescriptor, aMessage );
return res;
}
@@ -702,8 +708,14 @@
TPckgBuf<TInt> countPckg( testCases->Count() );
TRAP( res, aMessage.WriteL( 1, countPckg ) );
- if( res != KErrNone )
+ if(res == KErrDied)
{
+ RDebug::Print(_L("CTestModule::EnumerateTestCasesL() Writing to RMessage ended with KErrDied. Client is not alive anymore and this request will be ignored"));
+ return res;
+ }
+ else if( res != KErrNone )
+ {
+ RDebug::Print(_L("CTestModule::EnumerateTestCasesL() #2 Panic client with [%d], res=[%d], config=[%S]"), EBadDescriptor, res, &config);
PanicClient( EBadDescriptor, aMessage );
return res;
}
--- a/stif/TestServerStarter/src/TestServerStarter.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/TestServerStarter/src/TestServerStarter.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -50,7 +50,7 @@
GLDEF_C TInt E32Main()
{
- RDebug::Print(_L("New process starting"));
+ RDebug::Print(_L("STIF: New process starting"));
// Get module name from command line
const TInt length = User().CommandLineLength();
@@ -66,13 +66,21 @@
User().CommandLine( moduleName );
- RDebug::Print (moduleName);
+ RDebug::Print(_L("STIF: Received data [%S]"), &moduleName);
+
+ // Extract semaphore name passed in data
+ TInt index = moduleName.Find(_L(" "));
+ RDebug::Print(_L("STIF: Space separator found at position [%d]"), index);
+ TPtrC semaphoreName = moduleName.Mid(index + 1);
+ moduleName = moduleName.Left(index);
+
+ RDebug::Print(_L("STIF: Extracted module name [%S] and sempahore name [%S]"), &moduleName, &semaphoreName);
// Open start-up synchronization semaphore
RSemaphore startup;
RDebug::Print(_L(" Openingstart-up semaphore"));
- TName semaphoreName = _L("startupSemaphore");
- semaphoreName.Append( moduleName );
+ //TName semaphoreName = _L("startupSemaphore");
+ //semaphoreName.Append( moduleName );
TInt res = startup.OpenGlobal(semaphoreName);
RDebug::Print(_L("Opening result %d"), res);
--- a/stif/TouchConsoleUI/src/ConsoleUI.cpp Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/TouchConsoleUI/src/ConsoleUI.cpp Fri Apr 16 16:37:27 2010 +0300
@@ -21,7 +21,7 @@
#include <e32cons.h>
#include <e32svr.h>
#include <f32file.h>
-#include <HAL.h>
+#include <hal.h>
#include <hal_data.h>
--- a/stif/examples/STIFTestMeasurementStub/group/STIFTestMeasurementStub_DoxyFile.py Tue Feb 02 01:57:15 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,237 +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 the License "Symbian Foundation License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-#
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME = STIFTestMeasurementStub
-PROJECT_NUMBER =
-OUTPUT_DIRECTORY = w:\STIFTestMeasurementStub\
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-USE_WINDOWS_ENCODING = YES
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF =
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = NO
-STRIP_FROM_PATH =
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = NO
-JAVADOC_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP = NO
-INHERIT_DOCS = YES
-DISTRIBUTE_GROUP_DOC = NO
-TAB_SIZE = 8
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = YES
-OPTIMIZE_OUTPUT_JAVA = NO
-SUBGROUPING = YES
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = YES
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = NO
-EXTRACT_LOCAL_CLASSES = NO
-EXTRACT_LOCAL_METHODS = NO
-HIDE_UNDOC_MEMBERS = NO
-HIDE_UNDOC_CLASSES = NO
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = YES
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = YES
-SORT_BRIEF_DOCS = NO
-SORT_BY_SCOPE_NAME = NO
-GENERATE_TODOLIST = NO
-GENERATE_TESTLIST = NO
-GENERATE_BUGLIST = NO
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = YES
-SHOW_DIRECTORIES = YES
-FILE_VERSION_FILTER =
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text"
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = w:\STIFTestMeasurementStub\
-FILE_PATTERNS = *.h \
- *.rh \
- *.hrh
-RECURSIVE = YES
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXAMPLE_PATH =
-EXAMPLE_PATTERNS =
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = NO
-INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = YES
-VERBATIM_HEADERS = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = NO
-COLS_IN_ALPHA_INDEX = 5
-IGNORE_PREFIX =
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = NO
-HTML_OUTPUT = html
-HTML_FILE_EXTENSION = .html
-HTML_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = YES
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-BINARY_TOC = YES
-TOC_EXPAND = YES
-DISABLE_INDEX = YES
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = YES
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = NO
-LATEX_OUTPUT = latex
-LATEX_CMD_NAME = latex
-MAKEINDEX_CMD_NAME = makeindex
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = NO
-USE_PDFLATEX = NO
-LATEX_BATCHMODE = NO
-LATEX_HIDE_INDICES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = YES
-RTF_OUTPUT = Doc
-COMPACT_RTF = YES
-RTF_HYPERLINKS = YES
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT = man
-MAN_EXTENSION = .3
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-XML_OUTPUT = xml
-XML_SCHEMA =
-XML_DTD =
-XML_PROGRAMLISTING = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-PERLMOD_LATEX = NO
-PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = YES
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED = NONSHARABLE_CLASS
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-TAGFILES =
-GENERATE_TAGFILE =
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-PERL_PATH = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = YES
-HIDE_UNDOC_RELATIONS = YES
-HAVE_DOT = NO
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-GROUP_GRAPHS = YES
-UML_LOOK = NO
-TEMPLATE_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-CALL_GRAPH = NO
-GRAPHICAL_HIERARCHY = YES
-DIRECTORY_GRAPH = YES
-DOT_IMAGE_FORMAT = png
-DOT_PATH =
-DOTFILE_DIRS =
-MAX_DOT_GRAPH_WIDTH = 1024
-MAX_DOT_GRAPH_HEIGHT = 1024
-MAX_DOT_GRAPH_DEPTH = 0
-DOT_TRANSPARENT = NO
-DOT_MULTI_TARGETS = NO
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = NO
--- a/stif/examples/STIFTestMeasurementStub/group/STIFTestMeasurementStub_DoxyFile.txt Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/examples/STIFTestMeasurementStub/group/STIFTestMeasurementStub_DoxyFile.txt Fri Apr 16 16:37:27 2010 +0300
@@ -2,13 +2,14 @@
# 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 the License "Symbian Foundation License v1.0"
+# under the terms of "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
-# at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
# Initial Contributors:
# Nokia Corporation - initial contribution.
#
+#
# Contributors:
#
# Description:
--- a/stif/group/ReleaseNote.txt Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/group/ReleaseNote.txt Fri Apr 16 16:37:27 2010 +0300
@@ -1,5 +1,5 @@
========================================================================
-RELEASE NOTE FOR STIF - STIF_200952 (7.3.23)
+RELEASE NOTE FOR STIF - STIF_201010 (7.3.28)
SUPPORTING SERIES 60 3.0 ->
========================================================================
--- a/stif/group/bld.inf Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/group/bld.inf Fri Apr 16 16:37:27 2010 +0300
@@ -56,8 +56,8 @@
// Test Server Starter
#include "../TestServerStarter/group/bld.inf"
- // StifTfwIf
- #include "../StifTfwIf/group/bld.inf"
+ // StifTFwIf
+ #include "../StifTFwIf/group/bld.inf"
// Console UI
#include "../ConsoleUI/group/bld.inf"
--- a/stif/inc/STIFMeasurement.h Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/inc/STIFMeasurement.h Fri Apr 16 16:37:27 2010 +0300
@@ -19,7 +19,7 @@
#define STIF_MEASUREMENT_H
// INCLUDES
-#include <E32Base.h>
+#include <e32base.h>
// Maximum length of measurement types(see literals below)
const TInt KStifMeasurementTypeLength = 30;
--- a/stif/inc/StifPython.h Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/inc/StifPython.h Fri Apr 16 16:37:27 2010 +0300
@@ -21,7 +21,7 @@
#define STIFPYTHON_H
// INCLUDES
-#include <E32Base.h>
+#include <e32base.h>
// CONSTANTS
_LIT(KPythonScripter, "pythonscripter");
--- a/stif/inc/version.h Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/inc/version.h Fri Apr 16 16:37:27 2010 +0300
@@ -20,9 +20,9 @@
#define STIF_MAJOR_VERSION 7
#define STIF_MINOR_VERSION 3
-#define STIF_BUILD_VERSION 23
+#define STIF_BUILD_VERSION 28
-#define STIF_REL_DATE "22nd Dec 2009"
+#define STIF_REL_DATE "09th Mar 2010"
#define TO_UNICODE(text) _L(text)
Binary file stif/sis/Stif_31.sis has changed
--- a/stif/stif_plat/inc/StifCommand.h Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/stif_plat/inc/StifCommand.h Fri Apr 16 16:37:27 2010 +0300
@@ -21,7 +21,7 @@
// INCLUDES
-#include <E32Base.h>
+#include <e32base.h>
// CONSTANTS
const TInt KMaxCommandParamsLength = 50; // DEPRECATED use KMaxCommandParamsLength2 instead
--- a/stif/stif_plat/inc/StifUnitGeneric.h Tue Feb 02 01:57:15 2010 +0200
+++ b/stif/stif_plat/inc/StifUnitGeneric.h Fri Apr 16 16:37:27 2010 +0300
@@ -461,13 +461,14 @@
{
return STIF_UNIT_MODULE_CLASS_NAME::NewL();
}
-
+#ifndef STIFUNIT_SETHEAPANDSTACKSIZE
EXPORT_C TInt SetRequirements( CTestModuleParam*& /*aTestModuleParam*/,
TUint32& /*aParameterValid*/ )
{
return KErrNone;
}
+#endif
#endif // StifUnitGeneric_H
// End of File