201031_04
authorhgs
Mon, 09 Aug 2010 12:19:11 +0800
changeset 37 d9d8313203af
parent 35 c4c427c00f31
child 41 2c19c7cf5550
201031_04
localconnectivityservice/dun/atext/src/DunAtCmdHandler.cpp
mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp
mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp
mtpdataproviders/mtppictbridgedp/inc/s60dependency.h
mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedp.cpp
mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetstorageinfo.cpp
mtpfws/mtpfw/dataproviders/devdp/src/cmtptypedeviceinfo.cpp
mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetformatcapabilities.cpp
mtpfws/mtpfw/datatypes/interface/mtpprotocolconstants.h
mtpfws/mtpfw/datatypes/src/cmtptypeobjectinfo.cpp
mtpfws/mtpfw/datatypes/src/cmtptypestorageinfo.cpp
mtpfws/mtpfw/inc/cmtpconnection.h
mtpfws/mtpfw/inc/mtpcommonconst.h
mtpfws/mtpfw/src/cmtpconnection.cpp
mtptransports/mtpcontroller/src/cmtpbearermonitor.cpp
package_definition.xml
package_map.xml
--- a/localconnectivityservice/dun/atext/src/DunAtCmdHandler.cpp	Fri Jul 23 18:35:35 2010 +0800
+++ b/localconnectivityservice/dun/atext/src/DunAtCmdHandler.cpp	Mon Aug 09 12:19:11 2010 +0800
@@ -855,20 +855,6 @@
         FTRACE(FPrint( _L("CDunAtCmdHandler::ExtractLineFromInputBuffer() (more needed) complete") ));
         return ETrue;
         }
-    // As a last step adjust the possible multiple IsDelimiterCharacter()
-    // characters and set length of iLineBuffer. Leave iEndIndex untouched.
-    lineLength = iLineBuffer.Length();
-    for ( TInt i=lineLength-1; i>=0; i-- )
-        {
-        TChar character = iLineBuffer[i];
-        if ( !IsDelimiterCharacter(character) )
-            {
-            iLineBuffer.SetLength( i + 1 );
-            FTRACE(FPrint( _L("CDunAtCmdHandler::ExtractLineFromInputBuffer() after (%d bytes):"), iLineBuffer.Length() ));
-            FTRACE(FPrintRaw(iLineBuffer) );
-            break;
-            }
-        }
     FTRACE(FPrint( _L("CDunAtCmdHandler::ExtractLineFromInputBuffer() (line found) complete") ));
     return EFalse;
     }
--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp	Fri Jul 23 18:35:35 2010 +0800
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedp.cpp	Mon Aug 09 12:19:11 2010 +0800
@@ -120,8 +120,10 @@
         }     
     
     //Define RProperty of new pictures for status data provider
+	RProcess process;
+	TUid tSid = process.SecureId();
     _LIT_SECURITY_POLICY_PASS(KAllowReadAll);
-    TInt error = RProperty::Define(TUid::Uid(KMTPServerUID), KMTPNewPicKey, RProperty::EInt, KAllowReadAll, KAllowReadAll);
+    TInt error = RProperty::Define(tSid, KMTPNewPicKey, RProperty::EInt, KAllowReadAll, KAllowReadAll);
     if (error != KErrNone && error != KErrAlreadyExists)
         {
         __FLOG_1(_L8("CMTPImageDataProvider::ConstructL - RProperty define error:%d"), error);
--- a/mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp	Fri Jul 23 18:35:35 2010 +0800
+++ b/mtpdataproviders/mtpimagedp/src/cmtpimagedpobjectpropertymgr.cpp	Mon Aug 09 12:19:11 2010 +0800
@@ -68,7 +68,9 @@
 CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache* CMTPImageDpObjectPropertyMgr::CMTPImagePropertiesCache::NewL()
     {
     CMTPImagePropertiesCache* self = new(ELeave) CMTPImagePropertiesCache(KElements, ENumProperties);
+    CleanupStack::PushL(self);
     self->ConstructL();
+    CleanupStack::Pop(self);
     return self;
     }
 
--- a/mtpdataproviders/mtppictbridgedp/inc/s60dependency.h	Fri Jul 23 18:35:35 2010 +0800
+++ b/mtpdataproviders/mtppictbridgedp/inc/s60dependency.h	Mon Aug 09 12:19:11 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/mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedp.cpp	Fri Jul 23 18:35:35 2010 +0800
+++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpdevicedp.cpp	Mon Aug 09 12:19:11 2010 +0800
@@ -388,7 +388,9 @@
 
 		if(extnpluginMap )
 			{
+            CleanupStack::PushL(extnpluginMap);
 			iExtnPluginMapArray.AppendL(extnpluginMap);
+			CleanupStack::Pop(extnpluginMap);
 			}
 
 		}
--- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetstorageinfo.cpp	Fri Jul 23 18:35:35 2010 +0800
+++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtpgetstorageinfo.cpp	Mon Aug 09 12:19:11 2010 +0800
@@ -196,7 +196,7 @@
 		        {
 		        //E: is set as logically removable after eMMC image updated
 		        //So here we need to deal with this case to set it as FixedRam
-		        if(iDriveInfo.iDriveAtt & KDriveAttInternal)
+		        if(iDriveInfo.iDriveAtt & KDriveAttLogicallyRemovable)
 		            {
 		            __FLOG(_L8("removable but internal drive, set as Fixed RAM"));
 		            storageType = EMTPStorageFixedRAM;
--- a/mtpfws/mtpfw/dataproviders/devdp/src/cmtptypedeviceinfo.cpp	Fri Jul 23 18:35:35 2010 +0800
+++ b/mtpfws/mtpfw/dataproviders/devdp/src/cmtptypedeviceinfo.cpp	Mon Aug 09 12:19:11 2010 +0800
@@ -130,7 +130,9 @@
                 }
                 
             __ASSERT_DEBUG(chunk, User::Invariant());
+            CleanupStack::PushL(chunk);
             ChunkAppendL(*chunk);
+            CleanupStack::Pop(chunk);
             }
         }
     }
--- a/mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetformatcapabilities.cpp	Fri Jul 23 18:35:35 2010 +0800
+++ b/mtpfws/mtpfw/dataproviders/dputility/src/cmtpgetformatcapabilities.cpp	Mon Aug 09 12:19:11 2010 +0800
@@ -95,44 +95,71 @@
     CMTPTypeFormatCapability* frmCap = CMTPTypeFormatCapability::NewLC( EMTPFormatCodeAssociation ,interDesc );
     
     //EMTPObjectPropCodeStorageID
-    frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeStorageID) );
+    CMTPTypeObjectPropDesc* storageId = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeStorageID);
+    frmCap->AppendL(storageId);
+    CleanupStack::Pop(storageId);
     
     //EMTPObjectPropCodeObjectFormat
-    frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeObjectFormat) );
+    CMTPTypeObjectPropDesc* objFormat = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeObjectFormat);
+    frmCap->AppendL(objFormat);
+    CleanupStack::Pop(objFormat);
     
     //EMTPObjectPropCodeProtectionStatus
-    frmCap->AppendL( ServiceProtectionStatusL() );
+    CMTPTypeObjectPropDesc* protectionStatus = ServiceProtectionStatusL();
+    CleanupStack::PushL(protectionStatus);
+    frmCap->AppendL(protectionStatus);
+    CleanupStack::Pop(protectionStatus);
     
     //EMTPObjectPropCodeAssociationType
-    frmCap->AppendL( ServiceAssociationTypeL() );
+    CMTPTypeObjectPropDesc* associationType = ServiceAssociationTypeL();
+    CleanupStack::PushL(associationType);
+    frmCap->AppendL(associationType);
+    CleanupStack::Pop(associationType);
     
     //EMTPObjectPropCodeAssociationDesc
-    frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeAssociationDesc) );
+    CMTPTypeObjectPropDesc* associationDesc = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeAssociationDesc);
+    frmCap->AppendL(associationDesc);
+    CleanupStack::Pop(associationDesc);
     
     //EMTPObjectPropCodeObjectSize
