201044_04 default tip
authorhgs
Thu, 04 Nov 2010 15:31:42 +0800
changeset 60 841f70763fbe
parent 52 866b4af7ffbe
201044_04
layers.sysdef.xml
localconnectivityservice/dun/atext/inc/DunAtCmdPusher.h
localconnectivityservice/dun/atext/inc/DunAtEcomListen.h
localconnectivityservice/dun/atext/inc/DunAtModeListen.h
localconnectivityservice/dun/atext/inc/DunAtNvramListen.h
localconnectivityservice/dun/atext/inc/DunAtUrcHandler.h
localconnectivityservice/dun/atext/src/DunAtCmdHandler.cpp
localconnectivityservice/dun/atext/src/DunAtCmdPusher.cpp
localconnectivityservice/dun/atext/src/DunAtEcomListen.cpp
localconnectivityservice/dun/atext/src/DunAtModeListen.cpp
localconnectivityservice/dun/atext/src/DunAtNvramListen.cpp
localconnectivityservice/dun/atext/src/DunAtUrcHandler.cpp
localconnectivityservice/dun/plugins/inc/bt/DunBtListen.h
localconnectivityservice/dun/plugins/inc/usb/DunUsbConfig.h
localconnectivityservice/dun/plugins/inc/usb/DunUsbListen.h
localconnectivityservice/dun/plugins/src/bt/DunBtListen.cpp
localconnectivityservice/dun/plugins/src/usb/DunUsbConfig.cpp
localconnectivityservice/dun/plugins/src/usb/DunUsbListen.cpp
localconnectivityservice/dun/rom/dunresources.iby
localconnectivityservice/dun/server/inc/DunCloseWait.h
localconnectivityservice/dun/server/src/DunCloseWait.cpp
localconnectivityservice/dun/utils/data/dunutils.rss
localconnectivityservice/dun/utils/group/bld.inf
localconnectivityservice/dun/utils/group/dunutils.mmp
localconnectivityservice/dun/utils/inc/DunDataPusher.h
localconnectivityservice/dun/utils/inc/DunDataWaiter.h
localconnectivityservice/dun/utils/inc/DunNoteHandler.h
localconnectivityservice/dun/utils/inc/DunSignalCopy.h
localconnectivityservice/dun/utils/inc/DunSignalNotify.h
localconnectivityservice/dun/utils/inc/DunSignalWaiter.h
localconnectivityservice/dun/utils/inc/DunStream.h
localconnectivityservice/dun/utils/inc/DunTransporter.h
localconnectivityservice/dun/utils/inc/DunUpstream.h
localconnectivityservice/dun/utils/loc/dunutils.loc
localconnectivityservice/dun/utils/src/DunDataPusher.cpp
localconnectivityservice/dun/utils/src/DunDataWaiter.cpp
localconnectivityservice/dun/utils/src/DunDownstream.cpp
localconnectivityservice/dun/utils/src/DunNoteHandler.cpp
localconnectivityservice/dun/utils/src/DunSignalCopy.cpp
localconnectivityservice/dun/utils/src/DunSignalNotify.cpp
localconnectivityservice/dun/utils/src/DunSignalWaiter.cpp
localconnectivityservice/dun/utils/src/DunStream.cpp
localconnectivityservice/dun/utils/src/DunUpstream.cpp
localconnectivityservice/locod/group/locod.mmp
localconnectivityservice/locod/tsrc/locodTest/BWINS/locoddaemonmtU.def
localconnectivityservice/locod/tsrc/locodTest/eabi/locoddaemonmtu.def
localconnectivityservice/locod/tsrc/locodTest/group/bld.inf
localconnectivityservice/locod/tsrc/locodTest/group/locoddaemonmt.mmp
localconnectivityservice/locod/tsrc/locodTest/group/locoddaemonmt.pkg
localconnectivityservice/locod/tsrc/locodTest/inc/BtSettings.h
localconnectivityservice/locod/tsrc/locodTest/inc/daemonmt.h
localconnectivityservice/locod/tsrc/locodTest/init/locoddaemonmt.ini
localconnectivityservice/locod/tsrc/locodTest/src/BtSettings.cpp
localconnectivityservice/locod/tsrc/locodTest/src/daemonmt.cpp
localconnectivityservice/locod/tsrc/locodTest/src/daemonmtCases.cpp
mtpdataproviders/mtpfileandfolderdp/src/cmtpfiledp.cpp
mtpdataproviders/mtpimagedp/inc/cmtpimagedpdeleteobject.h
mtpdataproviders/mtpimagedp/src/cmtpimagedpdeleteobject.cpp
mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobjectproplist.cpp
mtpdataproviders/mtppictbridgedp/inc/s60dependency.h
mtpdataproviders/mtppictbridgedp/pictbridgeengine/src/dpsconnectnotifier.cpp
mtpdataproviders/mtppictbridgedp/pictbridgeengine/src/dpsptpnotifier.cpp
mtpdataproviders/mtppictbridgedp/pictbridgeengine/src/dpsusbnotifier.cpp
mtpdataproviders/mtpplaybackcontroldp/group/bld.inf
mtpdataproviders/mtpplaybackcontroldp/src/cmtpplaybackcontroldp.cpp
mtpfws/mtpfw/daemon/server/src/cmtpserver.cpp
mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedp.cpp
mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetdevicepropdesc.cpp
mtpfws/mtpfw/dataproviders/dputility/inc/cmtpcopyobject.h
mtpfws/mtpfw/dataproviders/dputility/inc/cmtpmoveobject.h
mtpfws/mtpfw/dataproviders/dputility/src/cmtpcopyobject.cpp
mtpfws/mtpfw/dataproviders/dputility/src/cmtpmoveobject.cpp
mtpfws/mtpfw/dataproviders/proxydp/inc/cmtpdeleteobject.h
mtpfws/mtpfw/dataproviders/proxydp/inc/cmtpgetobjectproplist.h
mtpfws/mtpfw/dataproviders/proxydp/inc/cmtpgetobjectpropssupported.h
mtpfws/mtpfw/dataproviders/proxydp/inc/cmtpsetobjectproplist.h
mtpfws/mtpfw/dataproviders/proxydp/src/cmtpdeleteobject.cpp
mtpfws/mtpfw/dataproviders/proxydp/src/cmtpgetobjectproplist.cpp
mtpfws/mtpfw/dataproviders/proxydp/src/cmtpgetobjectpropssupported.cpp
mtpfws/mtpfw/dataproviders/proxydp/src/cmtpsetobjectproplist.cpp
mtpfws/mtpfw/inc/cmtpobjectstore.h
mtpfws/mtpfw/inc/mtpcommonconst.h
mtpfws/mtpfw/src/cmtpconnectionmgr.cpp
mtpfws/mtpfw/src/cmtpdataprovider.cpp
mtpfws/mtpfw/src/cmtpdataprovidercontroller.cpp
mtpfws/mtpfw/src/cmtpdeltadatamgr.cpp
mtpfws/mtpfw/src/cmtpobjectstore.cpp
mtptransports/mtpcontroller/group/mtpcontroller.mmp
mtptransports/mtpcontroller/locodinc/locodbearer.h
mtptransports/mtpcontroller/locodinc/locodplugin.hrh
mtptransports/mtpcontroller/locodinc/locodserviceplugin.h
mtptransports/mtpcontroller/locodinc/locodserviceplugin.inl
mtptransports/mtpcontroller/locodinc/locodservicepluginobserver.h
mtptransports/mtpcontroller/locodinc/locodservicepluginparams.h
mtptransports/mtpcontroller/locodinc/locodservicepluginparams.inl
mtptransports/mtpcontroller/src/cmtpcontrollertimer.cpp
mtptransports/mtpptpiptransport/ptpipplugin/src/cptpipconnection.cpp
package_definition.xml
--- a/layers.sysdef.xml	Tue Sep 28 20:14:08 2010 +0800
+++ b/layers.sysdef.xml	Thu Nov 04 15:31:42 2010 +0800
@@ -83,8 +83,6 @@
 			
       <module name="from_package_definition">      
       	<unit name="mtpcontroller" unitID="smw.mtptransports.mtpcontroller" bldFile="sf\mw\remoteconn\mtptransports\mtpcontroller\group" mrp=""/>
-      	<unit name="obexprotocol" unitID="smw.obex.obexprotocol" bldFile="sf\mw\remoteconn\obex\obexprotocol\group" mrp=""/>
-      	<unit name="obexextensionapi" unitID="smw.obex.obexextensionapi" bldFile="sf\mw\remoteconn\obex\obexextensionapi\group" mrp=""/>
       </module>      		
     </layer>
   </systemModel>
--- a/localconnectivityservice/dun/atext/inc/DunAtCmdPusher.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/atext/inc/DunAtCmdPusher.h	Thu Nov 04 15:31:42 2010 +0800
@@ -138,9 +138,9 @@
      * Stops AT command handling
      *
      * @since TB9.2
-     * @return Symbian error code on error, KErrNone otherwise
+     * @return None
      */
-    TInt Stop();
+    void Stop();
 
     /**
      * Manages request to abort command handling
--- a/localconnectivityservice/dun/atext/inc/DunAtEcomListen.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/atext/inc/DunAtEcomListen.h	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -107,9 +107,9 @@
      * Stops waiting for Ecom plugin install/uninstall/version status changes
      *
      * @since TB9.2
-     * @return Symbian error code on error, KErrNone otherwise
+     * @return None
      */
-    TInt Stop();
+    void Stop();
 
 private:
 
@@ -161,11 +161,6 @@
     MDunAtEcomListen* iCallback;
 
     /**
-     * Current state of ECom interface listening: active or inactive
-     */
-    TDunState iEcomListenState;
-
-    /**
      * UID of the installed, uninstalled or changed plugin
      */
     TUid iPluginUid;
--- a/localconnectivityservice/dun/atext/inc/DunAtModeListen.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/atext/inc/DunAtModeListen.h	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -99,9 +99,9 @@
      * Stops monitoring for mode status changes
      *
      * @since TB9.2
-     * @return Symbian error code on error, KErrNone otherwise
+     * @return None
      */
-    TInt Stop();
+    void Stop();
 
 private:
 
@@ -153,11 +153,6 @@
     MDunAtModeListen* iCallback;
 
     /**
-     * Current state of mode listening: active or inactive
-     */
-    TDunState iModeListenState;
-
-    /**
      * Stored mode status change
      */
     TUint iMode;
--- a/localconnectivityservice/dun/atext/inc/DunAtNvramListen.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/atext/inc/DunAtNvramListen.h	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -78,9 +78,9 @@
      * Stops waiting for NVRAM status changes
      *
      * @since TB9.2
-     * @return Symbian error code on error, KErrNone otherwise
+     * @return None
      */
-    TInt Stop();
+    void Stop();
 
 private:
 
@@ -132,11 +132,6 @@
     RATExtCommon* iAtCmdExtCommon;
 
     /**
-     * Current state of NVRAM status change listening; active or inactive
-     */
-    TDunState iNvramHandleState;
-
-    /**
      * Buffer for NVRAM
      */
     TBuf8<KDefaultNvramBufLength> iNvramBuffer;
--- a/localconnectivityservice/dun/atext/inc/DunAtUrcHandler.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/atext/inc/DunAtUrcHandler.h	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -79,9 +79,9 @@
      * Stops waiting for an incoming URC message
      *
      * @since TB9.2
-     * @return Symbian error code on error, KErrNone otherwise
+     * @return None
      */
-    TInt Stop();
+    void Stop();
 
     /**
      * UID of the owning plugin
@@ -153,11 +153,6 @@
     MDunStreamManipulator* iStreamCallback;
 
     /**
-     * Current state of URC message handling: active or inactive
-     */
-    TDunState iUrcHandleState;
-
-    /**
      * Buffer for receiving
      */
     TBuf8<KDefaultUrcBufLength> iRecvBuffer;
--- a/localconnectivityservice/dun/atext/src/DunAtCmdHandler.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/atext/src/DunAtCmdHandler.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -307,14 +307,13 @@
     {
     FTRACE(FPrint( _L("CDunAtCmdHandler::StopUrc()") ));
     TInt i;
-    TInt retVal = KErrNone;
     TInt count = iUrcHandlers.Count();
     for ( i=0; i<count; i++ )
         {
-        retVal = iUrcHandlers[i]->Stop();
+        iUrcHandlers[i]->Stop();
         }
     FTRACE(FPrint( _L("CDunAtCmdHandler::StopUrc() complete") ));
-    return retVal;
+    return KErrNone;
     }
 
 // ---------------------------------------------------------------------------
@@ -1385,7 +1384,7 @@
     // We still need to save the iParseInfo.iLimit and skip non-delimiter characters.
     if ( aCharacter == '=' )
         {
-        if ( iParseInfo.iLimit < 0 )  // Only first the first '"'
+        if ( iParseInfo.iLimit < 0 )  // Only the first '"'
             {
             iParseInfo.iLimit = aEndIndex - aStartIndex;
             }
--- a/localconnectivityservice/dun/atext/src/DunAtCmdPusher.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/atext/src/DunAtCmdPusher.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -118,7 +118,6 @@
         FTRACE(FPrint( _L("CDunAtCmdPusher::IssueRequest() (in queue!) complete") ));
         return KErrGeneral;
         }