-    frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeObjectSize) );
+    CMTPTypeObjectPropDesc* objSize = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeObjectSize);
+    frmCap->AppendL(objSize);
+    CleanupStack::Pop(objSize);
     
     //EMTPObjectPropCodeObjectFileName
     _LIT(KMtpObjDescObjFileName, "[a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~][a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~ ]{0, 7}\\.[[a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~][a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~ ]{0, 2}]?");
-    CMTPTypeString* form = CMTPTypeString::NewLC( KMtpObjDescObjFileName );   
-    frmCap->AppendL(CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeObjectFileName,
-            CMTPTypeObjectPropDesc::ERegularExpressionForm, form));
+    CMTPTypeString* form = CMTPTypeString::NewLC( KMtpObjDescObjFileName ); 
+    CMTPTypeObjectPropDesc* objFileName = CMTPTypeObjectPropDesc::NewLC( EMTPObjectPropCodeObjectFileName,
+                CMTPTypeObjectPropDesc::ERegularExpressionForm, form);
+    frmCap->AppendL(objFileName);
+    CleanupStack::Pop(objFileName);
     CleanupStack::PopAndDestroy(form );       
     
     //EMTPObjectPropCodeDateModified
-    frmCap->AppendL(  CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeDateModified) );
+    CMTPTypeObjectPropDesc* dateModified = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeDateModified);
+    frmCap->AppendL(dateModified);
+    CleanupStack::Pop(dateModified);
     
     //EMTPObjectPropCodeParentObject
-    frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeParentObject) );
+    CMTPTypeObjectPropDesc* parentobj = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeParentObject);
+    frmCap->AppendL(parentobj);
+    CleanupStack::Pop(parentobj);
     
     //EMTPObjectPropCodePersistentUniqueObjectIdentifier
-    frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodePersistentUniqueObjectIdentifier) );
+    CMTPTypeObjectPropDesc* objectIdentifier = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodePersistentUniqueObjectIdentifier);
+    frmCap->AppendL(objectIdentifier);
+    CleanupStack::Pop(objectIdentifier);
     
     //EMTPObjectPropCodeName
-    frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeName)); 
+    CMTPTypeObjectPropDesc* name = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeName);
+    frmCap->AppendL(name);
+    CleanupStack::Pop(name);
     
     //EMTPObjectPropCodeNonConsumable
-    frmCap->AppendL(ServiceNonConsumableL() );
+    CMTPTypeObjectPropDesc* nonConsumable = ServiceNonConsumableL();
+    CleanupStack::PushL(nonConsumable);
+    frmCap->AppendL(nonConsumable);
+    CleanupStack::Pop(nonConsumable);
     
     iCapabilityList->AppendL(frmCap);
     CleanupStack::Pop(frmCap);
@@ -146,38 +173,60 @@
     CMTPTypeFormatCapability* frmCap = CMTPTypeFormatCapability::NewLC( aFormatCode ,interDesc );
     
     //EMTPObjectPropCodeStorageID
-    frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeStorageID) );
+    CMTPTypeObjectPropDesc* storageID = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeStorageID);
+    frmCap->AppendL(storageID);
+    CleanupStack::Pop(storageID);
     
     //EMTPObjectPropCodeObjectFormat
-    frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeObjectFormat) );
+    CMTPTypeObjectPropDesc* objectFormat = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeObjectFormat);
+    frmCap->AppendL(objectFormat);
+    CleanupStack::Pop(objectFormat);
     
     //EMTPObjectPropCodeProtectionStatus
-    frmCap->AppendL( ServiceProtectionStatusL() );
+    CMTPTypeObjectPropDesc* protectionStatus = ServiceProtectionStatusL();
+    CleanupStack::PushL(protectionStatus);
+    frmCap->AppendL(protectionStatus);
+    CleanupStack::Pop(protectionStatus);
     
     //EMTPObjectPropCodeObjectSize
-    frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeObjectSize) );
+    CMTPTypeObjectPropDesc* objSize = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeObjectSize);
+    frmCap->AppendL(objSize);
+    CleanupStack::Pop(objSize);
     
     //EMTPObjectPropCodeObjectFileName
     _LIT(KMtpObjDescObjFileName, "[a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~][a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~ ]{0, 7}\\.[[a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~][a-zA-Z!#\\$%&'\\(\\)\\-0-9@\\^_\\`\\{\\}\\~ ]{0, 2}]?");
-    CMTPTypeString* form = CMTPTypeString::NewLC( KMtpObjDescObjFileName );   
-    frmCap->AppendL(CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeObjectFileName,
-            CMTPTypeObjectPropDesc::ERegularExpressionForm, form));
+    CMTPTypeString* form = CMTPTypeString::NewLC( KMtpObjDescObjFileName );
+    CMTPTypeObjectPropDesc* objFileName = CMTPTypeObjectPropDesc::NewLC( EMTPObjectPropCodeObjectFileName,
+                CMTPTypeObjectPropDesc::ERegularExpressionForm, form);
+    frmCap->AppendL(objFileName);
+    CleanupStack::Pop(objFileName);
     CleanupStack::PopAndDestroy(form );     
     
     //EMTPObjectPropCodeDateModified
-    frmCap->AppendL(  CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeDateModified) );
+    CMTPTypeObjectPropDesc* dateModified = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeDateModified);
+    frmCap->AppendL(dateModified);
+    CleanupStack::Pop(dateModified);
     
     //EMTPObjectPropCodeParentObject
-    frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeParentObject) );
+    CMTPTypeObjectPropDesc* parentObject = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeParentObject);
+    frmCap->AppendL(parentObject);
+    CleanupStack::Pop(parentObject);
     
     //EMTPObjectPropCodePersistentUniqueObjectIdentifier
-    frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodePersistentUniqueObjectIdentifier) );
+    CMTPTypeObjectPropDesc* objectIdentifier = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodePersistentUniqueObjectIdentifier);
+    frmCap->AppendL(objectIdentifier);
+    CleanupStack::Pop(objectIdentifier);
     
     //EMTPObjectPropCodeName
-    frmCap->AppendL( CMTPTypeObjectPropDesc::NewL(EMTPObjectPropCodeName)); 
+    CMTPTypeObjectPropDesc* name = CMTPTypeObjectPropDesc::NewLC(EMTPObjectPropCodeName);
+    frmCap->AppendL(name);
+    CleanupStack::Pop(name);
     
     //EMTPObjectPropCodeNonConsumable
-    frmCap->AppendL(ServiceNonConsumableL() );
+    CMTPTypeObjectPropDesc* nonConsumable = ServiceNonConsumableL();
+    CleanupStack::PushL(nonConsumable);
+    frmCap->AppendL(nonConsumable);
+    CleanupStack::Pop(nonConsumable);
     
     iCapabilityList->AppendL(frmCap);
     CleanupStack::Pop(frmCap);
--- a/mtpfws/mtpfw/datatypes/interface/mtpprotocolconstants.h	Fri Jul 23 18:35:35 2010 +0800
+++ b/mtpfws/mtpfw/datatypes/interface/mtpprotocolconstants.h	Mon Aug 09 12:19:11 2010 +0800
@@ -368,7 +368,7 @@
     EMTPRespCodeCaptureAlreadyTerminated                = 0x2018,
     EMTPRespCodeDeviceBusy                              = 0x2019,
     EMTPRespCodeInvalidParentObject                     = 0x201A,
-    EMTPRespCodeInvalidDeviEMTPRespCodecePropFormat     = 0x201B,
+    EMTPRespCodeInvalidDevicePropFormat                 = 0x201B,
     EMTPRespCodeInvalidDevicePropValue                  = 0x201C,
     EMTPRespCodeInvalidParameter                        = 0x201D,
     EMTPRespCodeSessionAlreadyOpen                      = 0x201E,