-    iStatus = KRequestPending;
     iAtPushState = EDunStateAtCmdPushing;
     iAtCmdExt->HandleCommand( iStatus,
                               aInput,
@@ -134,22 +133,13 @@
 // Stops AT command handling
 // ---------------------------------------------------------------------------
 //
-TInt CDunAtCmdPusher::Stop()
+void CDunAtCmdPusher::Stop()
     {
     FTRACE(FPrint( _L("CDunAtCmdPusher::Stop()") ));
     SetEndOfCmdLine();
-    if ( iAtPushState != EDunStateAtCmdPushing )
-        {
-        FTRACE(FPrint( _L("CDunAtCmdHandler::Stop() (not ready) complete" )));
-        return KErrNotReady;
-        }
-    // As the EDunStateAtCmdHandling can be set even when the actual request
-    // has completed (when replying with NotifyDataPushComplete() and setting
-    // idle eventually), cancel the actual operation in DoCancel()
     Cancel();
     iAtPushState = EDunStateIdle;
     FTRACE(FPrint( _L("CDunAtCmdPusher::Stop() complete") ));
-    return KErrNone;
     }
 
 // ---------------------------------------------------------------------------
--- a/localconnectivityservice/dun/atext/src/DunAtEcomListen.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/atext/src/DunAtEcomListen.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -80,13 +80,11 @@
 TInt CDunAtEcomListen::IssueRequest()
     {
     FTRACE(FPrint( _L("CDunAtEcomListen::IssueRequest()") ));
-    if ( iEcomListenState != EDunStateIdle )
+    if ( IsActive() )
         {
         FTRACE(FPrint( _L("CDunAtEcomListen::IssueRequest() (not ready) complete") ));
         return KErrNotReady;
         }
-    iStatus = KRequestPending;
-    iEcomListenState = EDunStateEcomListening;
     iAtCmdExt->ReceiveEcomPluginChange( iStatus, iPluginUidPckg, iEcomTypePckg );
     SetActive();
     FTRACE(FPrint( _L("CDunAtEcomListen::IssueRequest() complete") ));
@@ -97,19 +95,11 @@
 // Stops waiting for Ecom plugin install/uninstall/version status changes
 // ---------------------------------------------------------------------------
 //
-TInt CDunAtEcomListen::Stop()
+void CDunAtEcomListen::Stop()
     {
     FTRACE(FPrint( _L("CDunAtEcomListen::Stop()") ));
-    if ( iEcomListenState != EDunStateEcomListening )
-        {
-        FTRACE(FPrint( _L("CDunAtEcomListen::Stop() (not ready) complete" )));
-        return KErrNotReady;
-        }
-    iAtCmdExt->CancelReceiveEcomPluginChange();
     Cancel();
-    iEcomListenState = EDunStateIdle;
     FTRACE(FPrint( _L("CDunAtEcomListen::Stop() complete") ));
-    return KErrNone;
     }
 
 // ---------------------------------------------------------------------------
@@ -150,7 +140,6 @@
     {
     // Don't initialize iAtCmdExt here (it is set through NewL)
     // Don't initialize iCallback here (it is set through NewL)
-    iEcomListenState = EDunStateIdle;
     iPluginUid = TUid::Null();
     }
 
@@ -162,7 +151,6 @@
 void CDunAtEcomListen::RunL()
     {
     FTRACE(FPrint( _L("CDunAtEcomListen::RunL()") ));
-    iEcomListenState = EDunStateIdle;
     TInt retTemp = iStatus.Int();
     if ( retTemp != KErrNone )
         {
@@ -195,5 +183,6 @@
 void CDunAtEcomListen::DoCancel()
     {
     FTRACE(FPrint( _L("CDunAtEcomListen::DoCancel()") ));
+    iAtCmdExt->CancelReceiveEcomPluginChange();
     FTRACE(FPrint( _L("CDunAtEcomListen::DoCancel() complete") ));
     }
--- a/localconnectivityservice/dun/atext/src/DunAtModeListen.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/atext/src/DunAtModeListen.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -78,13 +78,11 @@
 TInt CDunAtModeListen::IssueRequest()
     {
     FTRACE(FPrint( _L("CDunAtModeListen::IssueRequest()" )));
-    if ( iModeListenState != EDunStateIdle )
+    if ( IsActive() )
         {
         FTRACE(FPrint( _L("CDunAtModeListen::IssueRequest() (not ready) complete" ) ));
         return KErrNotReady;
         }
-    iStatus = KRequestPending;
-    iModeListenState = EDunStateModeListening;
     iAtCmdExtCommon->ReceiveModeStatusChange( iStatus, iModePckg );
     SetActive();
     FTRACE(FPrint( _L("CDunAtModeListen::IssueRequest() complete" )));
@@ -95,19 +93,11 @@
 // Stops monitoring for mode status changes
 // ---------------------------------------------------------------------------
 //
-TInt CDunAtModeListen::Stop()
+void CDunAtModeListen::Stop()
     {
     FTRACE(FPrint( _L("CDunAtModeListen::Stop()" )));
-    if ( iModeListenState != EDunStateModeListening )
-        {
-        FTRACE(FPrint( _L("CDunAtModeListen::Stop() (not ready) complete" ) ));
-        return KErrNotReady;
-        }
-    iAtCmdExtCommon->CancelReceiveModeStatusChange();
     Cancel();
-    iModeListenState = EDunStateIdle;
     FTRACE(FPrint( _L("CDunAtModeListen::Stop() complete" )));
-    return KErrNone;
     }
 
 // ---------------------------------------------------------------------------
@@ -147,7 +137,6 @@
     {
     // Don't initialize iAtCmdExtCommon here (it is set through NewL)
     // Don't initialize iCallback here (it is set through NewL)
-    iModeListenState = EDunStateIdle;
     iMode = 0;
     }
 
@@ -159,7 +148,6 @@
 void CDunAtModeListen::RunL()
     {
     FTRACE(FPrint( _L("CDunAtModeListen::RunL()") ));
-    iModeListenState = EDunStateIdle;
     TInt retTemp = iStatus.Int();
     if ( retTemp != KErrNone )
         {
@@ -180,5 +168,6 @@
 void CDunAtModeListen::DoCancel()
     {
     FTRACE(FPrint( _L("CDunAtModeListen::DoCancel()") ));
+    iAtCmdExtCommon->CancelReceiveModeStatusChange();
     FTRACE(FPrint( _L("CDunAtModeListen::DoCancel() complete") ));
     }
--- a/localconnectivityservice/dun/atext/src/DunAtNvramListen.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/atext/src/DunAtNvramListen.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -79,7 +79,7 @@
 TInt CDunAtNvramListen::IssueRequest()
     {
     FTRACE(FPrint( _L("CDunAtNvramListen::IssueRequest()") ));
-    if ( iNvramHandleState != EDunStateIdle )
+    if ( IsActive() )
         {
         FTRACE(FPrint( _L("CDunAtNvramListen::IssueRequest() (not ready) complete") ));
         return KErrNotReady;
@@ -90,8 +90,6 @@
         iAtCmdExt->BroadcastNvramStatusChange( iNvramBuffer );
         iStarted = ETrue;
         }
-    iStatus = KRequestPending;
-    iNvramHandleState = EDunStateNvramListening;
     iAtCmdExtCommon->ReceiveNvramStatusChange( iStatus, iNvramBuffer );
     SetActive();
     FTRACE(FPrint( _L("CDunAtNvramListen::IssueRequest() complete") ));
@@ -102,20 +100,12 @@
 // Stops waiting for NVRAM status changes
 // ---------------------------------------------------------------------------
 //
-TInt CDunAtNvramListen::Stop()
+void CDunAtNvramListen::Stop()
     {
     FTRACE(FPrint( _L("CDunAtNvramListen::Stop()") ));
-    if ( iNvramHandleState != EDunStateNvramListening )
-        {
-        FTRACE(FPrint( _L("CDunAtNvramListen::Stop() (not ready) complete" )));
-        return KErrNotReady;
-        }
-    iAtCmdExtCommon->CancelReceiveNvramStatusChange();
     Cancel();
-    iNvramHandleState = EDunStateIdle;
     FTRACE(FPrint( _L("CDunAtNvramListen::Stop() complete") ));
     // Note: Don't mark iStarted to EFalse here!
-    return KErrNone;
     }
 
 // ---------------------------------------------------------------------------
@@ -154,7 +144,6 @@
     {
     // Don't initialize iAtCmdExt here (it is set through NewL)
     // Don't initialize iAtCmdExtCommon here (it is set through NewL)
-    iNvramHandleState = EDunStateIdle;
     iStarted = EFalse;
     }
 
@@ -166,7 +155,6 @@
 void CDunAtNvramListen::RunL()
     {
     FTRACE(FPrint( _L("CDunAtNvramListen::RunL()") ));
-    iNvramHandleState = EDunStateIdle;
     TInt retTemp = iStatus.Int();
     if ( retTemp != KErrNone )
         {
@@ -186,5 +174,6 @@
 void CDunAtNvramListen::DoCancel()
     {
     FTRACE(FPrint( _L("CDunAtNvramListen::DoCancel()") ));
+    iAtCmdExtCommon->CancelReceiveNvramStatusChange();
     FTRACE(FPrint( _L("CDunAtNvramListen::DoCancel() complete") ));
     }
--- a/localconnectivityservice/dun/atext/src/DunAtUrcHandler.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/atext/src/DunAtUrcHandler.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -84,13 +84,11 @@
 TInt CDunAtUrcHandler::IssueRequest()
     {
     FTRACE(FPrint( _L("CDunAtUrcHandler::IssueRequest()") ));
-    if ( iUrcHandleState != EDunStateIdle )
+    if ( IsActive() )
         {
         FTRACE(FPrint( _L("CDunAtUrcHandler::IssueRequest() (not ready) complete") ));
         return KErrNotReady;
         }
-    iStatus = KRequestPending;
-    iUrcHandleState = EDunStateAtUrcHandling;
     iAtCmdExt->ReceiveUnsolicitedResult( iStatus, iRecvBuffer, iOwnerUidPckg );
     SetActive();
     // Next mark ownership
@@ -112,20 +110,12 @@
 // Stops waiting for an incoming URC message
 // ---------------------------------------------------------------------------
 //
-TInt CDunAtUrcHandler::Stop()
+void CDunAtUrcHandler::Stop()
     {
     FTRACE(FPrint( _L("CDunAtUrcHandler::Stop()") ));
-    if ( iUrcHandleState != EDunStateAtUrcHandling )
-        {
-        FTRACE(FPrint( _L("CDunAtUrcHandler::Stop() (not ready) complete" )));
-        return KErrNotReady;
-        }
-    iAtCmdExt->CancelReceiveUnsolicitedResult( iOwnerUid );
     Cancel();
-    iUrcHandleState = EDunStateIdle;
     FTRACE(FPrint( _L("CDunAtUrcHandler::Stop() complete") ));
     // Note: Don't mark iStarted to EFalse here as it is used to get the UID
-    return KErrNone;
     }
 
 // ---------------------------------------------------------------------------
@@ -173,7 +163,6 @@
 void CDunAtUrcHandler::Initialize()
     {
     // Don't initialize iStreamCallback here (it is set through NewL)
-    iUrcHandleState = EDunStateIdle;
     iOwnerUid = TUid::Null();
     iStarted = EFalse;
     }
@@ -186,7 +175,6 @@
 void CDunAtUrcHandler::RunL()
     {
     FTRACE(FPrint( _L("CDunAtUrcHandler::RunL()") ));
-    iUrcHandleState = EDunStateIdle;
     TInt retTemp = iStatus.Int();
     if ( retTemp != KErrNone )
         {
@@ -214,6 +202,7 @@
 void CDunAtUrcHandler::DoCancel()
     {
     FTRACE(FPrint( _L("CDunAtUrcHandler::DoCancel()") ));
+    iAtCmdExt->CancelReceiveUnsolicitedResult( iOwnerUid );
     FTRACE(FPrint( _L("CDunAtUrcHandler::DoCancel() complete") ));
     }
 
--- a/localconnectivityservice/dun/plugins/inc/bt/DunBtListen.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/plugins/inc/bt/DunBtListen.h	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -25,12 +25,6 @@
 
 class TBtPortEntity;
 
-enum TBtListenState
-    {
-    EBtListenStateIdle,
-    EBtListenStateListening
-    };
-
 /**
  *  DUN Bluetooth plugin's listener class
  *  This class starts listening on a created BT RFComm channel and notifies
@@ -86,9 +80,9 @@
      * Stops listening
      *
      * @since S60 3.2
-     * @return Symbian error code on error, KErrNone otherwise
+     * @return None
      */
-    TInt Stop();
+    void Stop();
 
 private:
 
@@ -223,11 +217,6 @@
     TBtPortEntity& iEntity;
 
     /**
-     * Current state of listening: active or inactive
-     */
-    TBtListenState iListenState;
-
-    /**
      * Listener socket that will listen for activity in RFComm channel
      */
     RSocket iListenSocket;
--- a/localconnectivityservice/dun/plugins/inc/usb/DunUsbConfig.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/plugins/inc/usb/DunUsbConfig.h	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -23,12 +23,6 @@
 #include <usb/acmconfig.h>
 #include "DunPlugin.h"
 
-enum TUsbConfigState
-    {
-    EUsbConfigStateIdle,
-    EUsbConfigStateWaiting
-    };
-
 /**
  *  Notification interface class to report USB ACM configuration change
  *
@@ -117,9 +111,9 @@
      * Stops listening for ACM configuration changes
      *
      * @since S60 3.2
-     * @return Symbian error code on error, KErrNone otherwise
+     * @return None
      */
-    TInt Stop();
+    void Stop();
 
 private:
 
@@ -175,11 +169,6 @@
      */
     MDunUsbConfig* iCallback;
 
-    /**
-     * Current state of configuration waiting: active or inactive
-     */
-    TUsbConfigState iConfigState;
-
     /*
      * Protocol number of USB ACM to which listening is done
      */
--- a/localconnectivityservice/dun/plugins/inc/usb/DunUsbListen.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/plugins/inc/usb/DunUsbListen.h	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -24,12 +24,6 @@
 #include <usbman.h>
 #include "DunPlugin.h"
 
-enum TUsbListenState
-    {
-    EUsbListenStateIdle,
-    EUsbListenStateListening
-    };
-
 /**
  *  DUN USB plugin's listener class
  *  This class starts listening for USB device state to change to configured.
@@ -81,9 +75,9 @@
      * Stops listening
      *
      * @since S60 3.2
-     * @return Symbian error code on error, KErrNone otherwise
+     * @return None
      */
-    TInt Stop();
+    void Stop();
 
 private:
 
@@ -143,11 +137,6 @@
     MDunListenCallback* iParent;
 
     /**
-     * Current state of listening: active or inactive
-     */
-    TUsbListenState iListenState;
-
-    /**
      * USB server (USB manager) needed for device state notifications
      * Device states needed to create transporter channel
      */
--- a/localconnectivityservice/dun/plugins/src/bt/DunBtListen.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/plugins/src/bt/DunBtListen.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -94,7 +94,7 @@
     {
     FTRACE(FPrint( _L( "CDunBtListen::IssueRequestL()" ) ));
 
-    if ( iListenState == EBtListenStateListening )
+    if ( IsActive() )
         {
         FTRACE(FPrint( _L( "CDunBtListen::IssueRequestL() (already active) complete" ) ));
         User::Leave( KErrNotReady );
@@ -141,8 +141,6 @@
         FTRACE(FPrint( _L( "CDunBtListen::IssueRequestL() (ERROR) complete (%d)" ), retTemp));
         User::Leave( retTemp );
         }
-    iStatus = KRequestPending;
-    iListenState = EBtListenStateListening;
     iListenSocket.Accept( iEntity.iBTPort, iStatus );
     SetActive();
 
@@ -153,19 +151,11 @@
 // Stops listening
 // ---------------------------------------------------------------------------
 //
-TInt CDunBtListen::Stop()
+void CDunBtListen::Stop()
     {
     FTRACE(FPrint( _L( "CDunBtListen::Stop()") ));
-    if ( iListenState != EBtListenStateListening )
-        {
-        FTRACE(FPrint( _L("CDunBtListen::Stop() (not ready) complete" )));
-        return KErrNotReady;
-        }
-    iListenSocket.CancelAccept();
     Cancel();
-    iListenState = EBtListenStateIdle;
     FTRACE(FPrint( _L( "CDunBtListen::Stop() complete") ));
-    return KErrNone;
     }
 
 // ---------------------------------------------------------------------------
@@ -222,7 +212,6 @@
     // Don't initialize iParent here (it is set through NewL)
     // Don't initialize iTransporter here (it is set through NewL)
     // Don't initialize iEntity here (it is set through NewL)
-    iListenState = EBtListenStateIdle;
     iDiscovery = NULL;
     iChannelNum = 0;
     iSDPHandleDun = 0;
@@ -394,7 +383,6 @@
 void CDunBtListen::RunL()
     {
     FTRACE(FPrint( _L( "CDunBtListen::RunL()" ) ));
-    iListenState = EBtListenStateIdle;
 
     StopServiceAdvertisement();
 
@@ -432,6 +420,9 @@
 //
 void CDunBtListen::DoCancel()
     {
+    FTRACE(FPrint( _L( "CDunBtListen::DoCancel()" ) ));
+    iListenSocket.CancelAccept();
+    FTRACE(FPrint( _L( "CDunBtListen::DoCancel() complete" ) ));
     }
 
 // ---------------------------------------------------------------------------
--- a/localconnectivityservice/dun/plugins/src/usb/DunUsbConfig.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/plugins/src/usb/DunUsbConfig.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -71,7 +71,7 @@
 TInt CDunUsbConfig::GetConfigValidityByIndex( TInt aIndex, TBool& aValidity )
     {
     FTRACE(FPrint( _L("CDunUsbConfig::GetConfigValidityByIndex()" )));
-    if ( iConfigState != EUsbConfigStateIdle )
+    if ( IsActive() )
         {
         FTRACE(FPrint( _L("CDunUsbConfig::GetConfigValidityByIndex() (not ready) complete" )));
         return KErrNotReady;
@@ -111,13 +111,11 @@
 TInt CDunUsbConfig::IssueRequest()
     {
     FTRACE(FPrint( _L("CDunUsbConfig::IssueRequest()" )));
-    if ( iConfigState != EUsbConfigStateIdle )
+    if ( IsActive() )
         {
         FTRACE(FPrint( _L("CDunUsbConfig::IssueRequest() (not ready) complete" )));
         return KErrNotReady;
         }
-    iStatus = KRequestPending;
-    iConfigState = EUsbConfigStateWaiting;
     iAcmProperty.Subscribe( iStatus );
     SetActive();
     FTRACE(FPrint( _L("CDunUsbConfig::IssueRequest() complete" )));
@@ -128,19 +126,11 @@
 // Stops listening for ACM configuration changes
 // ---------------------------------------------------------------------------
 //
-TInt CDunUsbConfig::Stop()
+void CDunUsbConfig::Stop()
     {
     FTRACE(FPrint( _L("CDunUsbConfig::Stop()" )));
-    if ( iConfigState != EUsbConfigStateWaiting )
-        {
-        FTRACE(FPrint( _L("CDunUsbConfig::Stop() (not ready) complete" )));
-        return KErrNotReady;
-        }
-    iAcmProperty.Cancel();
     Cancel();
-    iConfigState = EUsbConfigStateIdle;
     FTRACE(FPrint( _L("CDunUsbConfig::Stop() complete" )));
-    return KErrNone;
     }
 
 // ---------------------------------------------------------------------------
@@ -182,7 +172,6 @@
     {
     // Don't initialize iCallback here (it is set through NewL)
     // Don't initialize iProtocol here (it is set through NewL)
-    iConfigState = EUsbConfigStateIdle;
     iConfig.iAcmConfigVersion = 0;
     iConfig.iAcmCount = 0;
     iConfigExist = EFalse;
@@ -228,7 +217,6 @@
 void CDunUsbConfig::RunL()
     {
     FTRACE(FPrint( _L("CDunUsbConfig::RunL()" )));
-    iConfigState = EUsbConfigStateIdle;
 
     TPublishedAcmConfigs newConfig;
     TInt retTemp = GetConfiguration( newConfig );
@@ -289,4 +277,7 @@
 //
 void CDunUsbConfig::DoCancel()
     {
+    FTRACE(FPrint( _L("CDunUsbConfig::DoCancel()" )));
+    iAcmProperty.Cancel();
+    FTRACE(FPrint( _L("CDunUsbConfig::DoCancel() complete" )));
     }
--- a/localconnectivityservice/dun/plugins/src/usb/DunUsbListen.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/plugins/src/usb/DunUsbListen.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -107,21 +107,13 @@
 // Stops listening
 // ---------------------------------------------------------------------------
 //
-TInt CDunUsbListen::Stop()
+void CDunUsbListen::Stop()
     {
     FTRACE(FPrint( _L( "CDunUsbListen::Stop()" ) ));
-    if ( iListenState != EUsbListenStateListening )
-        {
-        FTRACE(FPrint( _L( "CDunUsbListen::Stop() (not ready) complete" ) ));
-        return KErrNotReady;
-        }
-    iUsbServer.DeviceStateNotificationCancel();
     Cancel();
-    iListenState = EUsbListenStateIdle;
     iDeviceState = EUsbDeviceStateUndefined;
     iDeviceStatePrev = EUsbDeviceStateUndefined;
     FTRACE(FPrint( _L( "CDunUsbListen::Stop() complete" ) ));
-    return KErrNone;
     }
 
 // ---------------------------------------------------------------------------
@@ -175,14 +167,12 @@
     {
     FTRACE(FPrint( _L( "CDunUsbListen::Activate()" ) ));
 
-    if ( iListenState != EUsbListenStateIdle )
+    if ( IsActive() )
         {
         FTRACE(FPrint( _L( "CDunUsbListen::Activate() (not ready) complete" ) ));
         return KErrNotReady;
         }
     iDeviceStatePrev = iDeviceState;
-    iStatus = KRequestPending;
-    iListenState = EUsbListenStateListening;
     iUsbServer.DeviceStateNotification( KDunUsbDeviceStateMask,
                                         iDeviceState,
                                         iStatus );
@@ -199,7 +189,6 @@
 void CDunUsbListen::RunL()
     {
     FTRACE(FPrint( _L( "CDunUsbListen::RunL() iStatus=%d"), iStatus.Int() ));
-    iListenState = EUsbListenStateIdle;
 
     if ( iStatus.Int() != KErrNone )
         {
@@ -256,4 +245,7 @@
 //
 void CDunUsbListen::DoCancel()
     {
+    FTRACE(FPrint( _L( "CDunUsbListen::DoCancel()" )));
+    iUsbServer.DeviceStateNotificationCancel();
+    FTRACE(FPrint( _L( "CDunUsbListen::DoCancel() complete" )));
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/localconnectivityservice/dun/rom/dunresources.iby	Thu Nov 04 15:31:42 2010 +0800
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2006-2007 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:  Image description file for project DUN utilities
+*
+*/
+
+
+#ifndef __DUNRESOURCES_IBY__
+#define __DUNRESOURCES_IBY__
+
+#ifdef __DIALUP_NETWORKING
+data=DATAZ_\RESOURCE_FILES_DIR\dunutils.rsc      RESOURCE_FILES_DIR\dunutils.rsc
+#endif
+
+#endif
--- a/localconnectivityservice/dun/server/inc/DunCloseWait.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/server/inc/DunCloseWait.h	Thu Nov 04 15:31:42 2010 +0800
@@ -96,9 +96,9 @@
      * Stops closing the objects in the close list
      *
      * @since S60 5.0
-     * @return Symbian error code on error, KErrNone otherwise
+     * @return None
      */
-    TInt Stop();
+    void Stop();
 
 private:
 
--- a/localconnectivityservice/dun/server/src/DunCloseWait.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/server/src/DunCloseWait.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -108,17 +108,11 @@
 // Stops closing the objects in the close list
 // ---------------------------------------------------------------------------
 //
-TInt CDunCloseWait::Stop()
+void CDunCloseWait::Stop()
     {
     FTRACE(FPrint( _L("CDunCloseWait::Stop()" )));
-    if ( !IsActive() )
-        {
-        FTRACE(FPrint( _L("CDunCloseWait::Stop() (not ready) complete" )));
-        return KErrNotReady;
-        }
     Cancel();
     FTRACE(FPrint( _L("CDunCloseWait::Stop() complete" )));
-    return KErrNone;
     }
 
 // ---------------------------------------------------------------------------
@@ -175,4 +169,6 @@
 //
 void CDunCloseWait::DoCancel()
     {
+    FTRACE(FPrint( _L("CDunCloseWait::DoCancel()" )));
+    FTRACE(FPrint( _L("CDunCloseWait::DoCancel() complete" )));
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/localconnectivityservice/dun/utils/data/dunutils.rss	Thu Nov 04 15:31:42 2010 +0800
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2007 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:  Resource definitions for project DUN
+*
+*/
+
+
+NAME DUNX
+
+#include <eikon.rh>
+#include <dunutils.loc>
+
+RESOURCE RSS_SIGNATURE { }
+RESOURCE TBUF r_dun_maximum_dialups { buf=qtn_dun_max_number; }
--- a/localconnectivityservice/dun/utils/group/bld.inf	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/group/bld.inf	Thu Nov 04 15:31:42 2010 +0800
@@ -23,7 +23,8 @@
 
 PRJ_EXPORTS
 ../../rom/dunutils.iby         CORE_MW_LAYER_IBY_EXPORT_PATH(dunutils.iby)
-
+../../rom/dunresources.iby     LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(dunresources.iby)
+../loc/dunutils.loc            MW_LAYER_LOC_EXPORT_PATH(dunutils.loc)
 
 PRJ_MMPFILES
 dunutils.mmp
--- a/localconnectivityservice/dun/utils/group/dunutils.mmp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/group/dunutils.mmp	Thu Nov 04 15:31:42 2010 +0800
@@ -54,10 +54,24 @@
 SOURCE                  DunNoteHandler.cpp
 SOURCE                  DunUtils.cpp
 
-MW_LAYER_SYSTEMINCLUDE
+START RESOURCE          ../data/dunutils.rss
+TARGETPATH              RESOURCE_FILES_DIR
+HEADER
+LANGUAGE_IDS
+END // RESOURCE
 
 USERINCLUDE             ../inc ../../atext/inc
 
+MW_LAYER_SYSTEMINCLUDE
+
+// Note:
+// The only other SYSTEMINCLUDE should you shall add are Symbian specific ones.
+// If there is a S60 header in the subdirectory then that should be
+// added into the include statements (like #include <phonebook/header.h>)
+//SYSTEMINCLUDE           /epoc32/include/ecom
+SYSTEMINCLUDE           ../../../inc
+
+LIBRARY                 aknnotify.lib
 LIBRARY                 bafl.lib
 #ifdef PRJ_USE_NETWORK_STUBS
 LIBRARY                 c32comm_stub.lib
@@ -71,6 +85,4 @@
 LIBRARY                 dunatext.lib
 LIBRARY                 efsrv.lib
 LIBRARY                 euser.lib
-LIBRARY                 HbWidgets.lib
-
 DEBUGLIBRARY            flogger.lib
--- a/localconnectivityservice/dun/utils/inc/DunDataPusher.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/inc/DunDataPusher.h	Thu Nov 04 15:31:42 2010 +0800
@@ -164,17 +164,9 @@
      * Stops sending for write endpoint
      *
      * @since S60 3.2
-     * @return Symbian error code on error, KErrNone otherwise
+     * @return None
      */
-    TInt Stop();
-
-    /**
-     * Stops sending for write endpoint and clears event queue
-     *
-     * @since S60 3.2
-     * @return Symbian error code on error, KErrNone otherwise
-     */
-    TInt StopAndClearQueue();
+    void Stop();
 
     /**
      * Signals completion status in round robin and clears event queue
--- a/localconnectivityservice/dun/utils/inc/DunDataWaiter.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/inc/DunDataWaiter.h	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -88,9 +88,9 @@
      * Stops monitoring for new data
      *
      * @since S60 3.2
-     * @return Symbian error code on error, KErrNone otherwise
+     * @return None
      */
-    TInt Stop();
+    void Stop();
 
 private:
 
@@ -141,11 +141,6 @@
     MDunChannelAllocator* iChannelCallback;
 
     /**
-     * Current state of data monitoring: active or inactive
-     */
-    TDunState iDataWaiterState;
-
-    /**
      * RComm object of local media side
      * Not own.
      */
--- a/localconnectivityservice/dun/utils/inc/DunNoteHandler.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/inc/DunNoteHandler.h	Thu Nov 04 15:31:42 2010 +0800
@@ -20,7 +20,9 @@
 #define C_CDUNNOTEHANDLER_H
 
 #include <e32base.h>
-#include <hb/hbwidgets/hbdevicemessageboxsymbian.h>
+#include <dunutils.rsg>
+#include <AknGlobalConfirmationQuery.h>
+#include <data_caging_path_literals.hrh>
 #include "DunTransporter.h"
 
 /**
@@ -29,8 +31,7 @@
  *  @lib dunutils.lib
  *  @since S60 v3.2
  */
-NONSHARABLE_CLASS( CDunNoteHandler ) : public CBase,
-                                       public MHbDeviceMessageBoxObserver
+NONSHARABLE_CLASS( CDunNoteHandler ) : public CActive
     {
 
 public:
@@ -92,18 +93,42 @@
      */
     void DoIssueRequestL();
 
-// from base class MHbDeviceMessageBoxObserver
+    /**
+     * Reads resource text
+     *
+     * @since S60 3.2
+     * @param aResourceId Resource ID to read
+     * @param aUnicode Buffer containing the note string to show
+     * @return None
+     */
+    void ReadResourceTextL( TInt aResourceId, HBufC16*& aUnicode );
+
+// from base class CActive
 
-	// TODO: ADD DESCRIPTION HERE!
-    void MessageBoxClosed( const CHbDeviceMessageBoxSymbian* aMessageBox,
-                           CHbDeviceMessageBoxSymbian::TButtonId aButton );
+    /*
+     * From CActive.
+     * Gets called when UI note dismissed
+     *
+     * @since S60 3.2
+     * @return None
+     */
+    void RunL();
+
+    /**
+     * From CActive.
+     * Gets called on cancel
+     *
+     * @since S60 3.2
+     * @return None
+     */
+    void DoCancel();
 
 private:  // data
 
     /**
      * Note to show
      */
-    CHbDeviceMessageBoxSymbian* iNote;
+    CAknGlobalConfirmationQuery* iNote;
 
     /**
      * Current state of note showing: active or inactive
--- a/localconnectivityservice/dun/utils/inc/DunSignalCopy.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/inc/DunSignalCopy.h	Thu Nov 04 15:31:42 2010 +0800
@@ -88,9 +88,9 @@
      * Stops monitoring the endpoint for line status change
      *
      * @since S60 3.2
-     * @return Symbian error code on error, KErrNone otherwise
+     * @return None
      */
-    TInt Stop();
+    void Stop();
 
 private:
 
@@ -195,11 +195,6 @@
     TDunStreamType iStreamType;
 
     /**
-     * Current state of connection monitoring: active or inactive
-     */
-    TDunState iSignalCopyState;
-
-    /**
      * Signal to listen with RComm::NotifySignalChange()
      */
     TUint iListenSignals;
--- a/localconnectivityservice/dun/utils/inc/DunSignalNotify.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/inc/DunSignalNotify.h	Thu Nov 04 15:31:42 2010 +0800
@@ -85,9 +85,9 @@
      * Stops monitoring the endpoint for line status change
      *
      * @since S60 3.2
-     * @return Symbian error code on error, KErrNone otherwise
+     * @return None
      */
-    TInt Stop();
+    void Stop();
 
 private:
 
@@ -156,11 +156,6 @@
     MDunTransporterUtilityAux* iUtility;
 
     /**
-     * Current state of signal monitoring: active or inactive
-     */
-    TDunState iSignalNotifyState;
-
-    /**
      * Signals to listen with RComm::NotifySignalChange()
      */
     TUint iListenSignals;
--- a/localconnectivityservice/dun/utils/inc/DunSignalWaiter.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/inc/DunSignalWaiter.h	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -88,9 +88,9 @@
      * Stops monitoring for new data
      *
      * @since S60 3.2
-     * @return Symbian error code on error, KErrNone otherwise
+     * @return None
      */
-    TInt Stop();
+    void Stop();
 
 private:
 
@@ -141,11 +141,6 @@
     MDunChannelAllocator* iChannelCallback;
 
     /**
-     * Current state of data monitoring: active or inactive
-     */
-    TDunState iSignalWaiterState;
-
-    /**
      * Signals set when RComm::NotifySignalChange() request completes
      */
     TUint iSignals;
--- a/localconnectivityservice/dun/utils/inc/DunStream.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/inc/DunStream.h	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -184,11 +184,6 @@
     TDunOperationType iOperationType;
 
     /**
-     * Current state of transfer: active or inactive
-     */
-    TDunState iTransferState;
-
-    /**
      * Direction of data transfer
      * This is set after iStreamType and iOperationType are known
      */
--- a/localconnectivityservice/dun/utils/inc/DunTransporter.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/inc/DunTransporter.h	Thu Nov 04 15:31:42 2010 +0800
@@ -74,20 +74,10 @@
 enum TDunState
     {
     EDunStateIdle,
-    EDunStateTransferring,     // Transporter state for data tranfer (up/downstream)
-    EDunStateSignalCopy,       // Transporter state for signal copying (RComm)
-    EDunStateSignalNotify,     // Transporter state for signal notifying (RSocket)
-    EDunStateDataWaiting,      // Transporter state for data waiting
-    EDunStateSignalWaiting,    // Transporter state for signal waiting
-    EDunStateDataPushing,      // Transporter state for data pushing (multiplexer)
     EDunStateCallListen,       // Transporter state for call state listening
-    EDunStateAtCmdHandling,    // ATEXT state for AT command handling
-    EDunStateAtCmdPushing,     // ATEXT state for AT command reply pushing
-    EDunStateAtCmdEchoing,     // ATEXT state for AT command character echoing (text mode)
-    EDunStateAtUrcHandling,    // ATEXT state for URC handling
-    EDunStateModeListening,    // ATEXT state for mode change listening
-    EDunStateEcomListening,    // ATEXT state for ECOM change listening
-    EDunStateNvramListening,   // ATEXT state for NVRAM change listening
+    EDunStateAtCmdHandling,    // State for AT command handling
+    EDunStateAtCmdPushing,     // State for AT command reply pushing
+    EDunStateAtCmdEchoing,     // State for AT command character echoing (text mode)
     EDunStateUiNoting          // Transporter state for UI note showing
     };
 
--- a/localconnectivityservice/dun/utils/inc/DunUpstream.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/inc/DunUpstream.h	Thu Nov 04 15:31:42 2010 +0800
@@ -110,7 +110,7 @@
      * @since S60 3.2
      * @return None
      */
-    virtual TInt StopAtCmdHandling() = 0;
+    virtual void StopAtCmdHandling() = 0;
 
     };
 
@@ -292,9 +292,9 @@
      * This is an accessor for CDunDownstream's Stop()
      *
      * @since S60 3.2
-     * @return Symbian error code on error, KErrNone otherwise
+     * @return None
      */
-    TInt StopAtCmdHandling();
+    void StopAtCmdHandling();
 
 // from base class MDunCmdModeMonitor
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/localconnectivityservice/dun/utils/loc/dunutils.loc	Thu Nov 04 15:31:42 2010 +0800
@@ -0,0 +1,27 @@
+/*
+* Copyright (c) 2007 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:  Localization strings for project DUN
+*
+*/
+
+
+// d: When a maximum number of dial-up connections with any bearer are already established
+// d: and the user tries to set up another one, a global query with this text is shown.
+// d: Query has only left softkey OK $text.softkey.ok$. This softkey confirms that user
+// d: see the note. User has to press softkey or Selection key and after that the note
+// d: disappears.
+// l: popup_note_window
+// w:
+// r: 5.0
+#define qtn_dun_max_number "Maximum number of dialup-connections. Dial-up failed."
--- a/localconnectivityservice/dun/utils/src/DunDataPusher.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/src/DunDataPusher.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -202,34 +202,11 @@
 // Stops sending for write endpoint
 // ---------------------------------------------------------------------------
 //
-TInt CDunDataPusher::Stop()
+void CDunDataPusher::Stop()
     {
     FTRACE(FPrint( _L("CDunDataPusher::Stop()" )));
-    if ( iPushState != EDunStateDataPushing )
-        {
-        FTRACE(FPrint( _L("CDunDataPusher::Stop() (not ready) complete" )));
-        return KErrNotReady;
-        }
-    // As the EDunStateDataPushing can be on even with multiple requests,
-    // cancel the actual operation in DoCancel()
     Cancel();
-    iPushState = EDunStateIdle;
     FTRACE(FPrint( _L("CDunDataPusher::Stop() complete" )));
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-// Stops sending for write endpoint and clears event queue
-// ---------------------------------------------------------------------------
-//
-TInt CDunDataPusher::StopAndClearQueue()
-    {
-    FTRACE(FPrint( _L("CDunDataPusher::StopAndClearQueue()" )));
-    TInt retVal = Stop();
-    iEventQueue.Reset();
-    iEventIndex = 0;
-    FTRACE(FPrint( _L("CDunDataPusher::StopAndClearQueue() complete" )));
-    return retVal;
     }
 
 // ---------------------------------------------------------------------------
@@ -309,7 +286,6 @@
     {
     // Don't initialize iUtility here (it is set through NewL)
     // Don't initialize iStreamCallback here (it is set through NewL)
-    iPushState = EDunStateIdle;
     iEventIndex = 0;
     iSocket = NULL;
     iComm = NULL;
@@ -336,16 +312,12 @@
     const TDesC8* dataToPush = iEventQueue[iEventIndex].iDataToPush;
     if ( iComm )
         {
-        iStatus = KRequestPending;
-        iPushState = EDunStateDataPushing;
         iComm->Write( iStatus, *dataToPush );
         SetActive();
         FTRACE(FPrint( _L("CDunDataPusher::ManageOneEvent() RComm Write() requested for %d bytes... (buffer=0x%08X)" ), dataToPush->Length(), dataToPush ));
         }
     else if ( iSocket )
         {
-        iStatus = KRequestPending;
-        iPushState = EDunStateDataPushing;
         iSocket->Send( *dataToPush, 0, iStatus );
         SetActive();
         FTRACE(FPrint( _L("CDunDataPusher::ManageOneEvent() RSocket Send() requested for %d bytes... (buffer=0x%08X)" ), dataToPush->Length(), dataToPush ));
@@ -408,13 +380,11 @@
         else
             {
             // Last was served so stop processing and notify
-            iPushState = EDunStateIdle;
             iStreamCallback->NotifyDataPushComplete( ETrue );
             }
         }  // if ( !stop )
     else  // stop -> tear down connection
         {
-        iPushState = EDunStateIdle;
         TDunConnectionReason connReason;
         connReason.iReasonType = EDunReasonTypeRW;
         connReason.iContext = EDunMediaContextLocal;
@@ -449,5 +419,9 @@
         iSocket->CancelWrite();
         FTRACE(FPrint( _L("CDunDataPusher::DoCancel() (RSocket) cancelled" )));
         }
+    else
+        {
+        FTRACE(FPrint( _L("CDunDataPusher::DoCancel() (ERROR) complete" )));
+        }
     FTRACE(FPrint( _L("CDunDataPusher::DoCancel() complete" )));
     }
--- a/localconnectivityservice/dun/utils/src/DunDataWaiter.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/src/DunDataWaiter.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -124,7 +124,7 @@
 TInt CDunDataWaiter::IssueRequest()
     {
     FTRACE(FPrint( _L("CDunDataWaiter::IssueRequest()" )));
-    if ( iDataWaiterState != EDunStateIdle )
+    if ( IsActive() )
         {
         FTRACE(FPrint( _L("CDunDataWaiter::IssueRequest() (not ready) complete" )));
         return KErrNotReady;
@@ -135,8 +135,6 @@
         return KErrGeneral;
         }
     iComm->ResetBuffers();
-    iStatus = KRequestPending;
-    iDataWaiterState = EDunStateDataWaiting;
     iComm->NotifyDataAvailable( iStatus );
     SetActive();
     FTRACE(FPrint( _L("CDunDataWaiter::IssueRequest() complete" )));
@@ -147,24 +145,11 @@
 // Stops monitoring for new data
 // ---------------------------------------------------------------------------
 //
-TInt CDunDataWaiter::Stop()
+void CDunDataWaiter::Stop()
     {
     FTRACE(FPrint( _L("CDunDataWaiter::Stop()" )));
-    if ( iDataWaiterState != EDunStateDataWaiting )
-        {
-        FTRACE(FPrint( _L("CDunDataWaiter::Stop() (not ready) complete" )));
-        return KErrNotReady;
-        }
-    if ( !iComm )
-        {
-        FTRACE(FPrint( _L("CDunDataWaiter::Stop() (iComm) not initialized!" )));
-        return KErrGeneral;
-        }
-    iComm->NotifyDataAvailableCancel();
     Cancel();
-    iDataWaiterState = EDunStateIdle;
     FTRACE(FPrint( _L("CDunDataWaiter::Stop() complete" )));
-    return KErrNone;
     }
 
 // ---------------------------------------------------------------------------
@@ -201,7 +186,6 @@
     {
     FTRACE(FPrint( _L("CDunDataWaiter::Initialize()" ) ));
     // Don't initialize iChannelCallback here (it is set through NewL)
-    iDataWaiterState = EDunStateIdle;
     iComm = NULL;
     FTRACE(FPrint( _L("CDunDataWaiter::Initialize() complete" ) ));
     }
@@ -214,7 +198,6 @@
 void CDunDataWaiter::RunL()
     {
     FTRACE(FPrint( _L("CDunDataWaiter::RunL()" ) ));
-    iDataWaiterState = EDunStateIdle;
     TInt retTemp = iStatus.Int();
     if ( retTemp != KErrNone )
         {
@@ -250,4 +233,7 @@
 //
 void CDunDataWaiter::DoCancel()
     {
+    FTRACE(FPrint( _L("CDunDataWaiter::DoCancel()" ) ));
+    iComm->NotifyDataAvailableCancel();
+    FTRACE(FPrint( _L("CDunDataWaiter::DoCancel() complete" ) ));
     }
--- a/localconnectivityservice/dun/utils/src/DunDownstream.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/src/DunDownstream.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -187,11 +187,6 @@
 TInt CDunDownstream::Stop( TBool aStopMplex )
     {
     FTRACE(FPrint( _L("CDunDownstream::Stop() (Dir=%d)" ), iDirection));
-    if ( !iPushData.iDataPusher )
-        {
-        FTRACE(FPrint( _L("CDunDownstream::Stop() (iPushData.iDatapusher not initialized!) complete" )));
-        return KErrGeneral;
-        }
     // Stop the downstream related AT command handling functionality
     if ( aStopMplex )  // optional
         {
@@ -200,28 +195,12 @@
             iPushData.iAtCmdHandler->StopAtCmdHandling();
             }
         // Stop the multiplexer separately
-        iPushData.iDataPusher->Stop();
-        }
-    if ( iTransferState != EDunStateTransferring )
-        {
-        FTRACE(FPrint( _L("CDunDownstream::Stop() (not ready) complete" )));
-        return KErrNotReady;
-        }
-    // Stop only current operation
-    if ( iOperationType == EDunOperationTypeRead )
-        {
-        if ( iNetwork )
+        if ( iPushData.iDataPusher )
             {
-            iNetwork->ReadCancel();
-            Cancel();
-            FTRACE(FPrint( _L("CDunDownstream::Stop() (Network) cancelled" )));
+            iPushData.iDataPusher->Stop();
             }
         }
-    else if ( iOperationType == EDunOperationTypeWrite )
-        {
-        iPushData.iDataPusher->StopOneEvent( iBufferPtr );
-        }
-    iTransferState = EDunStateIdle;
+    Cancel();
     iOperationType = EDunOperationTypeUndefined;
     FTRACE(FPrint( _L("CDunDownstream::Stop() complete" )));
     return KErrNone;
@@ -273,13 +252,8 @@
     iDirection = static_cast<TDunDirection>( EDunStreamTypeDownstream | iOperationType );
 
     FTRACE(FPrint( _L("CDunDownstream::IssueRequest() (Dir=%d)" ), iDirection));
-    if ( !iPushData.iDataPusher )
-        {
-        FTRACE(FPrint( _L("CDunDownstream::IssueRequest() (iPushData.iDataPusher not initialized!) complete" ) ));
-        return KErrGeneral;
-        }
 
-    if ( iTransferState != EDunStateIdle )
+    if ( IsActive() )
         {
         FTRACE(FPrint( _L("CDunDownstream::IssueRequest() (not ready) complete" ) ));
         return KErrNotReady;
@@ -298,14 +272,11 @@
     switch ( iDirection )
         {
         case EDunReaderDownstream:
-            iStatus = KRequestPending;
-            iTransferState = EDunStateTransferring;
             iNetwork->ReadOneOrMore( iStatus, *iBufferPtr );
             SetActive();
             FTRACE(FPrint( _L("CDunDownstream::IssueRequest() RComm ReadOneOrMore() requested" ) ));
             break;
         case EDunWriterDownstream:
-            iTransferState = EDunStateTransferring;
             AddToQueueAndSend( iBufferPtr, this );
             break;
         default:
@@ -325,7 +296,7 @@
 void CDunDownstream::RunL()
     {
     FTRACE(FPrint( _L("CDunDownstream::RunL() (Dir=%d)" ), iDirection));
-    iTransferState = EDunStateIdle;
+
     if ( iOperationType != EDunOperationTypeRead )
         {
         FTRACE(FPrint( _L("CDunDownstream::RunL() (wrong operation type!) complete" )));
@@ -376,6 +347,7 @@
 void CDunDownstream::DoCancel()
     {
     FTRACE(FPrint( _L("CDunDownstream::DoCancel()" )));
+    iNetwork->ReadCancel();
     FTRACE(FPrint( _L("CDunDownstream::DoCancel() complete" )));
     }
 
@@ -424,7 +396,6 @@
     FTRACE(FPrint( _L("CDunDownstream::NotifyDataPushComplete() (find event)" )));
     if ( foundIndex >= 0 )
         {
-        iTransferState = EDunStateIdle;
         iOperationType = EDunOperationTypeUndefined;
         FTRACE(FPrint( _L("CDunDownstream::NotifyDataPushComplete() (issue request)" )));
         if ( iPushData.iDataMode )
@@ -445,13 +416,8 @@
     {
     FTRACE(FPrint( _L("CDunDownstream::NotifyCommandModeStart()" )));
     iPushData.iDataMode = EFalse;
-    // Now the data mode has ended. If read operation then cancel it.
-    // Check for iTransferState here to minimize logging
-    if ( iTransferState==EDunStateTransferring &&
-         iOperationType==EDunOperationTypeRead )
-        {
-        Stop( EFalse );
-        }
+    // Now the data mode has ended. Stop read operation but not the multiplexer.
+    Stop( EFalse );
     FTRACE(FPrint( _L("CDunDownstream::NotifyCommandModeStart() complete" )));
     }
 
@@ -464,14 +430,7 @@
     {
     FTRACE(FPrint( _L("CDunDownstream::NotifyCommandModeEnd()" )));
     iPushData.iDataMode = ETrue;
-    // Command mode ends here so start reading from Dataport only if generic
-    // transferring state is not EDunStateIdle. This is a reduced form of having
-    // read pending -> reissue not needed OR write pending -> reissue not needed
-    // (NotifyDataPushComplete() will reissue).
-    if ( iTransferState == EDunStateIdle )
-        {
-        iOperationType = EDunOperationTypeRead;  // just in case
-        IssueRequest();
-        }
+    iOperationType = EDunOperationTypeRead;  // just in case
+    IssueRequest();
     FTRACE(FPrint( _L("CDunDownstream::NotifyCommandModeEnd() complete" )));
     }
--- a/localconnectivityservice/dun/utils/src/DunNoteHandler.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/src/DunNoteHandler.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -16,9 +16,20 @@
 */
 
 
+#include <bautils.h>
+#include <featmgr.h>
+#include <aknSDData.h>
+#include <secondarydisplay/dunsecondarydisplayapi.h>
 #include "DunNoteHandler.h"
 #include "DunDebug.h"
 
+_LIT( KDunUtilsDriveSpec, "z:" );
+_LIT( KDunUtilsResourceFileName, "dunutils.rsc" );
+
+const TInt KDunCoverEnumStart     = (ECmdNone + 1);  // start after ECmdNone
+const TInt KDunPtr8toPtr16Divider = 2;               // Divider for converting
+const TInt KDunThreeItemsToPop    = 3;
+
 // ======== MEMBER FUNCTIONS ========
 
 // ---------------------------------------------------------------------------
@@ -80,7 +91,7 @@
         FTRACE(FPrint( _L("CDunNoteHandler::IssueRequest() (trapped!) complete (%d)"), retTrap));
         return retTrap;
         }
-    iNoteState = EDunStateUiNoting;
+    SetActive();
     FTRACE(FPrint( _L("CDunNoteHandler::IssueRequest() complete") ));
     return KErrNone;
     }
@@ -102,7 +113,8 @@
         FTRACE(FPrint( _L("CDunNoteHandler::Stop() (iNote not initialized!) complete") ));
         return KErrGeneral;
         }
-    iNote->Close();
+    iNote->CancelConfirmationQuery();
+    Cancel();
     iNoteState = EDunStateIdle;
     FTRACE(FPrint( _L("CDunNoteHandler::Stop() complete") ));
     return KErrNone;
@@ -112,7 +124,8 @@
 // CDunNoteHandler::CDunNoteHandler
 // ---------------------------------------------------------------------------
 //
-CDunNoteHandler::CDunNoteHandler()
+CDunNoteHandler::CDunNoteHandler() :
+    CActive( EPriorityStandard )
     {
     Initialize();
     }
@@ -124,6 +137,7 @@
 void CDunNoteHandler::ConstructL()
     {
     FTRACE(FPrint( _L("CDunNoteHandler::ConstructL()") ));
+    CActiveScheduler::Add( this );
     FTRACE(FPrint( _L("CDunNoteHandler::ConstructL() complete") ));
     }
 
@@ -151,34 +165,84 @@
         FTRACE(FPrint( _L("CDunNoteHandler::DoIssueRequestL() (ERROR) complete") ));
         User::Leave( KErrGeneral );
         }
-
-    CHbDeviceMessageBoxSymbian* messageBox =
-            CHbDeviceMessageBoxSymbian::NewL(
-                    CHbDeviceMessageBoxSymbian::EWarning);
-    CleanupStack::PushL(messageBox);
-    //ToDo: Need to use localised strings.
-    _LIT(KText, "Maximum number of dialup-connections. Dial-up failed.");
-    messageBox->SetTextL(KText);
-    messageBox->SetObserver(this);
-    messageBox->SetTimeout(0);
-    messageBox->ShowL();
-    CleanupStack::Pop(messageBox);
-    iNote = messageBox;
+    HBufC16* unicodeString = NULL;
+    ReadResourceTextL( R_DUN_MAXIMUM_DIALUPS, unicodeString );
+    CAknGlobalConfirmationQuery* note = CAknGlobalConfirmationQuery::NewLC();
+    // Publish cover UI note data
+    CAknSDData* sdData = CAknSDData::NewL( KDunNoteCategory,
+                                           ECmdMaxNumber - KDunCoverEnumStart,
+                                           KNullDesC8 );
+    note->SetSecondaryDisplayData( sdData );  // ownership transferred
+    // Start to show note
+    iStatus = KRequestPending;
+    iNoteState = EDunStateUiNoting;
+    note->ShowConfirmationQueryL( iStatus,
+                                  *unicodeString,
+                                  R_AVKON_SOFTKEYS_OK_EMPTY,
+                                  R_QGN_NOTE_ERROR_ANIM,
+                                  KNullDesC,
+                                  0,
+                                  0,
+                                  CAknQueryDialog::EErrorTone );
+    CleanupStack::Pop( note );
+    delete unicodeString;
+    iNote = note;
     FTRACE(FPrint( _L("CDunNoteHandler::DoIssueRequestL() complete") ));
     }
 
 // ---------------------------------------------------------------------------
-// From class MHbDeviceMessageBoxObserver.
-// Gets called on dialog close.
+// Reads resource string
 // ---------------------------------------------------------------------------
 //
-void CDunNoteHandler::MessageBoxClosed(
-    const CHbDeviceMessageBoxSymbian* /*aMessageBox*/,
-    CHbDeviceMessageBoxSymbian::TButtonId /*aButton*/ )
+void CDunNoteHandler::ReadResourceTextL( TInt aResourceId, HBufC16*& aUnicode )
     {
-    FTRACE(FPrint( _L("CDunNoteHandler::MessageBoxClosed()" ) ));
+    FTRACE(FPrint( _L("CDunNoteHandler::ReadNoteResourceL()") ));
+    // Connect to file server (for resource file reading)
+    RFs fileSession;
+    CleanupClosePushL<RFs>( fileSession );
+    User::LeaveIfError( fileSession.Connect() );
+    // Create dunutils.rsc path and file name
+    TFileName fileName;
+    fileName = KDunUtilsDriveSpec;
+    fileName += KDC_RESOURCE_FILES_DIR;
+    fileName += KDunUtilsResourceFileName;
+    // Find nearest language file for resource
+    BaflUtils::NearestLanguageFile( fileSession, fileName );
+    // Read note resource
+    RResourceFile resourceFile;
+    CleanupClosePushL<RResourceFile>( resourceFile );
+    resourceFile.OpenL( fileSession, fileName );
+    resourceFile.ConfirmSignatureL();
+    HBufC8* readBuffer = resourceFile.AllocReadLC( aResourceId );
+    // Convert read HBufC8 to HBufC16
+    const TPtrC16 ptr16(reinterpret_cast<const TUint16*>
+                       (readBuffer->Ptr()),
+                       (readBuffer->Size() / KDunPtr8toPtr16Divider) );
+    aUnicode = HBufC16::NewL( ptr16.Length() );
+    *aUnicode = ptr16;
+    CleanupStack::PopAndDestroy( KDunThreeItemsToPop );  // readBuffer, resourceFile, fileSession
+    FTRACE(FPrint( _L("CDunNoteHandler::ReadNoteResourceL() complete") ));
+    }
+
+// ---------------------------------------------------------------------------
+// From class CActive.
+// Gets called when UI note dismissed
+// ---------------------------------------------------------------------------
+//
+void CDunNoteHandler::RunL()
+    {
+    FTRACE(FPrint( _L("CDunNoteHandler::RunL()" ) ));
     iNoteState = EDunStateIdle;
     delete iNote;
     iNote = NULL;
-    FTRACE(FPrint( _L("CDunNoteHandler::MessageBoxClosed() complete" ) ));
+    FTRACE(FPrint( _L("CDunNoteHandler::RunL() complete" ) ));
     }
+
+// ---------------------------------------------------------------------------
+// From class CActive.
+// Gets called on cancel
+// ---------------------------------------------------------------------------
+//
+void CDunNoteHandler::DoCancel()
+    {
+    }
--- a/localconnectivityservice/dun/utils/src/DunSignalCopy.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/src/DunSignalCopy.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -152,7 +152,7 @@
 TInt CDunSignalCopy::IssueRequest()
     {
     FTRACE(FPrint( _L("CDunSignalCopy::IssueRequest()" )));
-    if ( iSignalCopyState != EDunStateIdle )
+    if ( IsActive() )
         {
         FTRACE(FPrint( _L("CDunSignalCopy::IssueRequest() (not ready) complete" ) ));
         return KErrNotReady;
@@ -191,8 +191,6 @@
     else
         {
         FTRACE(FPrint( _L("CDunSignalCopy::IssueRequest() start waiting for change..." ) ));
-        iStatus = KRequestPending;
-        iSignalCopyState = EDunStateSignalCopy;
         comm->NotifySignalChange( iStatus, iSignals, iListenSignals );
         SetActive();
         }
@@ -204,31 +202,11 @@
 // Stops monitoring the endpoint for line status change
 // ---------------------------------------------------------------------------
 //
-TInt CDunSignalCopy::Stop()
+void CDunSignalCopy::Stop()
     {
     FTRACE(FPrint( _L("CDunSignalCopy::Stop()" )));
-    if ( iSignalCopyState != EDunStateSignalCopy )
-        {
-        FTRACE(FPrint( _L("CDunSignalCopy::Stop() (not ready) complete" )));
-        return KErrNotReady;
-        }
-    if ( iStreamType == EDunStreamTypeUpstream )
-        {
-        iComm->NotifySignalChangeCancel();
-        }
-    else if ( iStreamType == EDunStreamTypeDownstream )
-        {
-        iNetwork->NotifySignalChangeCancel();
-        }
-    else
-        {
-        FTRACE(FPrint( _L("CDunSignalCopy::Stop() (ERROR) complete" )));
-        return KErrGeneral;
-        }
     Cancel();
-    iSignalCopyState = EDunStateIdle;
     FTRACE(FPrint( _L("CDunSignalCopy::Stop() complete" )));
-    return KErrNone;
     }
 
 // ---------------------------------------------------------------------------
@@ -261,7 +239,6 @@
     FTRACE(FPrint( _L("CDunSignalCopy::Initialize()" ) ));
     iContextInUse = EDunMediaContextUndefined;
     iStreamType = EDunStreamTypeUndefined;
-    iSignalCopyState = EDunStateIdle;
     iListenSignals = 0;
     iSignals = 0;
     iNetwork = NULL;
@@ -439,7 +416,6 @@
 void CDunSignalCopy::RunL()
     {
     FTRACE(FPrint( _L("CDunSignalCopy::RunL()" ) ));
-    iSignalCopyState = EDunStateIdle;
     TInt retTemp = iStatus.Int();
     if ( retTemp != KErrNone )
         {
@@ -472,4 +448,18 @@
 //
 void CDunSignalCopy::DoCancel()
     {
+    FTRACE(FPrint( _L("CDunSignalCopy::DoCancel()" ) ));
+    if ( iStreamType == EDunStreamTypeUpstream )
+        {
+        iComm->NotifySignalChangeCancel();
+        }
+    else if ( iStreamType == EDunStreamTypeDownstream )
+        {
+        iNetwork->NotifySignalChangeCancel();
+        }
+    else
+        {
+        FTRACE(FPrint( _L("CDunSignalCopy::DoCancel() (ERROR) complete" )));
+        }
+    FTRACE(FPrint( _L("CDunSignalCopy::DoCancel() complete" ) ));
     }
--- a/localconnectivityservice/dun/utils/src/DunSignalNotify.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/src/DunSignalNotify.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -136,7 +136,7 @@
 TInt CDunSignalNotify::IssueRequest()
     {
     FTRACE(FPrint( _L("CDunSignalNotify::IssueRequest()" )));
-    if ( iSignalNotifyState != EDunStateIdle )
+    if ( IsActive() )
         {
         FTRACE(FPrint( _L("CDunSignalNotify::IssueRequest() (not ready) complete" )));
         return KErrNotReady;
@@ -164,8 +164,6 @@
     else
         {
         FTRACE(FPrint( _L("CDunSignalNotify::IssueRequest() start waiting for change..." ) ));
-        iStatus = KRequestPending;
-        iSignalNotifyState = EDunStateSignalNotify;
         iNetwork->NotifySignalChange( iStatus, iSignals, iListenSignals );
         SetActive();
         }
@@ -177,24 +175,11 @@
 // Stops monitoring the endpoint for line status change
 // ---------------------------------------------------------------------------
 //
-TInt CDunSignalNotify::Stop()
+void CDunSignalNotify::Stop()
     {
     FTRACE(FPrint( _L("CDunSignalNotify::Stop()" )));
-    if ( iSignalNotifyState != EDunStateSignalNotify )
-        {
-        FTRACE(FPrint( _L("CDunSignalNotify::Stop() (not ready) complete" )));
-        return KErrNotReady;
-        }
-    if ( !iNetwork )
-        {
-        FTRACE(FPrint( _L("CDunSignalNotify::Stop() (iNetwork) not initialized!" )));
-        return KErrGeneral;
-        }
-    iNetwork->NotifySignalChangeCancel();
     Cancel();
-    iSignalNotifyState = EDunStateIdle;
     FTRACE(FPrint( _L("CDunSignalNotify::Stop() complete" )));
-    return KErrNone;
     }
 
 // ---------------------------------------------------------------------------
@@ -231,7 +216,6 @@
     {
     FTRACE(FPrint( _L("CDunSignalNotify::Initialize()" ) ));
     // Don't initialize iUtility here (it is set through NewL)
-    iSignalNotifyState = EDunStateIdle;
     iListenSignals = 0;
     iSignals = 0;
     iNetwork = NULL;
@@ -349,7 +333,6 @@
 void CDunSignalNotify::RunL()
     {
     FTRACE(FPrint( _L("CDunSignalNotify::RunL()" ) ));
-    iSignalNotifyState = EDunStateIdle;
     TInt retTemp = iStatus.Int();
     if ( retTemp != KErrNone )
         {
@@ -383,5 +366,6 @@
 void CDunSignalNotify::DoCancel()
     {
     FTRACE(FPrint( _L("CDunSignalNotify::DoCancel()" ) ));
+    iNetwork->NotifySignalChangeCancel();
     FTRACE(FPrint( _L("CDunSignalNotify::DoCancel() complete" ) ));
     }
--- a/localconnectivityservice/dun/utils/src/DunSignalWaiter.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/src/DunSignalWaiter.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -130,7 +130,7 @@
 TInt CDunSignalWaiter::IssueRequest()
     {
     FTRACE(FPrint( _L("CDunSignalWaiter::IssueRequest()" )));
-    if ( iSignalWaiterState != EDunStateIdle )
+    if ( IsActive() )
         {
         FTRACE(FPrint( _L("CDunSignalWaiter::IssueRequest() (not ready) complete" )));
         return KErrNotReady;
@@ -140,8 +140,6 @@
         FTRACE(FPrint( _L("CDunSignalWaiter::IssueRequest() (iComm) not initialized!" ) ));
         return KErrGeneral;
         }
-    iStatus = KRequestPending;
-    iSignalWaiterState = EDunStateSignalWaiting;
     iComm->NotifySignalChange( iStatus, iSignals, KSignalDCEInputs );
     SetActive();
     FTRACE(FPrint( _L("CDunSignalWaiter::IssueRequest() complete" )));
@@ -152,24 +150,11 @@
 // Stops monitoring for new data
 // ---------------------------------------------------------------------------
 //
-TInt CDunSignalWaiter::Stop()
+void CDunSignalWaiter::Stop()
     {
     FTRACE(FPrint( _L("CDunSignalWaiter::Stop()" )));
-    if ( iSignalWaiterState != EDunStateSignalWaiting )
-        {
-        FTRACE(FPrint( _L("CDunSignalWaiter::Stop() (not ready) complete" )));
-        return KErrNotReady;
-        }
-    if ( !iComm )
-        {
-        FTRACE(FPrint( _L("CDunSignalWaiter::Stop() (iComm) not initialized!" )));
-        return KErrGeneral;
-        }
-    iComm->NotifySignalChangeCancel();
     Cancel();
-    iSignalWaiterState = EDunStateIdle;
     FTRACE(FPrint( _L("CDunSignalWaiter::Stop() complete" )));
-    return KErrNone;
     }
 
 // ---------------------------------------------------------------------------
@@ -206,7 +191,6 @@
     {
     FTRACE(FPrint( _L("CDunSignalWaiter::Initialize()" ) ));
     // Don't initialize iChannelCallback here (it is set through NewL)
-    iSignalWaiterState = EDunStateIdle;
     iSignals = 0;
     iComm = NULL;
     FTRACE(FPrint( _L("CDunSignalWaiter::Initialize() complete" ) ));
@@ -220,7 +204,6 @@
 void CDunSignalWaiter::RunL()
     {
     FTRACE(FPrint( _L("CDunSignalWaiter::RunL()" ) ));
-    iSignalWaiterState = EDunStateIdle;
     TInt retTemp = iStatus.Int();
     if ( retTemp != KErrNone )
         {
@@ -254,4 +237,7 @@
 //
 void CDunSignalWaiter::DoCancel()
     {
+    FTRACE(FPrint( _L("CDunSignalWaiter::RunL()" ) ));
+    iComm->NotifySignalChangeCancel();
+    FTRACE(FPrint( _L("CDunSignalWaiter::RunL() complete" ) ));
     }
--- a/localconnectivityservice/dun/utils/src/DunStream.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/src/DunStream.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -312,7 +312,6 @@
     iBufferPtr = NULL;
     iReadLengthSocket = 0;
     iOperationType = EDunOperationTypeUndefined;
-    iTransferState = EDunStateIdle;
     iDirection = EDunDirectionUndefined;
     iNetwork = NULL;
     iSocket = NULL;
--- a/localconnectivityservice/dun/utils/src/DunUpstream.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/dun/utils/src/DunUpstream.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -166,35 +166,7 @@
     {
     FTRACE(FPrint( _L("CDunUpstream::Stop() (Dir=%d)" ), iDirection));
     // Don't stop CDunAtCmdHandler here as it is downstream related!
-    if ( iTransferState != EDunStateTransferring )
-        {
-        FTRACE(FPrint( _L("CDunUpstream::Stop() (not ready) complete" )));
-        return KErrNotReady;
-        }
-    // Stop only current operation
-    if ( iOperationType == EDunOperationTypeRead )
-        {
-        if ( iComm )
-            {
-            iComm->ReadCancel();
-            FTRACE(FPrint( _L("CDunUpstream::Stop() (RComm) cancelled" )));
-            }
-        else if ( iSocket )
-            {
-            iSocket->CancelRecv();
-            FTRACE(FPrint( _L("CDunUpstream::Stop() (RSocket) cancelled" )));
-            }
-        }
-    else if ( iOperationType == EDunOperationTypeWrite )
-        {
-        if ( iNetwork )
-            {
-            iNetwork->WriteCancel();
-            FTRACE(FPrint( _L("CDunUpstream::Stop() (Network) cancelled" )));
-            }
-        }
     Cancel();
-    iTransferState = EDunStateIdle;
     iOperationType = EDunOperationTypeUndefined;
     // Notify parent about inactivity
     if ( iActivityData.iActivityCallback && iActivityData.iNotified )
@@ -264,7 +236,7 @@
 
     FTRACE(FPrint( _L("CDunUpstream::IssueRequest() (Dir=%d)" ), iDirection));
 
-    if ( iTransferState != EDunStateIdle )
+    if ( IsActive() )
         {
         FTRACE(FPrint( _L("CDunUpstream::IssueRequest() (not ready) complete" ) ));
         return KErrNotReady;
@@ -285,16 +257,12 @@
         case EDunReaderUpstream:
             if ( iComm )
                 {
-                iStatus = KRequestPending;
-                iTransferState = EDunStateTransferring;
                 iComm->ReadOneOrMore( iStatus, *iBufferPtr );
                 SetActive();
                 FTRACE(FPrint( _L("CDunUpstream::IssueRequest() RComm ReadOneOrMore() requested" ) ));
                 }
             else if ( iSocket )
                 {
-                iStatus = KRequestPending;
-                iTransferState = EDunStateTransferring;
                 iSocket->RecvOneOrMore( *iBufferPtr, 0, iStatus, iReadLengthSocket );
                 SetActive();
                 FTRACE(FPrint( _L("CDunUpstream::IssueRequest() RSocket RecvOneOrMore() requested" ) ));
@@ -306,8 +274,6 @@
                 }
             break;
         case EDunWriterUpstream:
-            iStatus = KRequestPending;
-            iTransferState = EDunStateTransferring;
             iNetwork->Write( iStatus, *iBufferPtr );
             SetActive();
             FTRACE(FPrint( _L("CDunUpstream::IssueRequest() RComm Write() requested" ) ));
@@ -386,7 +352,6 @@
 void CDunUpstream::RunL()
     {
     FTRACE(FPrint( _L("CDunUpstream::RunL() (Dir=%d)" ), iDirection));
-    iTransferState = EDunStateIdle;
 
     TBool isError;
     TInt retTemp = iStatus.Int();
@@ -451,6 +416,32 @@
 void CDunUpstream::DoCancel()
     {
     FTRACE(FPrint( _L("CDunUpstream::DoCancel()" )));
+    // Stop only current operation
+    if ( iOperationType == EDunOperationTypeRead )
+        {
+        if ( iComm )
+            {
+            iComm->ReadCancel();
+            FTRACE(FPrint( _L("CDunUpstream::DoCancel() (RComm) cancelled" )));
+            }
+        else if ( iSocket )
+            {
+            iSocket->CancelRecv();
+            FTRACE(FPrint( _L("CDunUpstream::DoCancel() (RSocket) cancelled" )));
+            }
+        }
+    else if ( iOperationType == EDunOperationTypeWrite )
+        {
+        if ( iNetwork )
+            {
+            iNetwork->WriteCancel();
+            FTRACE(FPrint( _L("CDunUpstream::DoCancel() (Network) cancelled" )));
+            }
+        }
+    else
+        {
+        FTRACE(FPrint( _L("CDunUpstream::DoCancel() (ERROR) complete" )));
+        }
     FTRACE(FPrint( _L("CDunUpstream::DoCancel() complete" )));
     }
 
@@ -518,23 +509,15 @@
 // Stops AT command handling downstream related activity (also URC)
 // ---------------------------------------------------------------------------
 //
-TInt CDunUpstream::StopAtCmdHandling()
+void CDunUpstream::StopAtCmdHandling()
     {
     FTRACE(FPrint( _L("CDunUpstream::StopAtCmdHandling()" )));
-    TInt retVal = KErrNone;
     if ( iParseData.iAtCmdHandler )  // optional
         {
-        retVal = iParseData.iAtCmdHandler->StopUrc();
-        if ( retVal != KErrNone )
-            {
-            iParseData.iAtCmdHandler->Stop();
-            FTRACE(FPrint( _L("CDunUpstream::StopAtCmdHandling() (iAtCmdHandler) complete" )));
-            return retVal;
-            }
-        retVal = iParseData.iAtCmdHandler->Stop();
+        iParseData.iAtCmdHandler->StopUrc();
+        iParseData.iAtCmdHandler->Stop();
         }
     FTRACE(FPrint( _L("CDunUpstream::StopAtCmdHandling() complete" )));
-    return retVal;
     }
 
 // ---------------------------------------------------------------------------
--- a/localconnectivityservice/locod/group/locod.mmp	Tue Sep 28 20:14:08 2010 +0800
+++ b/localconnectivityservice/locod/group/locod.mmp	Thu Nov 04 15:31:42 2010 +0800
@@ -34,7 +34,7 @@
 SOURCE        locodservice.cpp
 
 USERINCLUDE   ../inc
-
+SYSTEMINCLUDE       /epoc32/include/ecom
 MW_LAYER_SYSTEMINCLUDE
 
 LIBRARY         euser.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/localconnectivityservice/locod/tsrc/locodTest/BWINS/locoddaemonmtU.def	Thu Nov 04 15:31:42 2010 +0800
@@ -0,0 +1,4 @@
+EXPORTS
+	?LibEntryL@@YAPAVCTestModuleBase@@XZ @ 1 NONAME ; class CTestModuleBase * LibEntryL(void)
+	?SetRequirements@@YAHAAPAVCTestModuleParam@@AAK@Z @ 2 NONAME ; int SetRequirements(class CTestModuleParam * &, unsigned long &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/localconnectivityservice/locod/tsrc/locodTest/eabi/locoddaemonmtu.def	Thu Nov 04 15:31:42 2010 +0800
@@ -0,0 +1,4 @@
+EXPORTS
+	_Z9LibEntryLv @ 1 NONAME
+	_Z15SetRequirementsRP16CTestModuleParamRm @ 2 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/localconnectivityservice/locod/tsrc/locodTest/group/bld.inf	Thu Nov 04 15:31:42 2010 +0800
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2002 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:  ?Description
+*
+*/
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+
+PRJ_TESTMMPFILES
+locoddaemonmt.mmp
+
+
+//  End of File
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/localconnectivityservice/locod/tsrc/locodTest/group/locoddaemonmt.mmp	Thu Nov 04 15:31:42 2010 +0800
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2002 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:  ?Description
+*
+*/
+
+#include <data_caging_paths.hrh>
+#include <platform_paths.hrh>
+
+TARGET          locoddaemonmt.dll
+TARGETTYPE      dll
+UID             0x1000008D 0x101FB3E7
+
+CAPABILITY      ALL -TCB
+
+SOURCEPATH      ../src
+SOURCE          daemonmt.cpp
+SOURCE          daemonmtCases.cpp
+SOURCE          BtSettings.cpp
+
+
+USERINCLUDE     ../inc 
+
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY         euser.lib
+LIBRARY         stiftestinterface.lib
+LIBRARY         btengsettings.lib
+
+LANG            SC
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/localconnectivityservice/locod/tsrc/locodTest/group/locoddaemonmt.pkg	Thu Nov 04 15:31:42 2010 +0800
@@ -0,0 +1,62 @@
+;
+; 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:
+;
+;
+; Installation file for STIF
+;
+
+; Languages
+&EN
+
+; Provide value for uid
+#{"locodDaemonMt"},(0x00000000),1,1,0,TYPE=SA, RU
+
+; Series60 product id for S60 5.0
+[0x1028315F], 0, 0, 0, {"Series60ProductID"}
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+; Logo
+; None
+
+; Package signature - Optional
+; None
+
+; Start of Package body
+
+; Condition blocks
+; None
+
+; Options list
+; None
+
+; Install files
+"\epoc32\release\armv5\udeb\locoddaemonmt.dll"-"c:\Sys\Bin\locoddaemonmt.dll"
+"..\init\locoddaemonmt.ini"-"e:\testing\init\locoddaemonmt.ini"
+  
+; Embedded SIS 
+; None
+
+; End of Package body
+
+; PKG dependencies
+; None
+
+; PKG capabilities
+; None
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/localconnectivityservice/locod/tsrc/locodTest/inc/BtSettings.h	Thu Nov 04 15:31:42 2010 +0800
@@ -0,0 +1,86 @@
+/*
+* Copyright (c) 2002 - 2008 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:  Class which is resposible for handling communication with
+*                Bt settings API
+*
+*/
+
+
+#ifndef BTSETTINGS_H
+#define BTSETTINGS_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <btengsettings.h>
+// CLASS DECLARATION
+
+/**
+ *  CBtSettings
+ */
+NONSHARABLE_CLASS( CBtSettings ) : public CBase,
+                                   public MBTEngSettingsObserver
+	{
+public:
+	// Constructors and destructor
+
+	/**
+	 * Destructor.
+	 */
+	~CBtSettings();
+
+	/**
+	 * Two-phased constructor.
+	 */
+	static CBtSettings* NewL();
+
+	/**
+	 * Two-phased constructor.
+	 */
+	static CBtSettings* NewLC();
+	
+    TInt GetPowerState( TBTPowerStateValue& aState );
+    TInt SetPowerState( TBTPowerStateValue aState );
+    TInt GetVisibilityMode( TBTVisibilityMode& aMode );
+    TInt SetVisibilityMode( TBTVisibilityMode aMode, TInt aTime = 0 );
+    TInt GetLocalName( TDes& aName );
+    TInt SetLocalName( const TDes& aName );
+
+
+private:
+
+	// From MBTEngSettingsObserver
+    void PowerStateChanged( TBTPowerStateValue aState );
+    void VisibilityModeChanged( TBTVisibilityMode aState );
+	
+	/**
+	 * Constructor for performing 1st stage construction
+	 */
+	CBtSettings();
+
+	/**
+	 * EPOC default constructor for performing 2nd stage construction
+	 */
+	void ConstructL();
+
+	
+private: //Data
+	
+	CBTEngSettings* iSettings; // Own.
+	CActiveSchedulerWait* iWaiter; //Own.
+	TInt iError;
+	
+	};
+
+#endif // BTSETTINGS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/localconnectivityservice/locod/tsrc/locodTest/inc/daemonmt.h	Thu Nov 04 15:31:42 2010 +0800
@@ -0,0 +1,301 @@
+/*
+* Copyright (c) 2002 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:  daemonmt test module.
+*
+*/
+
+
+
+#ifndef DAEMONMT_H
+#define DAEMONMT_H
+
+// INCLUDES
+#include "StifTestModule.h"
+#include <StifLogger.h>
+#include <e32property.h>
+#include "BtSettings.h"
+
+// CONSTANTS
+//const ?type ?constant_var = ?constant;
+
+// MACROS
+//#define ?macro ?macro_def
+
+// Logging path
+_LIT( KdaemonmtLogPath, "\\logs\\testframework\\daemonmt\\" ); 
+// Log file
+_LIT( KdaemonmtLogFile, "daemonmt.txt" ); 
+
+// Function pointer related internal definitions
+// Visual studio 6.0 (__VC32__) needs different type of handling 
+#ifdef __VC32__
+#define GETPTR
+#else
+#define GETPTR &
+#endif  
+#define ENTRY(str,func) {_S(str), GETPTR func,0,0,0}
+#define FUNCENTRY(func) {_S(#func), GETPTR func,0,0,0}
+#define OOM_ENTRY(str,func,a,b,c) {_S(str), GETPTR func,a,b,c}
+#define OOM_FUNCENTRY(func,a,b,c) {_S(#func), GETPTR func,a,b,c}
+
+// FUNCTION PROTOTYPES
+//?type ?function_name(?arg_list);
+
+// FORWARD DECLARATIONS
+//class ?FORWARD_CLASSNAME;
+class Cdaemonmt;
+
+// DATA TYPES
+//enum ?declaration
+//typedef ?declaration
+//extern ?data_type;
+// A typedef for function that does the actual testing,
+// function is a type 
+// TInt Cdaemonmt::<NameOfFunction> ( TTestResult& aResult )
+typedef TInt (Cdaemonmt::* TestFunction)(TTestResult&);
+
+// CLASS DECLARATION
+
+/**
+*  An internal structure containing a test case name and
+*  the pointer to function doing the test
+*
+*  @lib ?library
+*  @since ?Series60_version
+*/
+class TCaseInfoInternal
+    {
+    public:
+        const TText*    iCaseName;
+        TestFunction    iMethod;
+        TBool           iIsOOMTest;
+        TInt            iFirstMemoryAllocation;
+        TInt            iLastMemoryAllocation;
+    };
+
+// CLASS DECLARATION
+
+/**
+*  A structure containing a test case name and
+*  the pointer to function doing the test
+*
+*  @lib ?library
+*  @since ?Series60_version
+*/
+class TCaseInfo
+    {
+    public:
+        TPtrC iCaseName;
+        TestFunction iMethod;
+        TBool           iIsOOMTest;
+        TInt            iFirstMemoryAllocation;
+        TInt            iLastMemoryAllocation;
+
+    TCaseInfo( const TText* a ) : iCaseName( (TText*) a )
+        {
+        };
+
+    };
+
+
+// CLASS DECLARATION
+
+/**
+*  This a daemonmt class.
+*  ?other_description_lines
+*
+*  @lib ?library
+*  @since ?Series60_version
+*/
+NONSHARABLE_CLASS(Cdaemonmt) : public CTestModuleBase
+    {
+    public:  // Constructors and destructor
+
+
+        /**
+        * Two-phased constructor.
+        */
+        static Cdaemonmt* NewL();
+
+        /**
+        * Destructor.
+        */
+        virtual ~Cdaemonmt();
+
+    public: // New functions
+
+        /**
+        * ?member_description.
+        * @since ?Series60_version
+        * @param ?arg1 ?description
+        * @return ?description
+        */
+        //?type ?member_function( ?type ?arg1 );
+
+    public: // Functions from base classes
+
+        /**
+        * From CTestModuleBase InitL is used to initialize the 
+        *       daemonmt. It is called once for every instance of 
+        *       TestModuledaemonmt after its creation.
+        * @since ?Series60_version
+        * @param aIniFile Initialization file for the test module (optional)
+        * @param aFirstTime Flag is true when InitL is executed for first 
+        *               created instance of daemonmt.
+        * @return Symbian OS error code
+        */
+        TInt InitL( TFileName& aIniFile, TBool aFirstTime );
+
+        /**
+        * From CTestModuleBase GetTestCasesL is used to inquiry test cases 
+        *   from daemonmt. 
+        * @since ?Series60_version
+        * @param aTestCaseFile Test case file (optional)
+        * @param aTestCases  Array of TestCases returned to test framework
+        * @return Symbian OS error code
+        */
+        TInt GetTestCasesL( const TFileName& aTestCaseFile, 
+                            RPointerArray<TTestCaseInfo>& aTestCases );
+
+        /**
+        * From CTestModuleBase RunTestCaseL is used to run an individual 
+        *   test case. 
+        * @since ?Series60_version
+        * @param aCaseNumber Test case number
+        * @param aTestCaseFile Test case file (optional)
+        * @param aResult Test case result returned to test framework (PASS/FAIL)
+        * @return Symbian OS error code (test case execution error, which is 
+        *           not reported in aResult parameter as test case failure).
+        */   
+        TInt RunTestCaseL( const TInt aCaseNumber, 
+                           const TFileName& aTestCaseFile,
+                           TTestResult& aResult );
+
+        /**
+        * From CTestModuleBase; OOMTestQueryL is used to specify is particular
+        * test case going to be executed using OOM conditions
+        * @param aTestCaseFile Test case file (optional)
+        * @param aCaseNumber Test case number (optional)
+        * @param aFailureType OOM failure type (optional)
+        * @param aFirstMemFailure The first heap memory allocation failure value (optional)
+        * @param aLastMemFailure The last heap memory allocation failure value (optional)
+        * @return TBool
+        */
+        virtual TBool OOMTestQueryL( const TFileName& /* aTestCaseFile */, 
+                                     const TInt /* aCaseNumber */, 
+                                     TOOMFailureType& aFailureType, 
+                                     TInt& /* aFirstMemFailure */, 
+                                     TInt& /* aLastMemFailure */ );
+
+        /**
+        * From CTestModuleBase; OOMTestInitializeL may be used to initialize OOM
+        * test environment
+        * @param aTestCaseFile Test case file (optional)
+        * @param aCaseNumber Test case number (optional)
+        * @return None
+        */
+        virtual void OOMTestInitializeL( const TFileName& /* aTestCaseFile */, 
+                                    const TInt /* aCaseNumber */ ); 
+
+        /**
+        * From CTestModuleBase; OOMHandleWarningL
+        * @param aTestCaseFile Test case file (optional)
+        * @param aCaseNumber Test case number (optional)
+        * @param aFailNextValue FailNextValue for OOM test execution (optional)
+        * @return None
+        *
+        * User may add implementation for OOM test warning handling. Usually no
+        * implementation is required.           
+        */
+        virtual void OOMHandleWarningL( const TFileName& /* aTestCaseFile */,
+                                        const TInt /* aCaseNumber */, 
+                                        TInt& /* aFailNextValue */); 
+
+        /**
+        * From CTestModuleBase; OOMTestFinalizeL may be used to finalize OOM
+        * test environment
+        * @param aTestCaseFile Test case file (optional)
+        * @param aCaseNumber Test case number (optional)
+        * @return None
+        *
+        */
+        virtual void OOMTestFinalizeL( const TFileName& /* aTestCaseFile */, 
+                                       const TInt /* aCaseNumber */ );
+
+    protected:  // New functions
+
+        /**
+        * ?member_description.
+        * @since ?Series60_version
+        * @param ?arg1 ?description
+        * @return ?description
+        */
+        //?type ?member_function( ?type ?arg1 );
+
+    protected:  // Functions from base classes
+
+        /**
+        * From ?base_class ?member_description
+        */
+        //?type ?member_function();
+
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        Cdaemonmt();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+        /**
+         * Callback for CPeriodic.
+         */
+        static TInt PeriodicTimerCallBack(TAny* aAny);
+        
+        /**
+        * Function returning test case name and pointer to test case function.
+        * @since ?Series60_version
+        * @param aCaseNumber test case number
+        * @return TCaseInfo 
+        */
+        const TCaseInfo Case ( const TInt aCaseNumber ) const;
+
+        /**
+        * Actual Hardcoded test case functions are listed below.
+        */
+        
+        TInt StartDaemon( TTestResult& aResult );
+
+        
+    private:    // Data
+        // Pointer to test (function) to be executed
+        TestFunction iMethod;
+
+        // Pointer to logger
+        CStifLogger * iLog;
+        
+        CActiveScheduler* iScheduler;
+        
+        RProperty iProperty;
+        
+        CBtSettings* iBtSettings;
+    };
+
+#endif      // DAEMONMT_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/localconnectivityservice/locod/tsrc/locodTest/init/locoddaemonmt.ini	Thu Nov 04 15:31:42 2010 +0800
@@ -0,0 +1,196 @@
+#
+# This is STIF initialization file
+# Comment lines start with '#'-character.
+# See STIF TestFramework users guide.doc for instructions
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set following test engine settings:
+#	- Set Test Reporting mode. TestReportMode's possible values are:
+#		+ 'Summary': Summary of the tested test cases.
+#		+ 'Environment': Hardware and software info.
+#		+ 'TestCases': Test case report.
+#		+ 'FullReport': Set of all above ones.
+#		+ Example 'TestReportMode= Summary TestCases'
+#
+# 	- CreateTestReport setting controls report creation mode
+#		+ YES, Test report will created.
+#		+ NO, No Test report.
+#
+# 	- File path indicates the base path of the test report.
+# 	- File name indicates the name of the test report.
+#
+# 	- File format indicates the type of the test report.
+#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
+#		+ HTML, Test report will be html type, for example 'TestReport.html'.
+#
+# 	- File output indicates output source of the test report.
+#		+ FILE, Test report logging to file.
+#		+ RDEBUG, Test report logging to using rdebug.
+#
+# 	- File Creation Mode indicates test report overwriting if file exist.
+#		+ OVERWRITE, Overwrites if the Test report file exist.
+#		+ APPEND, Continue logging after the old Test report information if
+#                 report exist.
+# 	- Sets a device reset module's dll name(Reboot).
+#		+ If Nokia specific reset module is not available or it is not correct one
+#		  StifHWResetStub module may use as a template for user specific reset
+#		  module.
+# 	- Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
+#		DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
+#
+
+[Engine_Defaults]
+
+TestReportMode= FullReport		# Possible values are: 'Empty', 'Summary', 'Environment',
+                                                               'TestCases' or 'FullReport'
+
+CreateTestReport= YES			# Possible values: YES or NO
+
+TestReportFilePath= E:\testing\logs\
+TestReportFileName= locodDaemonMt_TestReport
+
+TestReportFormat= TXT			# Possible values: TXT or HTML
+TestReportOutput= FILE			# Possible values: FILE or RDEBUG
+TestReportFileCreationMode= OVERWRITE	# Possible values: OVERWRITE or APPEND
+
+DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
+
+DisableMeasurement= stifmeasurementdisablenone	# Possible values are:
+						# 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
+					  	# 'stifmeasurementplugin01', 'stifmeasurementplugin02',
+					  	# 'stifmeasurementplugin03', 'stifmeasurementplugin04',
+					  	# 'stifmeasurementplugin05' or 'stifbappeaprofiler'
+
+Timeout= 0                              # Default timeout value for each test case. In milliseconds
+
+[End_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Module configurations start
+# Modules are added between module tags
+# tags. Module name is specified after ModuleName= tag, like
+# ModuleName= XXXXXXXXX
+# Modules might have initialisation file, specified as
+# IniFile= c:\testframework\YYYYYY
+# Modules might have several configuration files, like
+# TestCaseFile= c:\testframework\NormalCases.txt
+# TestCaseFile= c:\testframework\SmokeCases.txt
+# TestCaseFile= c:\testframework\ManualCases.txt
+
+# (TestCaseFile is synonym for old term ConfigFile)
+
+# Following case specifies demo module settings. Demo module
+# does not read any settings from file, so tags 
+# IniFile and TestCaseFile are not used.
+# In the simplest case it is enough to specify only the
+# name of the test module when adding new test module
+
+[New_Module]
+ModuleName= locoddaemonmt
+[End_Module]
+
+
+# Load testmoduleXXX, optionally with initialization file and/or test case files
+#[New_Module]
+#ModuleName= testmodulexxx
+
+#TestModuleXXX used initialization file
+#IniFile= c:\testframework\init.txt
+
+#TestModuleXXX used configuration file(s)
+#TestCaseFile= c:\testframework\testcases1.cfg
+#TestCaseFile= c:\testframework\testcases2.cfg
+#TestCaseFile= c:\testframework\manualtestcases.cfg
+
+#[End_Module]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+
+
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+# Set STIF logging overwrite parameters for Logger.
+# 	Hardware and emulator environment logging path and styles can
+# 	be configured from here to overwrite the Logger's implemented values.
+#	
+#	Settings description:
+#	- Indicates option for creation log directory/directories. If log directory/directories
+#         is/are not created by user they will make by software.
+#		+ YES, Create log directory/directories if not allready exist.
+#		+ NO, Log directory/directories not created. Only created one is used.
+#
+#	- Overwrite emulator path setting.
+#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
+#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
+#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
+#
+#	- Overwrite emulator's logging format.
+#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
+#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
+#
+#	- Overwrited emulator logging output source.
+#		+ FILE, Logging to file(s).
+#		+ RDEBUG, Logging to using rdebug(s).
+#
+#	- Overwrite hardware path setting (Same description as above in emulator path).
+#	- Overwrite hardware's logging format(Same description as above in emulator format).
+#	- Overwrite hardware's logging output source(Same description as above in emulator output).
+#
+#	- File Creation Mode indicates file overwriting if file exist.
+#		+ OVERWRITE, Overwrites if file(s) exist.
+#		+ APPEND, Continue logging after the old logging information if file(s) exist.
+#
+#	- Will thread id include to the log filename.
+#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
+#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
+#
+#	- Will time stamps include the to log file.
+#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
+#                 for example'12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No time stamp(s).
+#
+#	- Will line breaks include to the log file.
+#		+ YES, Each logging event includes line break and next log event is in own line.
+#		+ NO, No line break(s).
+#
+#	- Will event ranking include to the log file.
+#		+ YES, Event ranking number added to each line in log file(s). Ranking number
+#                 depends on environment's tics, for example(includes time stamp also)
+#                 '012   12.Nov.2003 115958    LOGGING INFO'
+#		+ NO, No event ranking.
+#
+#	- Will write log file in unicode format.
+#		+ YES, Log file will be written in unicode format
+#		+ NO, Log will be written as normal, not unicode, file.
+#
+
+[Logger_Defaults]
+
+#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
+#NOTE: TestEngine and TestServer logging settings cannot change here
+
+CreateLogDirectories= YES		# Possible values: YES or NO
+
+#EmulatorBasePath= C:\LOGS\TestFramework\
+#EmulatorFormat= HTML			# Possible values: TXT or HTML
+#EmulatorOutput= FILE			# Possible values: FILE or RDEBUG
+
+#HardwareBasePath= D:\LOGS\TestFramework\
+#HardwareFormat= HTML			# Possible values: TXT or HTML
+#HardwareOutput= FILE			# Possible values: FILE or RDEBUG
+
+#FileCreationMode= OVERWRITE		# Possible values: OVERWRITE or APPEND
+
+#ThreadIdToLogFile= YES			# Possible values: YES or NO
+#WithTimeStamp= YES			# Possible values: YES or NO
+#WithLineBreak= YES			# Possible values: YES or NO
+#WithEventRanking= YES			# Possible values: YES or NO
+
+#FileUnicode= YES			# Possible values: YES or NO
+
+[End_Logger_Defaults]
+# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
+
+# End of file
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/localconnectivityservice/locod/tsrc/locodTest/src/BtSettings.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -0,0 +1,136 @@
+/*
+* Copyright (c) 2002 - 2008 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:  Class which is resposible for handling communication with
+*                Bt settings API
+*
+*/
+
+
+#include "BtSettings.h"
+
+CBtSettings::CBtSettings()
+	{
+	// No implementation required
+	}
+
+CBtSettings::~CBtSettings()
+	{
+	delete iSettings;
+	if( iWaiter->IsStarted() )
+		{
+		iWaiter->AsyncStop();
+		}
+	delete iWaiter;
+	}
+
+CBtSettings* CBtSettings::NewLC()
+	{
+	CBtSettings* self = new ( ELeave ) CBtSettings();
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	return self;
+	}
+
+CBtSettings* CBtSettings::NewL()
+	{
+	CBtSettings* self = CBtSettings::NewLC();
+	CleanupStack::Pop(); // self;
+	return self;
+	}
+
+void CBtSettings::ConstructL()
+	{
+	iWaiter = new ( ELeave ) CActiveSchedulerWait();
+	iSettings = CBTEngSettings::NewL( this );
+	iError = KErrNone;
+	}
+
+void CBtSettings::PowerStateChanged( TBTPowerStateValue /*aState*/ )
+	{
+	if( iWaiter->IsStarted() )
+		{
+		iWaiter->AsyncStop();
+		}
+	}
+
+void CBtSettings::VisibilityModeChanged( TBTVisibilityMode /*aState*/ )
+	{
+	if( iWaiter->IsStarted() )
+		{
+		iWaiter->AsyncStop();
+		}
+	}
+
+TInt CBtSettings::GetPowerState( TBTPowerStateValue& aState )
+	{
+	iError = iSettings->GetPowerState( aState );
+	return iError;
+	}
+
+TInt CBtSettings::SetPowerState( TBTPowerStateValue aState )
+	{
+    TBTPowerStateValue state;
+    
+    iError = iSettings->GetPowerState( state );
+	if( iError )
+		{
+		return iError;
+		}
+	else if( state != aState )
+			{
+			if( state == EBTPowerOff )
+				{
+				iError = iSettings->SetPowerState( EBTPowerOn );
+				}
+			else
+				{
+				iError = iSettings->SetPowerState( EBTPowerOff );
+			    }
+			
+			if( iError )
+				{
+				return iError;
+				}
+			else
+				{
+		        if ( !iWaiter->IsStarted() )
+		            {
+		            iWaiter->Start();
+		            }
+				}
+			}
+	return iError;
+	}
+
+TInt CBtSettings::GetVisibilityMode( TBTVisibilityMode& aMode )
+	{
+	return KErrNone;
+	}
+
+TInt SetVisibilityMode( TBTVisibilityMode aMode, TInt aTime )
+	{
+	return KErrNone;
+	}
+
+TInt GetLocalName( TDes& aName )
+	{
+	return KErrNone;
+	}
+
+TInt SetLocalName( const TDes& aName )
+	{
+	return KErrNone;
+	}
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/localconnectivityservice/locod/tsrc/locodTest/src/daemonmt.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -0,0 +1,337 @@
+/*
+* Copyright (c) 2002 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:  daemonmt class member functions
+*
+*/
+
+
+
+// INCLUDE FILES
+#include <Stiftestinterface.h>
+#include "daemonmt.h"
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// Cdaemonmt::Cdaemonmt
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+Cdaemonmt::Cdaemonmt()
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// Cdaemonmt::ConstructL
+// Symbian 2nd phase constructor can leave.
+//
+// Note: If OOM test case uses STIF Logger, then STIF Logger must be created
+// with static buffer size parameter (aStaticBufferSize). Otherwise Logger 
+// allocates memory from heap and therefore causes error situations with OOM 
+// testing. For more information about STIF Logger construction, see STIF Users 
+// Guide.
+// -----------------------------------------------------------------------------
+//
+void Cdaemonmt::ConstructL()
+    {
+    iLog = CStifLogger::NewL( KdaemonmtLogPath, 
+                          KdaemonmtLogFile);
+
+    // Sample how to use logging
+    _LIT( KLogStart, "daemonmt logging starts!" );
+    iLog->Log( KLogStart );
+    
+    iScheduler = new (ELeave) CActiveScheduler;
+    CActiveScheduler::Install( iScheduler );
+    }
+
+// -----------------------------------------------------------------------------
+// Cdaemonmt::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+Cdaemonmt* Cdaemonmt::NewL()
+    {
+    Cdaemonmt* self = new (ELeave) Cdaemonmt;
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+
+    return self;
+
+    }
+
+// Destructor
+Cdaemonmt::~Cdaemonmt()
+    {
+    iProperty.Close();
+    delete iLog;
+    if( iBtSettings )
+    	{
+    	delete iBtSettings;
+    	}
+    delete iScheduler;
+    }
+
+// -----------------------------------------------------------------------------
+// Cdaemonmt::InitL
+// InitL is used to initialize the Test Module.
+// -----------------------------------------------------------------------------
+//
+TInt Cdaemonmt::InitL( 
+    TFileName& /*aIniFile*/, 
+    TBool /*aFirstTime*/ )
+    {
+    return KErrNone;
+    // start LocalConnectivityDaemon.exe
+    //return StartDaemon();
+
+    }
+
+// -----------------------------------------------------------------------------
+// Cdaemonmt::GetTestCasesL
+// GetTestCases is used to inquire test cases from the Test Module. Test
+// cases are stored to array of test cases. The Test Framework will be 
+// the owner of the data in the RPointerArray after GetTestCases return
+// and it does the memory deallocation. 
+// -----------------------------------------------------------------------------
+//
+TInt Cdaemonmt::GetTestCasesL( 
+    const TFileName& /*aConfig*/, 
+    RPointerArray<TTestCaseInfo>& aTestCases )
+    {
+
+    // Loop through all test cases and create new
+    // TTestCaseInfo items and append items to aTestCase array    
+    for( TInt i = 0; Case(i).iMethod != NULL; i++ )
+        {
+
+        // Allocate new TTestCaseInfo from heap for a testcase definition.
+        TTestCaseInfo* newCase = new( ELeave ) TTestCaseInfo();
+
+        // PushL TTestCaseInfo to CleanupStack.    
+        CleanupStack::PushL( newCase );
+
+        // Set number for the testcase.
+        // When the testcase is run, this comes as a parameter to RunTestCaseL.
+        newCase->iCaseNumber = i;
+
+        // Set title for the test case. This is shown in UI to user.
+        newCase->iTitle.Copy( Case(i).iCaseName );
+
+        // Append TTestCaseInfo to the testcase array. After appended 
+        // successfully the TTestCaseInfo object is owned (and freed) 
+        // by the TestServer. 
+        User::LeaveIfError(aTestCases.Append ( newCase ) );
+
+        // Pop TTestCaseInfo from the CleanupStack.
+        CleanupStack::Pop( newCase );
+
+        }
+
+    return KErrNone;
+
+    }
+
+// -----------------------------------------------------------------------------
+// Cdaemonmt::RunTestCaseL
+// RunTestCaseL is used to run an individual test case specified 
+// by aTestCase. Test cases that can be run may be requested from 
+// Test Module by GetTestCases method before calling RunTestCase.
+// -----------------------------------------------------------------------------
+//
+TInt Cdaemonmt::RunTestCaseL( 
+    const TInt aCaseNumber,   
+    const TFileName& /*aConfig*/,
+    TTestResult& aResult )
+    {
+
+    // Return value
+    TInt execStatus = KErrNone;
+
+    // Get the pointer to test case function
+    TCaseInfo tmp = Case ( aCaseNumber );
+
+    _LIT( KLogStartTC, "Starting testcase [%S]" );
+    iLog->Log( KLogStartTC, &tmp.iCaseName);
+
+    // Check that case number was valid
+    if ( tmp.iMethod != NULL )
+        {
+        // Valid case was found, call it via function pointer
+        iMethod = tmp.iMethod;        
+        execStatus  = ( this->*iMethod )( aResult );
+        }
+    else
+        {
+        // Valid case was not found, return error.
+        execStatus = KErrNotFound;
+        }
+
+    // Return case execution status (not the result of the case execution)
+    return execStatus;
+
+    }
+
+// -----------------------------------------------------------------------------
+// Cdaemonmt::OOMTestQueryL
+// Used to check if a particular test case should be run in OOM conditions and 
+// which memory allocations should fail.    
+// -----------------------------------------------------------------------------
+//
+TBool Cdaemonmt::OOMTestQueryL( 
+                                const TFileName& /* aTestCaseFile */, 
+                                const TInt aCaseNumber, 
+                                TOOMFailureType& /* aFailureType */, 
+                                TInt& aFirstMemFailure, 
+                                TInt& aLastMemFailure ) 
+    {
+    _LIT( KLogOOMTestQueryL, "Cdaemonmt::OOMTestQueryL" );
+    iLog->Log( KLogOOMTestQueryL );     
+
+    aFirstMemFailure = Case( aCaseNumber ).iFirstMemoryAllocation;
+    aLastMemFailure = Case( aCaseNumber ).iLastMemoryAllocation;
+
+    return Case( aCaseNumber ).iIsOOMTest;
+
+    }
+
+// -----------------------------------------------------------------------------
+// Cdaemonmt::OOMTestInitializeL
+// Used to perform the test environment setup for a particular OOM test case. 
+// Test Modules may use the initialization file to read parameters for Test 
+// Module initialization but they can also have their own configure file or 
+// some other routine to initialize themselves.  
+//
+// NOTE: User may add implementation for OOM test environment initialization.
+// Usually no implementation is required.
+// -----------------------------------------------------------------------------
+//
+void Cdaemonmt::OOMTestInitializeL( 
+                                const TFileName& /* aTestCaseFile */, 
+                                const TInt /* aCaseNumber */ )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// Cdaemonmt::OOMHandleWarningL
+// In some cases the heap memory allocation should be skipped, either due to
+// problems in the OS code or components used by the code being tested, or even 
+// inside the tested components which are implemented this way on purpose (by 
+// design), so it is important to give the tester a way to bypass allocation 
+// failures.
+//
+// NOTE: User may add implementation for OOM test warning handling. Usually no
+// implementation is required.
+// -----------------------------------------------------------------------------
+//
+void Cdaemonmt::OOMHandleWarningL( 
+                                const TFileName& /* aTestCaseFile */,
+                                const TInt /* aCaseNumber */, 
+                                TInt& /* aFailNextValue */ )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// Cdaemonmt::OOMTestFinalizeL
+// Used to perform the test environment cleanup for a particular OOM test case.
+//
+// NOTE: User may add implementation for OOM test environment finalization.
+// Usually no implementation is required.
+// -----------------------------------------------------------------------------
+//
+void Cdaemonmt::OOMTestFinalizeL( 
+                                const TFileName& /* aTestCaseFile */, 
+                                const TInt /* aCaseNumber */ )
+    {
+    }
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+// -----------------------------------------------------------------------------
+// LibEntryL is a polymorphic Dll entry point
+// Returns: CTestModuleBase*: Pointer to Test Module object
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CTestModuleBase* LibEntryL()
+    {
+    return Cdaemonmt::NewL();
+
+    }
+
+// -----------------------------------------------------------------------------
+// SetRequirements handles test module parameters(implements evolution
+// version 1 for test module's heap and stack sizes configuring).
+// Returns: TInt: Symbian error code.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt SetRequirements( CTestModuleParam*& /*aTestModuleParam*/, 
+                                TUint32& /*aParameterValid*/ )
+    {
+
+    /* --------------------------------- NOTE ---------------------------------
+    USER PANICS occurs in test thread creation when:
+    1) "The panic occurs when the value of the stack size is negative."
+    2) "The panic occurs if the minimum heap size specified is less
+       than KMinHeapSize".
+       KMinHeapSize: "Functions that require a new heap to be allocated will
+       either panic, or will reset the required heap size to this value if
+       a smaller heap size is specified".
+    3) "The panic occurs if the minimum heap size specified is greater than
+       the maximum size to which the heap can grow".
+    Other:
+    1) Make sure that your hardware or Symbian OS is supporting given sizes.
+       e.g. Hardware might support only sizes that are divisible by four.
+    ------------------------------- NOTE end ------------------------------- */
+
+    // Normally STIF uses default heap and stack sizes for test thread, see:
+    // KTestThreadMinHeap, KTestThreadMinHeap and KStackSize.
+    // If needed heap and stack sizes can be configured here by user. Remove
+    // comments and define sizes.
+
+/*
+    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
+
+    aTestModuleParam = param;
+*/
+    return KErrNone;
+
+    }
+
+// -----------------------------------------------------------------------------
+// E32Dll is a DLL entry point function
+// Returns: KErrNone: No error
+// -----------------------------------------------------------------------------
+//
+#ifndef EKA2 // Hide Dll entry point to EKA2
+GLDEF_C TInt E32Dll(
+    TDllReason /*aReason*/) // Reason
+    {
+    return(KErrNone);
+
+    }
+#endif // EKA2
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/localconnectivityservice/locod/tsrc/locodTest/src/daemonmtCases.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -0,0 +1,224 @@
+/*
+* Copyright (c) 2002 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:  ?Description
+*
+*/
+
+
+
+// INCLUDE FILES
+#include <e32math.h>
+#include <StartupDomainPSKeys.h>
+#include "daemonmt.h"
+
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// Cdaemonmt::Case
+// Returns a test case by number.
+//
+// This function contains an array of all available test cases 
+// i.e pair of case name and test function. If case specified by parameter
+// aCaseNumber is found from array, then that item is returned.
+// 
+// The reason for this rather complicated function is to specify all the
+// test cases only in one place. It is not necessary to understand how
+// function pointers to class member functions works when adding new test
+// cases. See function body for instructions how to add new test case.
+// -----------------------------------------------------------------------------
+//
+const TCaseInfo Cdaemonmt::Case ( 
+    const TInt aCaseNumber ) const 
+     {
+
+    /**
+    * To add new test cases, implement new test case function and add new 
+    * line to KCases array specify the name of the case and the function 
+    * doing the test case
+    * In practice, do following
+    * 1) Make copy of existing test case function and change its name
+    *    and functionality. Note that the function must be added to 
+    *    daemonmt.cpp file and to daemonmt.h 
+    *    header file.
+    *
+    * 2) Add entry to following KCases array either by using:
+    *
+    * 2.1: FUNCENTRY or ENTRY macro
+    * ENTRY macro takes two parameters: test case name and test case 
+    * function name.
+    *
+    * FUNCENTRY macro takes only test case function name as a parameter and
+    * uses that as a test case name and test case function name.
+    *
+    * Or
+    *
+    * 2.2: OOM_FUNCENTRY or OOM_ENTRY macro. Note that these macros are used
+    * only with OOM (Out-Of-Memory) testing!
+    *
+    * OOM_ENTRY macro takes five parameters: test case name, test case 
+    * function name, TBool which specifies is method supposed to be run using
+    * OOM conditions, TInt value for first heap memory allocation failure and 
+    * TInt value for last heap memory allocation failure.
+    * 
+    * OOM_FUNCENTRY macro takes test case function name as a parameter and uses
+    * that as a test case name, TBool which specifies is method supposed to be
+    * run using OOM conditions, TInt value for first heap memory allocation 
+    * failure and TInt value for last heap memory allocation failure. 
+    */ 
+
+    static TCaseInfoInternal const KCases[] =
+        {
+        // To add new test cases, add new items to this array
+        ENTRY( "StartDaemon test", Cdaemonmt::StartDaemon )
+        };
+
+    // Verify that case number is valid
+    if( (TUint) aCaseNumber >= sizeof( KCases ) / 
+                               sizeof( TCaseInfoInternal ) )
+        {
+        // Invalid case, construct empty object
+        TCaseInfo null( (const TText*) L"" );
+        null.iMethod = NULL;
+        null.iIsOOMTest = EFalse;
+        null.iFirstMemoryAllocation = 0;
+        null.iLastMemoryAllocation = 0;
+        return null;
+        } 
+
+    // Construct TCaseInfo object and return it
+    TCaseInfo tmp ( KCases[ aCaseNumber ].iCaseName );
+    tmp.iMethod = KCases[ aCaseNumber ].iMethod;
+    tmp.iIsOOMTest = KCases[ aCaseNumber ].iIsOOMTest;
+    tmp.iFirstMemoryAllocation = KCases[ aCaseNumber ].iFirstMemoryAllocation;
+    tmp.iLastMemoryAllocation = KCases[ aCaseNumber ].iLastMemoryAllocation;
+    return tmp;
+    }
+
+
+TInt Cdaemonmt::StartDaemon( TTestResult& aResult )
+	{
+	iBtSettings = CBtSettings::NewL();
+	iLog->Log( _L( "Starting test and setting BT Power ON" ) );
+	TInt error = iBtSettings->SetPowerState( EBTPowerOn );
+	if( error )
+		{
+		iLog->Log( _L( "Error %d when setting BT power state" ), error );
+		aResult.SetResult( KErrGeneral, _L( "StartDaemon failed" ) );
+		return KErrNone;
+		}
+    
+    TInt systemState = KErrNone;
+    error = iProperty.Get( KPSUidStartup, KPSGlobalSystemState, systemState );
+    if( error )
+    	{
+    	iLog->Log( _L( "Failed to get GlobalSystemState" ) );
+    	}
+    
+    // Switching GlobalSystemState to ESwStateShuttingDown causes locod
+    // not to load bearer plugins immediately after its starts.
+    iLog->Log( _L( "Changing GlobalSystemState to ESwStateShuttingDown" ) );
+    error = iProperty.Set( KPSUidStartup, KPSGlobalSystemState, ESwStateShuttingDown );
+    if( error )
+    	{
+    	iLog->Log( _L( "Failed to switch GlobalSystemState to ESwStateShuttingDown with error: %d" ), error );
+    	aResult.SetResult( KErrGeneral, _L( "StartDaemon failed" ) );
+    	return KErrNone;
+    	}
+
+    _LIT(KDaemonExe, "locod.exe");
+    // Starts Daemon in a new process.
+    const TUidType exeUid(KNullUid, KNullUid, TUid::Uid(0x2000276D));
+    RProcess daemon;
+    TInt r = daemon.Create(KDaemonExe, KNullDesC, exeUid);
+    TBuf<256> err;
+    if (r != KErrNone)
+    	{
+    	_LIT( KDescription, "StartDaemon failed: daemon.Create() %d" );
+    	aResult.SetResult( r, KDescription );    
+    	err.Format( KDescription, r);
+    	iLog->Log( err );
+    	return r;
+    	}
+    daemon.Resume();
+
+    // Switching GlobalSystemState to ESwStateNormalRfOn causes locod
+    // to load bearer plugins.
+    iLog->Log( _L( "Changing GlobalSystemState to ESwStateNormalRfOn" ) );
+    error = iProperty.Set( KPSUidStartup, KPSGlobalSystemState, ESwStateNormalRfOn );
+    if( error )
+    	{
+    	iLog->Log( _L( "Failed to switch GlobalSystemState to ESwStateNormalRfOn with error: %d" ), error );
+    	aResult.SetResult( KErrGeneral, _L( "StartDaemon failed" ) );
+    	return KErrNone;
+    	}
+
+    User::After( 2000000 );
+
+    // Switching GlobalSystemState to ESwStateShuttingDown causes locod
+    // to unload bearer plugins.
+    iLog->Log( _L( "Changing GlobalSystemState to ESwStateShuttingDown" ) );
+    error = iProperty.Set( KPSUidStartup, KPSGlobalSystemState, ESwStateShuttingDown );
+    if( error )
+    	{
+    	iLog->Log( _L( "Failed to switch GlobalSystemState to ESwStateShuttingDown with error: %d" ), error );
+    	aResult.SetResult( KErrGeneral, _L( "StartDaemon failed" ) );
+    	return KErrNone;
+    	}
+
+    User::After( 2000000 );
+    daemon.Close();
+
+    // Switching GlobalSystemState to the state forom the start of the test to leave the LC stack
+    // working after the test.
+    if( systemState != KErrNone )
+    	{
+    	iLog->Log( _L( "Changing GlobalSystemState to %d" ), systemState );
+    	error = iProperty.Set( KPSUidStartup, KPSGlobalSystemState, systemState );
+    	}
+    else
+    	{
+    	iLog->Log( _L( "Changing GlobalSystemState to ESwStateNormalRfOn" ) );
+    	error = iProperty.Set( KPSUidStartup, KPSGlobalSystemState, ESwStateNormalRfOn );
+    	}
+    
+    if( error )
+    	{
+    	iLog->Log( _L( "Failed to switch GlobalSystemState to ESwStateNormalRfOn with error: %d" ), error );
+    	aResult.SetResult( KErrGeneral, _L( "StartDaemon failed" ) );
+    	return KErrNone;
+    	}
+    
+    User::After( 2000000 );
+    
+    iLog->Log( _L( "Ending test and setting BT Power ON" ) );
+    error = iBtSettings->SetPowerState( EBTPowerOn );
+    if( error )
+    	{
+    	iLog->Log( _L( "Error %d when setting BT power state" ), error );
+    	aResult.SetResult( KErrGeneral, _L( "StartDaemon failed" ) );
+    	return KErrNone;
+    	}
+
+    User::After( 2000000 );
+    
+    delete iBtSettings;
+    iBtSettings = NULL;
+    
+    aResult.SetResult( KErrNone, _L( "StartDaemon passed" ) );
+    return KErrNone;
+	}
+
+//  End of File
--- a/mtpdataproviders/mtpfileandfolderdp/src/cmtpfiledp.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpdataproviders/mtpfileandfolderdp/src/cmtpfiledp.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -209,19 +209,24 @@
         }
     OstTraceFunctionExit0( CMTPFILEDATAPROVIDER_SUPPORTED_EXIT );
     }    
-       
+
+#ifdef OST_TRACE_COMPILER_IN_USE
 void CMTPFileDataProvider::NotifyEnumerationCompleteL(TUint32 aStorageId, TInt aError)
+#else
+void CMTPFileDataProvider::NotifyEnumerationCompleteL(TUint32 aStorageId, TInt /*aError*/)
+#endif       
     {
     OstTraceFunctionEntry0( CMTPFILEDATAPROVIDER_NOTIFYENUMERATIONCOMPLETEL_ENTRY );
     OstTraceExt2( TRACE_NORMAL, CMTPFILEDATAPROVIDER_NOTIFYENUMERATIONCOMPLETEL, 
             "Enumeration of storage 0x%08X completed with error status %d", aStorageId, (TInt32)aError);
+    aStorageId = aStorageId;
     __ASSERT_DEBUG((aStorageId == iPendingEnumerations[KActiveEnumeration]), User::Invariant());
     
     Framework().ObjectEnumerationCompleteL(iPendingEnumerations[KActiveEnumeration]);
     iPendingEnumerations.Remove(KActiveEnumeration);
     OstTraceFunctionExit0( CMTPFILEDATAPROVIDER_NOTIFYENUMERATIONCOMPLETEL_EXIT );
     }
-    
+
 /**
 Standard C++ constructor
 */
--- a/mtpdataproviders/mtpimagedp/inc/cmtpimagedpdeleteobject.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpdataproviders/mtpimagedp/inc/cmtpimagedpdeleteobject.h	Thu Nov 04 15:31:42 2010 +0800
@@ -55,6 +55,8 @@
     */
 	void DoCancel();
 
+	TInt RunError( TInt aErr );
+
 private:    
 
 	CMTPImageDpDeleteObject(MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection,CMTPImageDataProvider& aDataProvider);
@@ -74,7 +76,7 @@
 	/**
 	AO start
 	 */
-	void StartL();
+	void Start();
 	
 	/**
 	Send response to PC
--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpdeleteobject.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpdeleteobject.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -125,7 +125,7 @@
         OstTrace0( TRACE_FLOW, CMTPIMAGEDPDELETEOBJECT_SERVICEL, "delete all objects" );
         GetObjectHandlesL( KMTPStorageAll, formatCode, KMTPHandleNone );
         iObjectsNotDelete = iObjectsToDelete.Count();
-        StartL();
+        Start();
         }
     else
         {
@@ -153,7 +153,7 @@
         }
     
     // Start the process again to read the next row...
-    StartL();
+    Start();
 
     OstTraceFunctionExit0( CMTPIMAGEDPDELETEOBJECT_RUNL_EXIT );
     }
@@ -167,6 +167,17 @@
     OstTraceFunctionExit0( CMTPIMAGEDPDELETEOBJECT_DOCANCEL_EXIT );
     }
 
+#ifdef OST_TRACE_COMPILER_IN_USE
+TInt CMTPImageDpDeleteObject::RunError(TInt aErr)
+#else
+TInt CMTPImageDpDeleteObject::RunError(TInt /*aErr*/)
+#endif
+    {
+    OstTrace1(TRACE_ERROR, CMTPIMAGEDPDELETEOBJECT_RUNERROR,"CMTPImageDpDeleteObject::RunError is %d", aErr );
+	TRAP_IGNORE(CMTPRequestProcessor::SendResponseL(EMTPRespCodeGeneralError));
+    return KErrNone;
+    }
+
 /**
  Check whether the store on which the object resides is read only.
  @return ETrue if the store is read only, EFalse if read-write
@@ -275,17 +286,17 @@
     OstTraceFunctionExit0( CMTPIMAGEDPDELETEOBJECT_DELETEOBJECTL_EXIT );
     }
 
-void CMTPImageDpDeleteObject::StartL()
+void CMTPImageDpDeleteObject::Start()
     {
-    OstTraceFunctionEntry0( CMTPIMAGEDPDELETEOBJECT_STARTL_ENTRY );
+    OstTraceFunctionEntry0( CMTPIMAGEDPDELETEOBJECT_START_ENTRY );
     
     if(iCancelled)
         {
-        OstTrace0( TRACE_NORMAL, CMTPIMAGEDPDELETEOBJECT_STARTL, "Cancell the delete" );
-        CMTPRequestProcessor::SendResponseL(EMTPRespCodeTransactionCancelled);
+        OstTrace0( TRACE_NORMAL, CMTPIMAGEDPDELETEOBJECT_START, "Cancell the delete" );
+        TRAP_IGNORE(CMTPRequestProcessor::SendResponseL(EMTPRespCodeTransactionCancelled));
         iObjectsToDelete.Reset();
         iCancelled = EFalse;
-        OstTraceFunctionExit0( CMTPIMAGEDPDELETEOBJECT_STARTL_EXIT );
+        OstTraceFunctionExit0( CMTPIMAGEDPDELETEOBJECT_START_EXIT );
         return;
         }
     
@@ -300,9 +311,9 @@
         }
     else
         {
-        SendResponseL();
+        TRAP_IGNORE(SendResponseL());
         }
-    OstTraceFunctionExit0( DUP1_CMTPIMAGEDPDELETEOBJECT_STARTL_EXIT );
+    OstTraceFunctionExit0( DUP1_CMTPIMAGEDPDELETEOBJECT_START_EXIT );
     }
 
 void CMTPImageDpDeleteObject::SendResponseL()
--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobjectproplist.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobjectproplist.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -476,14 +476,18 @@
     OstTraceFunctionExit0( CMTPIMAGEDPGETOBJECTPROPLIST_RUNL_EXIT );
     }
 
-TInt CMTPImageDpGetObjectPropList::RunError( TInt aError )
+#ifdef OST_TRACE_COMPILER_IN_USE
+TInt CMTPImageDpGetObjectPropList::RunError(TInt aError)
+#else
+TInt CMTPImageDpGetObjectPropList::RunError(TInt /*aError*/)
+#endif
     {
     OstTraceFunctionEntry0( CMTPIMAGEDPGETOBJECTPROPLIST_RUNERROR_ENTRY );
     
     TRAP_IGNORE( SendResponseL( EMTPRespCodeGeneralError ) );
     
     OstTraceFunctionExit0( CMTPIMAGEDPGETOBJECTPROPLIST_RUNERROR_EXIT );
-    return aError;
+    return KErrNone;
     }
 
 void CMTPImageDpGetObjectPropList::StartL()
--- a/mtpdataproviders/mtppictbridgedp/inc/s60dependency.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpdataproviders/mtppictbridgedp/inc/s60dependency.h	Thu Nov 04 15:31:42 2010 +0800
@@ -24,7 +24,7 @@
 
 #include <e32base.h>
 
-#include <platform/mw/usbwatcherinternalpskeys.h>
+#include <platform/mw/UsbWatcherInternalPSKeys.h>
 #include <platform/mw/usbpersonalityids.h>
 #include <pathinfo.h> 
 #include <featmgr/featmgr.h>
--- a/mtpdataproviders/mtppictbridgedp/pictbridgeengine/src/dpsconnectnotifier.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpdataproviders/mtppictbridgedp/pictbridgeengine/src/dpsconnectnotifier.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -134,9 +134,13 @@
 // 
 // ---------------------------------------------------------------------------
 // 
+#ifdef OST_TRACE_COMPILER_IN_USE
 TInt CDpsConnectNotifier::RunError(TInt aErr)
+#else
+TInt CDpsConnectNotifier::RunError(TInt /*aErr*/)
+#endif
     {
     OstTraceDef1(OST_TRACE_CATEGORY_PRODUCTION, TRACE_IMPORTANT, CDPSCONNECTNOTIFIER_RUNERROR, 
             "CDpsConnectNotifier::RunError is %d", aErr );
-    return aErr;
+    return KErrNone;
     }
--- a/mtpdataproviders/mtppictbridgedp/pictbridgeengine/src/dpsptpnotifier.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpdataproviders/mtppictbridgedp/pictbridgeengine/src/dpsptpnotifier.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -13,7 +13,7 @@
 *
 * Description:  This class implements functions of setting personality to 
 *                MTP. 
-*  Version     : %version: 2 % 
+*  Version     : %version: 3 % 
 *
 */
 
@@ -122,9 +122,13 @@
 // 
 // ---------------------------------------------------------------------------
 //
+#ifdef OST_TRACE_COMPILER_IN_USE
 TInt CDpsPtpNotifier::RunError(TInt aErr)
+#else
+TInt CDpsPtpNotifier::RunError(TInt /*aErr*/)
+#endif
     {
     OstTraceDef1( OST_TRACE_CATEGORY_PRODUCTION, TRACE_IMPORTANT, CDPSPTPNOTIFIER_RUNERROR, 
             "error code %d", aErr);
-    return aErr;
+    return KErrNone;
     }
--- a/mtpdataproviders/mtppictbridgedp/pictbridgeengine/src/dpsusbnotifier.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpdataproviders/mtppictbridgedp/pictbridgeengine/src/dpsusbnotifier.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -268,12 +268,16 @@
 // ---------------------------------------------------------------------------
 // 
 // ---------------------------------------------------------------------------
-//       
+//   
+#ifdef OST_TRACE_COMPILER_IN_USE
 TInt CDpsUsbNotifier::RunError(TInt aErr)
+#else
+TInt CDpsUsbNotifier::RunError(TInt /*aErr*/)
+#endif
     {
     OstTraceDef1( OST_TRACE_CATEGORY_PRODUCTION, TRACE_IMPORTANT, CDPSUSBNOTIFIER_RUNERROR, 
             "error code %d", aErr);
-    return aErr;
+    return KErrNone;
     }
     
 // ---------------------------------------------------------------------------
--- a/mtpdataproviders/mtpplaybackcontroldp/group/bld.inf	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpdataproviders/mtpplaybackcontroldp/group/bld.inf	Thu Nov 04 15:31:42 2010 +0800
@@ -22,7 +22,7 @@
 DEFAULT
 
 PRJ_EXPORTS
-mtp_playbackcontroldp.iby   /epoc32/rom/include/mtp_playbackcontroldp.iby
+mtp_playbackcontroldp.iby   CORE_MW_LAYER_IBY_EXPORT_PATH(mtp_playbackcontroldp.iby)
 
 PRJ_MMPFILES 
 mtpplaybackcontroldp.mmp
--- a/mtpdataproviders/mtpplaybackcontroldp/src/cmtpplaybackcontroldp.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpdataproviders/mtpplaybackcontroldp/src/cmtpplaybackcontroldp.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -282,7 +282,11 @@
 Prepares for a newly-opened session.
 @param aSession notification parameter block
 */
+#ifdef OST_TRACE_COMPILER_IN_USE
 void CMTPPlaybackControlDataProvider::SessionOpenedL(const TMTPNotificationParamsSessionChange& aSession)
+#else
+void CMTPPlaybackControlDataProvider::SessionOpenedL(const TMTPNotificationParamsSessionChange& /*aSession*/)
+#endif
     {
     OstTraceFunctionEntry0( DUP1_CMTPPLAYBACKCONTROLDATAPROVIDER_SESSIONOPENEDL_ENTRY );
     OstTrace1( TRACE_NORMAL, CMTPPLAYBACKCONTROLDATAPROVIDER_SESSIONOPENEDL, "SessionID = %d", aSession.iMTPId );
--- a/mtpfws/mtpfw/daemon/server/src/cmtpserver.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/daemon/server/src/cmtpserver.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -81,7 +81,8 @@
         {
         iFrameworkSingletons.ConnectionMgr().StopTransports();
         iFrameworkSingletons.DpController().UnloadDataProviders();
-        iFrameworkSingletons.Close();	    
+        iFrameworkSingletons.Close();	 
+        iFrameworkSingletonsOpened = EFalse;
         }
     REComSession::FinalClose();
     OstTraceFunctionExit0( CMTPSERVER_CMTPSERVER_DES_EXIT );
@@ -145,7 +146,7 @@
     {
     OstTraceFunctionEntry0( CMTPSERVER_DROPSESSION_ENTRY );
          
-    if (--iSessionCount==0 && iFrameworkSingletons.ConnectionMgr().TransportCount() == 0)
+    if (--iSessionCount==0 && iFrameworkSingletonsOpened && iFrameworkSingletons.ConnectionMgr().TransportCount() == 0)
         {
         // No active MTP client API sessions remain, start the shutdown timer.
         if (iShutdown)
@@ -182,7 +183,7 @@
 Constructor.
 */    
 CMTPServer::CMTPServer() : 
-    CPolicyServer(CActive::EPriorityStandard, KMTPServerPolicy)
+    CPolicyServer(CActive::EPriorityStandard, KMTPServerPolicy),iFrameworkSingletonsOpened(EFalse)
     {
 
     }
--- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedp.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedp.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -811,8 +811,13 @@
         case EStartTimer:
             OstTrace0(TRACE_NORMAL, DUP1_CMTPDEVICEINFOTIMER_RUNL, "CMTPDeviceInfoTimer::RunL - EStartTimer");
             // Open the USB device interface.
-            LEAVEIFERROR(iLdd.Open(0),
-                    OstTrace0( TRACE_ERROR, DUP4_CMTPDEVICEINFOTIMER_RUNL, "Open the USB device interface error!" ));
+			TInt err;
+			err = iLdd.Open(0);
+			if ( err != KErrNone )
+			{
+				OstTrace0( TRACE_ERROR, DUP4_CMTPDEVICEINFOTIMER_RUNL, "Open the USB device interface error!" );
+				Panic(EMTPDevDpConnectionNotFound);
+			}
             iLdd.ReEnumerate(iStatus);
             iDeviceProvider.SetConnectMac();
             iState = EUSBReEnumerate;
@@ -827,7 +832,7 @@
         }
     OstTraceFunctionExit0( CMTPDEVICEINFOTIMER_RUNL_EXIT );
     }
-    
+
 /** 
 Constructor
 */
--- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetdevicepropdesc.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetdevicepropdesc.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -225,7 +225,11 @@
     OstTraceFunctionEntry0( CMTPGETDEVICEPROPDESC_RUNL_ENTRY );
     if (iPropCode == EMTPDevicePropCodeBatteryLevel)
         {
-        ServiceBatteryLevelL();
+        TRAPD(err,ServiceBatteryLevelL());
+		if ( err != KErrNone)
+			{
+			TRAP_IGNORE(SendResponseL(EMTPRespCodeGeneralError));
+			}
         }
     else
         {
--- a/mtpfws/mtpfw/dataproviders/dputility/inc/cmtpcopyobject.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/dataproviders/dputility/inc/cmtpcopyobject.h	Thu Nov 04 15:31:42 2010 +0800
@@ -73,7 +73,8 @@
 	static TInt OnTimeoutL(TAny* aPtr);
 	void DoOnTimeoutL();
 	void RunL();
-	
+	TInt RunError( TInt aErr );
+
 private:
 	CFileMan*							iFileMan;
 	CMTPObjectMetaData*		iObjectInfo;	//Not owned.
--- a/mtpfws/mtpfw/dataproviders/dputility/inc/cmtpmoveobject.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/dataproviders/dputility/inc/cmtpmoveobject.h	Thu Nov 04 15:31:42 2010 +0800
@@ -67,6 +67,7 @@
 	static TInt OnTimeoutL(TAny* aPtr);
 	void DoOnTimeoutL();
 	void RunL();
+	TInt RunError( TInt aErr );
 	
 private:	
 	CFileMan*							iFileMan;
--- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpcopyobject.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpcopyobject.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -520,6 +520,17 @@
 	OstTraceFunctionExit0( CMTPCOPYOBJECT_RUNL_EXIT );
 	}
 
+#ifdef OST_TRACE_COMPILER_IN_USE
+TInt CMTPCopyObject::RunError(TInt aErr)
+#else
+TInt CMTPCopyObject::RunError(TInt /*aErr*/)
+#endif
+    {
+    OstTrace1(TRACE_ERROR, CMTPCOPYOBJECT_RUNERROR,"CMTPCopyObject::RunError is %d", aErr );
+	TRAP_IGNORE(SendResponseL(EMTPRespCodeGeneralError));
+    return KErrNone;
+    }
+
 /**
 Override to handle the complete phase of copy object
 @return EFalse
--- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpmoveobject.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpmoveobject.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -521,6 +521,17 @@
 	OstTraceFunctionExit0( CMTPMOVEOBJECT_RUNL_EXIT );
 	}
 
+#ifdef OST_TRACE_COMPILER_IN_USE
+TInt CMTPMoveObject::RunError(TInt aErr)
+#else
+TInt CMTPMoveObject::RunError(TInt /*aErr*/)
+#endif
+    {
+    OstTrace1(TRACE_ERROR, CMTPMOVEOBJECT_RUNERROR,"CMTPMoveObject::RunError is %d", aErr );
+	TRAP_IGNORE(SendResponseL(EMTPRespCodeGeneralError));
+    return KErrNone;
+    }
+
 /**
 Override to handle the complete phase of move object
 */
--- a/mtpfws/mtpfw/dataproviders/proxydp/inc/cmtpdeleteobject.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/dataproviders/proxydp/inc/cmtpdeleteobject.h	Thu Nov 04 15:31:42 2010 +0800
@@ -57,7 +57,7 @@
 private: // From CActive
 
     void RunL();
-
+	TInt RunError( TInt aErr );
 private:    
 
     CMTPDeleteObject(MMTPDataProviderFramework& aFramework, MMTPConnection& aConnection);
--- a/mtpfws/mtpfw/dataproviders/proxydp/inc/cmtpgetobjectproplist.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/dataproviders/proxydp/inc/cmtpgetobjectproplist.h	Thu Nov 04 15:31:42 2010 +0800
@@ -58,6 +58,7 @@
 private: // From CActive
 
     void RunL();
+	TInt RunError( TInt aErr );
 
 private:    
 
--- a/mtpfws/mtpfw/dataproviders/proxydp/inc/cmtpgetobjectpropssupported.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/dataproviders/proxydp/inc/cmtpgetobjectpropssupported.h	Thu Nov 04 15:31:42 2010 +0800
@@ -56,6 +56,7 @@
 private: // From CActive
 
     void RunL();
+	TInt RunError( TInt aErr );
 
 private:    
 
--- a/mtpfws/mtpfw/dataproviders/proxydp/inc/cmtpsetobjectproplist.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/dataproviders/proxydp/inc/cmtpsetobjectproplist.h	Thu Nov 04 15:31:42 2010 +0800
@@ -55,7 +55,7 @@
 private: // From CActive
 
     void RunL();
-
+	TInt RunError( TInt aErr );
 private:    
 
     CMTPSetObjectPropList(MMTPDataProviderFramework& aFramework,MMTPConnection& aConnection);
--- a/mtpfws/mtpfw/dataproviders/proxydp/src/cmtpdeleteobject.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/dataproviders/proxydp/src/cmtpdeleteobject.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -223,6 +223,17 @@
 
     OstTraceFunctionExit0( CMTPDELETEOBJECT_RUNL_EXIT );
     }
+
+#ifdef OST_TRACE_COMPILER_IN_USE
+TInt CMTPDeleteObject::RunError(TInt aErr)
+#else
+TInt CMTPDeleteObject::RunError(TInt /*aErr*/)
+#endif
+	{
+	OstTrace1(TRACE_ERROR, DUP1_CMTPDELETEOBJECT_RUNERROR,"CMTPDeleteObject::RunError is %d", aErr );
+	TRAP_IGNORE(SendResponseL(EMTPRespCodeGeneralError));
+	return KErrNone;
+	}
     
 /**
 Completes the current asynchronous request with the specified 
--- a/mtpfws/mtpfw/dataproviders/proxydp/src/cmtpgetobjectproplist.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/dataproviders/proxydp/src/cmtpgetobjectproplist.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -201,6 +201,17 @@
     OstTraceFunctionExit0( CMTPGETOBJECTPROPLIST_RUNL_EXIT );
     }
 
+#ifdef OST_TRACE_COMPILER_IN_USE
+TInt CMTPGetObjectPropList::RunError(TInt aErr)
+#else
+TInt CMTPGetObjectPropList::RunError(TInt /*aErr*/)
+#endif
+	{
+	OstTrace1(TRACE_ERROR, DUP1_CMTPGETOBJECTPROPLIST_RUNERROR,"CMTPGetObjectPropList::RunError is %d", aErr );
+	TRAP_IGNORE(SendResponseL(EMTPRespCodeGeneralError));
+	return KErrNone;
+	}
+
 /**
 Constructor.
 */	
--- a/mtpfws/mtpfw/dataproviders/proxydp/src/cmtpgetobjectpropssupported.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/dataproviders/proxydp/src/cmtpgetobjectpropssupported.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -158,6 +158,16 @@
         } 	
 	}
 
+#ifdef OST_TRACE_COMPILER_IN_USE
+TInt CMTPGetObjectPropsSupported::RunError(TInt aErr)
+#else
+TInt CMTPGetObjectPropsSupported::RunError(TInt /*aErr*/)
+#endif
+	{
+	OstTrace1(TRACE_ERROR, DUP1_CMTPGETOBJECTPROPSSUPPORTED_RUNERROR,"CMTPGetObjectPropsSupported::RunError is %d", aErr );
+	TRAP_IGNORE(SendResponseL(EMTPRespCodeGeneralError));
+	return KErrNone;
+	}
 /**
 Constructor.
 */	
--- a/mtpfws/mtpfw/dataproviders/proxydp/src/cmtpsetobjectproplist.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/dataproviders/proxydp/src/cmtpsetobjectproplist.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -28,6 +28,10 @@
 #include "mtpproxydppanic.h"
 #include "rmtpframework.h"
 #include "cmtpstoragemgr.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cmtpsetobjectproplistTraces.h"
+#endif
 
 /**
 Two-phase construction method
@@ -246,6 +250,17 @@
         }    
     }
 
+#ifdef OST_TRACE_COMPILER_IN_USE
+TInt CMTPSetObjectPropList::RunError(TInt aErr)
+#else
+TInt CMTPSetObjectPropList::RunError(TInt /*aErr*/)
+#endif
+	{
+	OstTrace1(TRACE_ERROR, CMTPSETOBJECTPROPLIST_RUNERROR,"CMTPSetObjectPropList::RunError is %d", aErr );
+	TRAP_IGNORE(SendResponseL(EMTPRespCodeGeneralError));
+	return KErrNone;
+	}
+
 /**
 Reschedules the active object with the specified completion code.
 @param aError The asynchronous request completion code.
--- a/mtpfws/mtpfw/inc/cmtpobjectstore.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/inc/cmtpobjectstore.h	Thu Nov 04 15:31:42 2010 +0800
@@ -169,7 +169,7 @@
             static CSnapshotWorker* NewL(CMTPObjectStore* aObjectStore, TBool aOnlyRoot); 
             
             void RunL();
-            TInt RunErr();
+            TInt RunError(TInt aErr);
             void ActiveSelf();
             ~CSnapshotWorker();
 			
--- a/mtpfws/mtpfw/inc/mtpcommonconst.h	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/inc/mtpcommonconst.h	Thu Nov 04 15:31:42 2010 +0800
@@ -22,7 +22,7 @@
 #define MTPCOMMONCONST_H
 
 #ifdef __SERIES60_
-#include <uiklafinternalcrkeys.h>
+#include <UiklafInternalCRKeys.h>
 #else
 //Following is copied from 'UiklafInternalCRKeys.h', which is
 //exported from S60 sdk, in Symbian CBR, this file does not exist.
--- a/mtpfws/mtpfw/src/cmtpconnectionmgr.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/src/cmtpconnectionmgr.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -511,8 +511,10 @@
 TInt CMTPConnectionMgr::DoResumeSuspendedTransport( TAny* aSelf )
     {
     CMTPConnectionMgr* self = reinterpret_cast< CMTPConnectionMgr* >( aSelf );
-    __ASSERT_DEBUG( ( self->iSuspendedTransports.Count() > 0 ), User::Invariant() );
-    TRAP_IGNORE( self->StartTransportL( self->iSuspendedTransports[self->iSuspendedTransports.Count()-1] ) );
+    if(self->iSuspendedTransports.Count() > 0)
+    	{
+    	TRAP_IGNORE( self->StartTransportL( self->iSuspendedTransports[self->iSuspendedTransports.Count()-1] ) );
+    	}
     return KErrNone;
     }
 
--- a/mtpfws/mtpfw/src/cmtpdataprovider.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/src/cmtpdataprovider.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -502,8 +502,11 @@
     OstTraceFunctionExit0( CMTPDATAPROVIDER_ROUTEREQUESTUNREGISTERL_EXIT );    
     }
 
-
+#ifdef OST_TRACE_COMPILER_IN_USE
 void CMTPDataProvider::ObjectEnumerationCompleteL(TUint32 aStorageId)
+#else
+void CMTPDataProvider::ObjectEnumerationCompleteL(TUint32 /*aStorageId*/)
+#endif
     {
     OstTraceFunctionEntry0( CMTPDATAPROVIDER_OBJECTENUMERATIONCOMPLETEL_ENTRY );
     OstTrace1(TRACE_NORMAL, CMTPDATAPROVIDER_OBJECTENUMERATIONCOMPLETEL, 
--- a/mtpfws/mtpfw/src/cmtpdataprovidercontroller.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/src/cmtpdataprovidercontroller.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -44,7 +44,7 @@
 /**
 CMTPDataProviderController panics
 */
-_LIT(KMTPPanicCategory, "CMTPDataProviderController");
+//_LIT(KMTPPanicCategory, "CMTPDataProviderController");
 enum TMTPPanicReasons
     {
     EMTPPanicStorageEnumeration = 0,
@@ -53,10 +53,10 @@
     EMTPPanicDataProviderEnumeration = 3
     };
     
-LOCAL_C void Panic(TInt aReason)
-    {
-    User::Panic(KMTPPanicCategory, aReason);
-    }
+//LOCAL_C void Panic(TInt aReason)
+//    {
+//    User::Panic(KMTPPanicCategory, aReason);
+//    }
 
 /**
 CMTPDataProviderController factory method. 
@@ -346,7 +346,10 @@
 */
 EXPORT_C CMTPDataProvider& CMTPDataProviderController::DataProviderByIndexL(TUint aIndex)
     {
-    __ASSERT_DEBUG((aIndex < iDataProviders.Count()), User::Invariant());
+    if(aIndex >= iDataProviders.Count())
+    	{
+    	User::Leave(KErrOverflow);
+    	}	
     return *(iDataProviders[aIndex]);
     }  
 
@@ -713,30 +716,29 @@
     OstTraceFunctionExit0( CMTPDATAPROVIDERCONTROLLER_RUNL_EXIT );
     }
 
-
+#ifdef OST_TRACE_COMPILER_IN_USE
 TInt CMTPDataProviderController::RunError(TInt aError)
+#else
+TInt CMTPDataProviderController::RunError(TInt /*aError*/)
+#endif
     {
     OstTraceFunctionEntry0( CMTPDATAPROVIDERCONTROLLER_RUNERROR_ENTRY );
-    OstTrace1(TRACE_NORMAL, CMTPDATAPROVIDERCONTROLLER_RUNERROR, "Error = %d", aError);
+    OstTraceExt2(TRACE_NORMAL, CMTPDATAPROVIDERCONTROLLER_RUNERROR, "Error = %d, EnumerationState = %d", aError, iEnumerationState);
     
     // If a RunL error happens, there's no point in trying to continue.
     switch (iEnumerationState)
         {
     case EEnumerationStarting:
+        // fall-through intended here
     case EEnumeratingFrameworkStorages:
-        Panic(EMTPPanicStorageEnumeration);
-        break;
-        
+        // fall-through intended here
     case EEnumeratingFrameworkObjects:
-        Panic(EMTPPanicFrameworkEnumeration);
-        break;
-        
+        // fall-through intended here
     case EEnumeratingDataProviderStorages:
-        Panic(EMTPPanicDataProviderStorageEnumeration);
-        break;
-        
+        // fall-through intended here
     case EEnumeratingDataProviderObjects:
-        Panic(EMTPPanicDataProviderEnumeration);
+    	//handle the panic during the backup-resotre creation
+        User::Exit( KErrNone );
         break;
         
     case EUnenumerated:
@@ -1041,6 +1043,7 @@
     TUint aUid(0);
     if ( Uid(aResourceFilename,aUid) != KErrNone )
        	{
+		CleanupStack::PopAndDestroy(config);
         OstTraceFunctionExit0( CMTPDATAPROVIDERCONTROLLER_LOADDATAPROVIDERL_EXIT );
         return success;	
        	}
@@ -1370,7 +1373,7 @@
 void CMTPDataProviderController::CMTPPendingReqestTimer::RunL()
     {
     OstTraceFunctionEntry0( CMTPPENDINGREQESTTIMER_RUNL_ENTRY );
-
+	//ExecutePendingRequestL will not leave
     iDPController->ExecutePendingRequestL();
     
     OstTraceFunctionExit0( CMTPPENDINGREQESTTIMER_RUNL_EXIT );
--- a/mtpfws/mtpfw/src/cmtpdeltadatamgr.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/src/cmtpdeltadatamgr.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -105,7 +105,7 @@
 			}
 		}
 	LEAVEIFERROR(iDeltaTableBatched.Open(iDatabase, KMTPDeltaDataTable, RDbRowSet::EUpdatable),
-			        OstTrace0( TRACE_ERROR, DUP1_CMTPDELTADATAMGR_CREATEDELTADATATABLEL, "MTPDeltaDataTable open error!" ));       
+			        OstTrace0( TRACE_ERROR, DUP2_CMTPDELTADATAMGR_CREATEDELTADATATABLEL, "MTPDeltaDataTable open error!" ));       
 		
 	OstTraceFunctionExit0( CMTPDELTADATAMGR_CREATEDELTADATATABLEL_EXIT );
 	}
@@ -134,7 +134,7 @@
 			}
 		}
 	LEAVEIFERROR(iAnchorTableBatched.Open(iDatabase, KAnchorIdTable, RDbRowSet::EUpdatable),
-		OstTrace0( TRACE_ERROR, DUP1_CMTPDELTADATAMGR_CREATEANCHORIDTABLEL, "AnchorIdTable open error!" ));       
+		OstTrace0( TRACE_ERROR, DUP2_CMTPDELTADATAMGR_CREATEANCHORIDTABLEL, "AnchorIdTable open error!" ));       
 		
 	OstTraceFunctionExit0( CMTPDELTADATAMGR_CREATEANCHORIDTABLEL_EXIT );
 	}
--- a/mtpfws/mtpfw/src/cmtpobjectstore.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtpfws/mtpfw/src/cmtpobjectstore.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -89,8 +89,13 @@
     //nothing to do
     }
 
-TInt CMTPObjectStore::CSnapshotWorker::RunErr()
+#ifdef OST_TRACE_COMPILER_IN_USE
+TInt CMTPObjectStore::CSnapshotWorker::RunError(TInt aErr)
+#else
+TInt CMTPObjectStore::CSnapshotWorker::RunError(TInt /*aErr*/)
+#endif
     {
+	OstTrace1(TRACE_ERROR, CSNAPSHOTWORKER_RUNERROR,"CSnapshotWorker::RunError is %d", aErr );
     return KErrNone;
     }
 
--- a/mtptransports/mtpcontroller/group/mtpcontroller.mmp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtptransports/mtpcontroller/group/mtpcontroller.mmp	Thu Nov 04 15:31:42 2010 +0800
@@ -30,8 +30,7 @@
 CAPABILITY      ALL -TCB
 
 SYSTEMINCLUDE   /epoc32/include/ecom
-SYSTEMINCLUDE   ../locodinc
-MW_LAYER_SYSTEMINCLUDE_SYMBIAN
+MW_LAYER_SYSTEMINCLUDE
 
 USERINCLUDE     ../inc
 USERINCLUDE     ../../../mtpfws/mtpfw/common/inc 
--- a/mtptransports/mtpcontroller/locodinc/locodbearer.h	Tue Sep 28 20:14:08 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2006 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:  Defines the LCD Bearer Plugin identifier.
-*
-*/
-
-
-#ifndef T_LOCODBEARER_H
-#define T_LOCODBEARER_H
-
-#include <e32base.h>
-
-/**  bearer value in LC */
-enum TLocodBearer
-    {
-    ELocodBearerBT =  0x0001,
-	ELocodBearerIR =  0x0010,
-	ELocodBearerUSB = 0x0100,
-    };
-
-#endif // T_LOCODBEARER_H
--- a/mtptransports/mtpcontroller/locodinc/locodplugin.hrh	Tue Sep 28 20:14:08 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2006 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:  Definitions for plugin resource registration.
-*
-*/
-
-
-#ifndef LOCODPLUGIN_HRH
-#define LOCODPLUGIN_HRH
-
-/**
- * This file contains the defintions for plugin resource registration.
- *
- * All plugins should use version 2 registration resource file and set the
- * rom_only field to 1 to prevent it from being overridden by RAM-based plugins.
- *
- * All bearer plugins should use KLOCODBEARERINTERFACEUID as the interface UID.
- *
- * A bearer plugin should use its corresponding feature ID (from features.hrh) as the
- * implementation UID,  that is, 
- *  Implementation UID of IR bearer is KFeatureIdIrda,
- *  Implementation UID of BT bearer is KFeatureIdBt,
- *  Implementation UID of USB bearer is KFeatureIdUsb.
- *
- * All service plugins should use KLOCODSERVICEINTERFACEUID as the interface UID.
- *
- * A service plugin should use its corresponding feature ID (from features.hrh) as the
- * implementation UID,  that is, 
- *  Implementation UID of Dun is KFeatureIdDun, (not exist yet, CR created)
- *  Implementation UID of Obex is KFeatureIdSrcs,
- * 
- */
-
-// Interface UID of bearer plugins
-#define  KLOCODBEARERINTERFACEUID 0x20002771
-
-// Interface UID of service plugins
-#define  KLOCODSERVICEINTERFACEUID 0x20002772
-
-#endif // LOCODPLUGIN_HRH
--- a/mtptransports/mtpcontroller/locodinc/locodserviceplugin.h	Tue Sep 28 20:14:08 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* Copyright (c) 2006 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:  This is the LCD Service Plugin base class declaration.
-*
-*/
-
-
-#ifndef C_LOCODSERVICEPLUGIN_H
-#define C_LOCODSERVICEPLUGIN_H
-
-#include <e32base.h>
-
-#include "locodservicepluginparams.h"
-#include "locodbearer.h"
-    
-/**
- *  Service Plugin base class
- *
- *  This is the base class from which service plugins inherit.
- *
- * When a service plugin is constructed, it should not start any service by default.
- * A service is started on demand when the bearer is available.
- *
- *  @euser.lib
- *  @since S60 v3.2
- */
-class CLocodServicePlugin : public CBase
-    {
-public:
-
-    static CLocodServicePlugin* NewL(TLocodServicePluginParams& aParams);
-
-    virtual ~CLocodServicePlugin();
-
-    /**
-     * Tell service plugin which service should be enabled or disabled according to
-     * specified bearer and its status.
-     * 
-     * On completion, the plugin should call 
-     * MLocodServicePluginObserver::ManageServiceCompleted() to inform the result.
-     *
-     * @since S60 v3.2
-     * @param  aBearer the bearer identification 
-     * @param  aStatus the status of this bearer, ETrue if it is available;
-     *                 EFalse otherwise.
-     */
-    virtual void ManageService(TLocodBearer aBearer, TBool aStatus) = 0;
-
-    TUid ImplementationUid() const;
-    
-protected:
-
-    CLocodServicePlugin(TLocodServicePluginParams& aParams);
-
-    /**
-     * Gets the observer interface object associated with this plugin
-     *
-     * @since S60 v3.2
-     * @return The observer object
-     */
-    MLocodServicePluginObserver& Observer() const;
-
-private: // data
-
-    /**
-     * UID set by ECOM when the instance is created.  Used when the instance
-     * is destroyed.
-     */
-    TUid iInstanceUid;
-
-    /**
-     * Implementation UID of the concrete instance.
-     */
-    const TUid iImplementationUid;
-
-    /**
-     * Holds the observer object which will be notified when the operations
-     * complete
-     * Not own.
-     */
-    MLocodServicePluginObserver& iObserver;
-
-    };
-
-#include <locodserviceplugin.inl>
-
-#endif // C_LOCODSERVICEPLUGIN_H
--- a/mtptransports/mtpcontroller/locodinc/locodserviceplugin.inl	Tue Sep 28 20:14:08 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
-* Copyright (c) 2006 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:  This is the LCD Service Plugin construction parameters
-*                declaration
-*
-*/
-
-
-#include <ecom.h>
-
-// -----------------------------------------------------------------------------
-// Constructor method, just saves the arguments into member variables
-// -----------------------------------------------------------------------------
-//
-inline CLocodServicePlugin* CLocodServicePlugin::NewL(TLocodServicePluginParams& aParams)
-    {
-	CLocodServicePlugin* self = reinterpret_cast<CLocodServicePlugin*>(
-		REComSession::CreateImplementationL(
-			aParams.ImplementationUid(),
-			_FOFF(CLocodServicePlugin, iInstanceUid),
-			(TAny*)&aParams)
-		);
-
-	return self;
-    }
-    
-
-// -----------------------------------------------------------------------------
-// Service plug ins destructor
-// -----------------------------------------------------------------------------
-//
-inline CLocodServicePlugin::~CLocodServicePlugin()
-    {
-    REComSession::DestroyedImplementation(iInstanceUid);
-    }
-    
-// -----------------------------------------------------------------------------
-// returns the implementation UID
-// -----------------------------------------------------------------------------
-//
-inline TUid CLocodServicePlugin::ImplementationUid() const
-    {
-    return iImplementationUid;
-    }
-
-// -----------------------------------------------------------------------------
-// CLocodServicePlugin C++ constructor
-// -----------------------------------------------------------------------------
-//
-inline CLocodServicePlugin::CLocodServicePlugin(TLocodServicePluginParams& aParams)
-    : iImplementationUid(aParams.ImplementationUid()),
-      iObserver(aParams.Observer())
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// return the observer class
-// -----------------------------------------------------------------------------
-//
-inline MLocodServicePluginObserver& CLocodServicePlugin::Observer() const
-    {
-    return iObserver;
-    }
-
--- a/mtptransports/mtpcontroller/locodinc/locodservicepluginobserver.h	Tue Sep 28 20:14:08 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2006 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:  This is the LCD Service Plugin observer interface definition.
-*
-*/
-
-
-#ifndef M_LOCODSERVICEPLUGINOBSERVER_H
-#define M_LOCODSERVICEPLUGINOBSERVER_H
-
-#include "locodbearer.h"
-
-/**
- *  LCD Service Plugin Observer interface class
- *
- *  This is the service plugin observer interface definition used by LCD
- *  Service Plugins to inform the daemon when an action is complete.
- *
- *  @lib 
- *  @since S60 v3.2
- */
-class MLocodServicePluginObserver
-    {
-public:
-
-    /**
-     * This is a callback function used by the plugins to inform when
-     * managing the service have completed.  The parameters passed should be
-     * identical to the ones used when the plugin's ManageService() was called,
-     * plus this service plugin's implemnetation UID and the completion status.
-     *
-     * @since S60 v3.2
-     * @param  aBearer the bearer identification passed in ManageService()
-     * @param  aStatus the status of this bearer passed in ManageService()
-     * @param  aServiceImplUid, the implementation UID of this service plugin.
-     * @param  err     KErrNone if the operation succeeded; otherwise a Symbian
-     *                 error code.
-     */
-    virtual void ManageServiceCompleted(
-        TLocodBearer aBearer,
-        TBool aStatus,
-        TUid aServiceImplUid,
-        TInt err) = 0;
-    };
-
-#endif // M_LOCODSERVICEPLUGINOBSERVER_H
--- a/mtptransports/mtpcontroller/locodinc/locodservicepluginparams.h	Tue Sep 28 20:14:08 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
-* Copyright (c) 2006 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:  This is the LCD Service Plugin construction parameters
-*                declaration
-*
-*/
-
-
-#ifndef T_LOCODSERVICEPLUGINPARAMS_H
-#define T_LOCODSERVICEPLUGINPARAMS_H
-
-class MLocodServicePluginObserver;
-
-/**
- *  LCD Service Plugin Callback construction parameters
- *
- *  This interface class is used to pass construction parameters to the
- *  plugins.  These parameters include the callback interface (usually
- *  implemented by the LCD) and the ECOM plugin implementation UID 
- *
- *  @lib ?library
- *  @since S60 v3.2
- */
-class TLocodServicePluginParams
-    {
-public:
-    /**
-     * Constructor.
-     *
-     * @since S60 v3.2
-     * @param  aUid      Implementation UID of the plugin being constructed
-     * @param  aObserver Callback interface object
-     */
-    TLocodServicePluginParams(TUid aUid, MLocodServicePluginObserver& aObserver);
-
-    /**
-     * Gets the implementation UID of the plugin
-     *
-     * @since S60 v3.2
-     * @return Implementaion UID
-     */
-    TUid ImplementationUid() const;
-
-    /**
-     * Gets the observer interface object
-     *
-     * @since S60 v3.2
-     * @return The observer object
-     */
-    MLocodServicePluginObserver& Observer() const;    
-
-private: // data
-
-    /**
-     * The implementation UID
-     */
-    const TUid iImplementationUid;
-
-    /**
-     * Reference to the observer object
-     */
-    MLocodServicePluginObserver& iObserver;
-
-    };
-
-#include "locodservicepluginparams.inl"
-
-#endif // T_LOCODSERVICEPLUGINPARAMS_H
--- a/mtptransports/mtpcontroller/locodinc/locodservicepluginparams.inl	Tue Sep 28 20:14:08 2010 +0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2006 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:  This is the LCD Service Plugin construction parameters
-*                declaration
-*
-*/
-
-
-// -----------------------------------------------------------------------------
-// Constructor method, just saves the arguments into member variables
-// -----------------------------------------------------------------------------
-//
-inline TLocodServicePluginParams::TLocodServicePluginParams(TUid aUid, MLocodServicePluginObserver& aObserver)
-    : iImplementationUid(aUid),
-      iObserver(aObserver)
-    {
-    }
-
-// -----------------------------------------------------------------------------
-// Returns the implementation UID
-// -----------------------------------------------------------------------------
-//
-inline TUid TLocodServicePluginParams::ImplementationUid() const
-    {
-    return iImplementationUid;
-    }
-
-// -----------------------------------------------------------------------------
-// return the observer class
-// -----------------------------------------------------------------------------
-//
-inline MLocodServicePluginObserver& TLocodServicePluginParams::Observer() const
-    {
-    return iObserver;
-    }
--- a/mtptransports/mtpcontroller/src/cmtpcontrollertimer.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtptransports/mtpcontroller/src/cmtpcontrollertimer.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -94,11 +94,19 @@
         {
         OstTrace0( TRACE_NORMAL, DUP2_CMTPCONTROLLERTIMER_RUNL, "Start transport to launch mtp server" );
         
-        LEAVEIFERROR(iMTPClient.Connect(),
-				OstTrace1( TRACE_NORMAL, DUP3_CMTPCONTROLLERTIMER_RUNL, "connect to mtp server failed! error code %d", munged_err ));
-        iMTPClient.StartTransport(KMTPBtTransportUid);
-        iStopTransport = EFalse;
-        iMTPOperator->SubscribeConnState();
+		TInt err = iMTPClient.Connect();
+		if ( err == KErrNone )
+			{
+			iMTPClient.StartTransport(KMTPBtTransportUid);
+	        iStopTransport = EFalse;
+		   iMTPOperator->SubscribeConnState();
+			}
+		else
+			{
+			OstTrace1( TRACE_NORMAL, DUP3_CMTPCONTROLLERTIMER_RUNL, "connect to mtp server failed! error code %d", err );
+			}
+        
         }
     OstTraceFunctionExit0( CMTPCONTROLLERTIMER_RUNL_EXIT );
     }
+   
--- a/mtptransports/mtpptpiptransport/ptpipplugin/src/cptpipconnection.cpp	Tue Sep 28 20:14:08 2010 +0800
+++ b/mtptransports/mtpptpiptransport/ptpipplugin/src/cptpipconnection.cpp	Thu Nov 04 15:31:42 2010 +0800
@@ -288,13 +288,16 @@
 /**
  Called when an error occurs in the RunL 
  */
+#ifdef OST_TRACE_COMPILER_IN_USE
 TInt CPTPIPConnection::RunError(TInt aError )
+#else
+TInt CPTPIPConnection::RunError(TInt /*aError*/ )
+#endif
 	{
 	OstTraceFunctionEntry0( CPTPIPCONNECTION_RUNERROR_ENTRY );
 	
 	OstTrace1( TRACE_NORMAL, CPTPIPCONNECTION_RUNERROR, "PTPIP ERROR: Error received is %d", aError );
 	
-
 	// Cancel all the outstanding requests.
 	Cancel( );
 
@@ -1389,7 +1392,11 @@
 /**
  * Invoked by the SocketHandler when there is an error.
  */
+#ifdef OST_TRACE_COMPILER_IN_USE
 void CPTPIPConnection::HandleError(TInt aError)
+#else
+void CPTPIPConnection::HandleError(TInt /*aError*/)
+#endif
 	{
 	OstTraceFunctionEntry0( CPTPIPCONNECTION_HANDLEERROR_ENTRY );
 	OstTrace1( TRACE_NORMAL, CPTPIPCONNECTION_HANDLEERROR, "SocketHandler received an error=%d, stopping connection.", aError );
--- a/package_definition.xml	Tue Sep 28 20:14:08 2010 +0800
+++ b/package_definition.xml	Thu Nov 04 15:31:42 2010 +0800
@@ -86,13 +86,5 @@
     <unit bldFile="backupandrestore/backuptest/group" mrp="backupandrestore/backuptest/group/connectivity_backuptest.mrp"/>
    </component>
   </collection>
-  <collection id="obex" name="OBEX" level="generic">
-   <component id="obexprotocol" name="OBEX Protocol" introduced="9.1" purpose="optional" filter="s60">
-    <unit bldFile="obex/obexprotocol/group" mrp="obex/obexprotocol/group/obex.mrp"/>
-   </component>
-   <component id="obexextensionapi" name="OBEX Extension API" introduced="9.2" purpose="optional" filter="s60">
-    <unit bldFile="obex/obexextensionapi/group" mrp="obex/obexextensionapi/group/obex_extensionapis.mrp"/>
-   </component>
-  </collection>
  </package>
 </SystemDefinition>