--- a/mtpfws/mtpfw/datatypes/src/cmtptypeobjectinfo.cpp	Fri Jul 23 18:35:35 2010 +0800
+++ b/mtpfws/mtpfw/datatypes/src/cmtptypeobjectinfo.cpp	Mon Aug 09 12:19:11 2010 +0800
@@ -128,7 +128,9 @@
                 }
                 
             __ASSERT_DEBUG(chunk, User::Invariant());
+            CleanupStack::PushL(chunk);
             ChunkAppendL(*chunk);
+            CleanupStack::Pop(chunk);
             }
         }
     }
--- a/mtpfws/mtpfw/datatypes/src/cmtptypestorageinfo.cpp	Fri Jul 23 18:35:35 2010 +0800
+++ b/mtpfws/mtpfw/datatypes/src/cmtptypestorageinfo.cpp	Mon Aug 09 12:19:11 2010 +0800
@@ -115,7 +115,9 @@
                 break;
                 }
             __ASSERT_DEBUG(chunk, User::Invariant());
+            CleanupStack::PushL(chunk);
             ChunkAppendL(*chunk);
+            CleanupStack::Pop(chunk);
             }
         }
     }
--- a/mtpfws/mtpfw/inc/cmtpconnection.h	Fri Jul 23 18:35:35 2010 +0800
+++ b/mtpfws/mtpfw/inc/cmtpconnection.h	Mon Aug 09 12:19:11 2010 +0800
@@ -147,6 +147,7 @@
     
     void EnqueueEvent(CMTPEventLink* aLink);
     void DequeueEvent(CMTPEventLink* aLink);
+	void DequeueAllEvents();
 
 /**
   * This method define and attach the property for publishing connection state 
--- a/mtpfws/mtpfw/inc/mtpcommonconst.h	Fri Jul 23 18:35:35 2010 +0800
+++ b/mtpfws/mtpfw/inc/mtpcommonconst.h	Mon Aug 09 12:19:11 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/cmtpconnection.cpp	Fri Jul 23 18:35:35 2010 +0800
+++ b/mtpfws/mtpfw/src/cmtpconnection.cpp	Mon Aug 09 12:19:11 2010 +0800
@@ -82,17 +82,9 @@
     __FLOG(_L8("~CMTPConnection - Entry"));
     CloseAllSessions();
     
-    // Remove any events not associated 
-    // with a session
-    TSglQueIter<CMTPEventLink> iter(iEventQ);
-    iter.SetToFirst();
-    CMTPEventLink* link = NULL;
-    
-    while ((link = iter++) != NULL)
-    	{
-    	delete link;
-    	}
-    
+	//remove all events
+    DequeueAllEvents();
+	
     iSessions.ResetAndDestroy();
     
     if (iTransportConnection != NULL)
@@ -667,9 +659,16 @@
     DequeueEvent(iEventQ.First());       
    	if (iPendingEventCount > 0)
    		{
-   		// Forward the event to the transport connection layer.
-   		__FLOG(_L8("Sending queued event"));
- 	    iTransportConnection->SendEventL(iEventQ.First()->iEvent);
+		if (NULL != iTransportConnection)
+			{
+			// Forward the event to the transport connection layer.
+			__FLOG(_L8("Sending queued event"));
+			iTransportConnection->SendEventL(iEventQ.First()->iEvent);
+			}
+		else
+			{
+			DequeueAllEvents();
+			}
    		}
     
     __FLOG(_L8("SendEventCompleteL - Exit"));
@@ -1046,6 +1045,19 @@
     __FLOG(_L8("RemoveEventsForSession - Exit"));
 	}
 
+void CMTPConnection::DequeueAllEvents()
+	{
+	TSglQueIter<CMTPEventLink> iter(iEventQ);
+    iter.SetToFirst();
+    CMTPEventLink* link = NULL;
+    
+    while ((link = iter++) != NULL)
+    	{
+    	delete link;
+    	}
+	iPendingEventCount = 0;
+	}
+	
 void CMTPConnection::DequeueEvent(CMTPEventLink* aLink)
 	{
 	iEventQ.Remove(*aLink);
--- a/mtptransports/mtpcontroller/src/cmtpbearermonitor.cpp	Fri Jul 23 18:35:35 2010 +0800
+++ b/mtptransports/mtpcontroller/src/cmtpbearermonitor.cpp	Mon Aug 09 12:19:11 2010 +0800
@@ -80,7 +80,9 @@
     __FLOG( _L8("+ConstructL") );
     
     CMTPBluetoothController* btController = CMTPBluetoothController::NewL( *this );
+    CleanupStack::PushL(btController);
     iMTPControllers.AppendL( btController );
+    CleanupStack::Pop(btController);
     
     __FLOG( _L8("-ConstructL") );
     }
--- a/package_definition.xml	Fri Jul 23 18:35:35 2010 +0800
+++ b/package_definition.xml	Mon Aug 09 12:19:11 2010 +0800
@@ -1,56 +1,103 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <SystemDefinition schema="3.0.0">
-  <package id="remoteconn" name="Remote Connectivity" levels="plugin framework server generic specific">
-    <collection id="connectivitymodules" name="Connectivity Modules" level="framework">
-      <component id="secon" filter="s60" name="Service Controllers">
-        <unit bldFile="connectivitymodules/secon/group"/>
-      </component>
-    </collection>
-    <collection id="remoteconn_info" name="Remote Connectivity Info" level="specific">
-      <component id="remoteconn_plat" filter="s60" name="Remote Connectivity Platform Interfaces" class="api">
-        <unit bldFile="remoteconn_plat/group"/>
-      </component>
-      <component id="remoteconn_metadata" name="Remote Connectivity Metadata" class="config" introduced="^2" purpose="development" target="desktop">
-        <unit mrp="remoteconn_info/remoteconn_metadata/remoteconn_metadata.mrp"/>
-      </component>
-    </collection>
-    <collection id="mtptransports" name="MTP Transports" level="plugin">
-      <component id="mtpusbtransport" name="MTP USB Transport" introduced="^2" purpose="optional" class="plugin">
-        <unit bldFile="mtptransports/mtpusbtransport/group" mrp="mtptransports/mtpusbtransport/group/mtp_usbsic.mrp"/>
-      </component>
-      <component id="mtpptpiptransport" name="MTP PTP-IP Transport" introduced="^3" purpose="optional" class="plugin">
-        <unit bldFile="mtptransports/mtpptpiptransport/group" mrp="mtptransports/mtpptpiptransport/group/mtp_ptpip.mrp"/>
-      </component>
-      <component id="mtpcontroller" name="MTP Controller" introduced="^3" purpose="optional" class="plugin">
-        <unit bldFile="mtptransports/mtpcontroller/group" mrp="mtptransports/mtpcontroller/group/mtpcontroller.mrp"/>
-      </component>
-    </collection>
-    <collection id="mtpfws" name="MTP Frameworks" level="framework">
-      <component id="mtpfw" name="MTP Framework" introduced="^2" purpose="optional">
-        <unit bldFile="mtpfws/mtpfw/group" mrp="mtpfws/mtpfw/group/mtp_framework.mrp"/>
-      </component>
-      
-    </collection>
-    <collection id="mtpdataproviders" name="MTP Data Providers" level="generic">
-      <component id="mtpfileandfolderdp" name="MTP File and Folder Provider" introduced="^2" purpose="optional" class="plugin">
-        <unit bldFile="mtpdataproviders/mtpfileandfolderdp/group" mrp="mtpdataproviders/mtpfileandfolderdp/group/mtp_filedp.mrp"/>
-      </component>
-    </collection>
-    <collection id="backupandrestore" name="Backup and Restore" level="specific">
-      <component id="backupengine" name="Backup Engine" introduced="9.0" purpose="optional">
-        <unit bldFile="backupandrestore/backupengine/group" mrp="backupandrestore/backupengine/group/connectivity_backupengine.mrp"/>
-      </component>
-     <component id="backuptest" name="Backup Test" introduced="^2" purpose="development">
-        <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">
-        <unit bldFile="obex/obexprotocol/group" mrp="obex/obexprotocol/group/obex.mrp"/>
-      </component>
-      <component id="obexextensionapi" name="OBEX Extension API" introduced="9.2" purpose="optional">
-        <unit bldFile="obex/obexextensionapi/group" mrp="obex/obexextensionapi/group/obex_extensionapis.mrp"/>
-      </component>
-    </collection>
-  </package>
+ <package id="remoteconn" name="Remote Connectivity" levels="plugin framework server generic specific">
+  <collection id="remoteconn_info" name="Remote Connectivity Info" level="specific">
+   <component id="remoteconn_metadata" name="Remote Connectivity Metadata" class="config" introduced="^2" purpose="development" target="desktop">
+    <unit mrp="remoteconn_info/remoteconn_metadata/remoteconn_metadata.mrp"/>
+   </component>
+  </collection>
+  <collection id="remoteconn_plat" name="Remote Connectivity Platform Interfaces" level="specific">
+   <component id="dialup_connection_status_api" name="Dialup Connection Status API" class="api" filter="s60">
+    <meta rel="Api" href="remoteconn_plat/dialup_connection_status_api/dialup_connection_status_api.metaxml"/>
+    <unit bldFile="remoteconn_plat/dialup_connection_status_api/group"/>
+   </component>
+   <component id="dun_secondary_display_notification_api" name="Dialup Secondary Display Notification API" class="api" filter="s60">
+    <meta rel="Api" href="remoteconn_plat/dun_secondary_display_notification_api/dun_secondary_display_notification_api.metaxml"/>
+    <unit bldFile="remoteconn_plat/dun_secondary_display_notification_api/group"/>
+   </component>
+   <component id="generic_hid_api" name="Generic HID API" class="api" filter="s60">
+    <!-- Missing? <meta rel="Api" href="remoteconn_plat/generic_hid_api/generic_hid_api.metaxml"/> -->
+    <unit bldFile="remoteconn_plat/generic_hid_api/group"/>
+   </component>
+   <component id="locod_bearer_plugin_api" name="Local Connectivity Daemon Bearer Plugin API" class="api" filter="s60">
+    <!-- Missing? <meta rel="Api" href="remoteconn_plat/locod_bearer_plugin_api/locod_bearer_plugin_api.metaxml"/> -->
+    <unit bldFile="remoteconn_plat/locod_bearer_plugin_api/group"/>
+   </component>
+   <component id="locod_service_plugin_api" name="Local Connectivity Daemon Service Plugin API" class="api" filter="s60">
+    <!-- Missing? <meta rel="Api" href="remoteconn_plat/locod_service_plugin_api/locod_service_plugin_api.metaxml"/> -->
+    <unit bldFile="remoteconn_plat/locod_service_plugin_api/group"/>
+   </component>
+  </collection>
+  <collection id="localconnectivityservice" name="Local Connectivity Service" level="server">
+   <component id="locod" name="Local Connectivity Daemon" introduced="^4" purpose="optional" filter="s60">
+         <unit bldFile="localconnectivityservice/locod/group"/>
+   </component>
+   <component id="dun" name="Dial-Up Networking" introduced="^4" purpose="optional" filter="s60">
+         <unit bldFile="localconnectivityservice/dun/group"/>
+   </component>
+   <component id="generichid" name="Generic Human-Interface Device" introduced="^4" purpose="optional" filter="s60">
+         <unit bldFile="localconnectivityservice/generichid/group"/>
+   </component>
+   <component id="headset" name="Headset" introduced="^4" purpose="optional" filter="s60">
+         <unit bldFile="localconnectivityservice/headset/group"/>
+   </component>
+  </collection>
+  <collection id="mtptransports" name="MTP Transports" level="plugin">
+   <component id="mtpusbtransport" name="MTP USB Transport" introduced="^2" purpose="optional" class="plugin">
+    <unit bldFile="mtptransports/mtpusbtransport/group" mrp="mtptransports/mtpusbtransport/group/mtp_usbsic.mrp"/>
+   </component>
+   <component id="mtpptpiptransport" name="MTP PTP-IP Transport" introduced="^3" purpose="optional" class="plugin">
+    <unit bldFile="mtptransports/mtpptpiptransport/group" mrp="mtptransports/mtpptpiptransport/group/mtp_ptpip.mrp"/>
+   </component>
+   <component id="mtpcontroller" name="MTP Controller" introduced="^3" purpose="optional" class="plugin">
+    <meta rel="config">
+     <defined condition="FF_MTP_CONTROLLER"/>
+    </meta>
+    <unit bldFile="mtptransports/mtpcontroller/group" mrp="mtptransports/mtpcontroller/group/mtpcontroller.mrp"/>
+   </component>
+  </collection>
+  <collection id="mtpfws" name="MTP Frameworks" level="framework">
+   <component id="mtpfw" name="MTP Framework" introduced="^2" purpose="optional">
+    <unit bldFile="mtpfws/mtpfw/group" mrp="mtpfws/mtpfw/group/mtp_framework.mrp"/>
+   </component>
+   <component id="devdpextn" name="MTP Device Provider Extension" introduced="^4" purpose="optional">
+ 	  <!-- can't have a component inside another component. Need to move to mtpfws/devdpextn/group -->
+	 <unit bldFile="mtpfws/mtpfw/dataproviders/devdp/devdpextn/group"/>
+   </component>
+  </collection>
+  <collection id="mtpdataproviders" name="MTP Data Providers" level="generic">
+   <component id="mtpfileandfolderdp" name="MTP File and Folder Provider" introduced="^2" purpose="optional" class="plugin">
+    <unit bldFile="mtpdataproviders/mtpfileandfolderdp/group" mrp="mtpdataproviders/mtpfileandfolderdp/group/mtp_filedp.mrp"/>
+   </component>
+   <component id="mtpimagedp" name="MTP Image Data Provider" filter="gt" introduced="^3" purpose="optional" class="plugin">
+    <unit bldFile="mtpdataproviders/mtpimagedp/group" mrp="mtpdataproviders/mtpimagedp/group/mtp_imagedp.mrp"/>
+   </component>
+   <component id="mtppictbridgedp" name="MTP PictBridge Data Provider" introduced="^3" purpose="optional" class="plugin" filter="gt">
+    <unit bldFile="mtpdataproviders/mtppictbridgedp/group" mrp="mtpdataproviders/mtppictbridgedp/group/mtp_pictbridgedp.mrp"/>
+   </component>
+   <component id="pictbridgeengine" name="MTP PictBridge Engine" introduced="^4" purpose="optional" filter="s60">
+ 	  <!-- can't have a component inside another component. Need to move to mtpdataproviders/pictbridgeengine/group -->
+     <unit bldFile="mtpdataproviders/mtppictbridgedp/pictbridgeengine/group"/>
+   </component>
+   <component id="mtpplaybackcontroldp" name="MTP Playback Control Data Provider" introduced="^4" filter="s60" purpose="optional" class="plugin">
+    <unit bldFile="mtpdataproviders/mtpplaybackcontroldp/group" mrp="mtpdataproviders/mtpplaybackcontroldp/group/mtp_playbackcontroldp.mrp"/>
+   </component>
+  </collection>
+  <collection id="backupandrestore" name="Backup and Restore" level="specific">
+   <component id="backupengine" name="Backup Engine" introduced="9.0" purpose="optional">
+    <unit bldFile="backupandrestore/backupengine/group" mrp="backupandrestore/backupengine/group/connectivity_backupengine.mrp"/>
+   </component>
+   <component id="backuptest" name="Backup Test" introduced="^2" purpose="development">
+    <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">
+    <unit bldFile="obex/obexprotocol/group" mrp="obex/obexprotocol/group/obex.mrp"/>
+   </component>
+   <component id="obexextensionapi" name="OBEX Extension API" introduced="9.2" purpose="optional">
+    <unit bldFile="obex/obexextensionapi/group" mrp="obex/obexextensionapi/group/obex_extensionapis.mrp"/>
+   </component>
+  </collection>
+ </package>
 </SystemDefinition>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package_map.xml	Mon Aug 09 12:19:11 2010 +0800
@@ -0,0 +1,1 @@
+<PackageMap root="sf" layer="mw"/>