201039_02 PDK_4.0.a
authorhgs
Mon, 04 Oct 2010 13:32:20 +0300
changeset 34 eab116a48b80
parent 33 6ac064bb53eb
201039_02
package_definition.xml
upnpavcontroller/upnpavcontrollerhelper/src/upnpdownloaditemresolver.cpp
upnpavcontroller/upnpavcontrollerserver/src/upnpavcontrollerimpl.cpp
upnpavcontroller/upnpavcontrollerserver/src/upnpavcontrollerserver.cpp
upnpavcontroller/upnpavcontrollerserver/src/upnpuploadsession.cpp
upnpavcontroller/upnpxmlparser/src/upnpxmlparserlite.cpp
upnpavcontrolpoint/avcpengine/inc/upnpbrowsecommand.h
upnpavcontrolpoint/avcpengine/src/upnpbrowsecommand.cpp
upnpavcontrolpoint/avcpengineclient/inc/upnpavcpenginerfsclient.h
upnpavcontrolpoint/avcpengineclient/src/upnpavcpenginerfsclient.cpp
upnpframework/upnpcommonui/src/upnpbrowsedialog.cpp
upnpharvester/common/cmsqlwrapper/src/cmsqldbclause.cpp
upnpmediaserver/avobjects/src/upnpdlnaprotocolinfo.cpp
upnpmediaserver/avobjects/src/upnpitem.cpp
upnpsettings/multiselectionui/src/upnpappmultiselectionpopup.cpp
upnpsettings/upnpgsplugin/src/upnpappsettingitemhomeiap.cpp
upnpsharing/upnpdlnaprofiler/src/upnpaudiosolverbase.cpp
upnpsharing/upnpdlnaprofiler/src/upnpdlnaprofiler.cpp
--- a/package_definition.xml	Tue Sep 21 11:21:11 2010 +0300
+++ b/package_definition.xml	Mon Oct 04 13:32:20 2010 +0300
@@ -1,8 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <SystemDefinition schema="3.0.0">
- <package id="dlnasrv" name="DLNA Services" levels="stack server ctrl framework plugin">
+ <package id="dlnasrv" name="DLNA Services" version="1.1.0" levels="stack server ctrl framework plugin">
   <!-- uncomment all the units when configuration is in place, they're currently #included from other xxx_build components -->
   <collection id="dlnasrv_plat" name="DLNA Services Platform Interfaces" level="plugin">
+   <meta rel="config">
+    <defined condition="FF_UPNP_FRAMEWORK_2_0"/>
+   </meta>
    <component id="upnp_media_server_settings_api" name="UPnP Media Server Settings API" class="api" filter="s60">
     <meta rel="Api" href="dlnasrv_plat/upnp_media_server_settings_api/upnp_media_server_settings_api.metaxml"/>
     <unit bldFile="dlnasrv_plat/upnp_media_server_settings_api/group"/>
@@ -40,15 +43,24 @@
    </component>
   </collection>
   <collection id="upnpavcontrolpoint" name="UPnP A/V Control Point" level="plugin">
+   <meta rel="config">
+    <defined condition="FF_UPNP_FRAMEWORK_2_0"/>
+   </meta>
    <component id="avcontrolframework" filter="s60" name="A/V Control Famework" introduced="9.1" deprecated="^3">
     <unit bldFile="upnpavcontrolpoint/avcontrolframework/group" filter="!test"/>
     <unit bldFile="upnpavcontrolpoint/avcontrolframework/tsrc/public/basic/group" filter="test,api_test"/>
    </component>
    <component id="upnpavcontrolpoint_rom" filter="s60" name="UPnP A/V Control Point ROM" introduced="9.1" deprecated="^3">
+   <meta rel="config">
+    <defined condition="FF_UPNP_FRAMEWORK_2_0"/>
+   </meta> 
     <unit bldFile="upnpavcontrolpoint/rom"/>
    </component>
   </collection>
   <collection id="upnpmediaserver" name="UPnP Media Server" level="server">
+   <meta rel="config">
+    <defined condition="FF_UPNP_FRAMEWORK_2_0"/>
+   </meta>
    <component id="avobjects" filter="s60" name="A/V Objects">
     <unit bldFile="upnpmediaserver/avobjects/group" filter="!test"/>
     <unit bldFile="upnpmediaserver/avobjects/tsrc/public/basic/group" filter="test,api_test"/>
@@ -64,6 +76,9 @@
     <unit bldFile="upnpmediaserver/contentdirectoryservice/group"/>
    </component>
    <component id="mediaserverengine" filter="s60" name="Media Server Engine">
+   <meta rel="config">
+    <defined condition="FF_UPNP_FRAMEWORK_2_0"/>
+   </meta>
     <unit bldFile="upnpmediaserver/mediaserverengine/group"/>
    </component>
    <component id="upnpmediaserver_rom" filter="s60" name="UPnP Media Server ROM">
@@ -71,6 +86,9 @@
    </component>
   </collection>
   <collection id="upnpavcontroller" name="UPnP A/V Controller" level="ctrl">
+   <meta rel="config">
+    <defined condition="FF_UPNP_FRAMEWORK_2_0"/>
+   </meta>
    <component id="upnpxmlparser" filter="s60" name="UPnP XML Parser" introduced="^2">
     <unit bldFile="upnpavcontroller/upnpxmlparser/group" filter="!test"/>
     <unit bldFile="upnpavcontroller/upnpxmlparser/tsrc/upnpxmlparsertest/group" filter="test,api_test"/>
@@ -79,6 +97,9 @@
     <unit bldFile="upnpavcontroller/upnpavcontrollerserver/group"/>
    </component>
    <component id="upnpavcontrollerclient" filter="s60" name="UPnP A/V Ccontroller Client" introduced="^2">
+   <meta rel="config">
+    <defined condition="FF_UPNP_FRAMEWORK_2_0"/>
+   </meta>
     <unit bldFile="upnpavcontroller/upnpavcontrollerclient/group"/>
    </component>
    <component id="upnpavcontrollerhelper" filter="s60" name="UPnP A/V Controller Helper" introduced="^2">
@@ -89,6 +110,9 @@
    </component>
   </collection>
   <collection id="upnpframework" name="UPnP Framework" level="framework">
+   <meta rel="config">
+    <defined condition="FF_UPNP_FRAMEWORK_2_0"/>
+   </meta>
    <component id="upnputilities" filter="s60" name="UPnP Utilities" introduced="^2">
     <unit bldFile="upnpframework/upnputilities/group"/>
    </component>
@@ -133,6 +157,9 @@
    </component>
   </collection>
   <collection id="upnpsettings" name="UPnP Settings" level="framework">
+   <meta rel="config">
+    <defined condition="FF_UPNP_FRAMEWORK_2_0"/>
+   </meta>
    <component id="upnpsettingsengine" filter="s60" name="UPnP Settings Engine" introduced="^2">
     <unit bldFile="upnpsettings/upnpsettingsengine/group"/>
    </component>
@@ -179,6 +206,9 @@
       </component>
     </collection> -->
   <collection id="upnpsharing" name="UPnP Sharing" level="server">
+   <meta rel="config">
+    <defined condition="FF_UPNP_FRAMEWORK_2_0"/>
+   </meta>
    <component id="upnpdlnaprofiler" filter="s60" name="UPnP DLNA Profiler" introduced="^2">
     <unit bldFile="upnpsharing/upnpdlnaprofiler/group"/>
    </component>
@@ -196,6 +226,9 @@
    </component>
   </collection>
   <collection id="upnpmpxplugins" name="UPnP MPX Plugins" level="plugin">
+   <meta rel="config">
+    <defined condition="FF_UPNP_FRAMEWORK_2_0"/>
+   </meta>
    <component id="upnpplaybackplugins" filter="s60" name="UPnP Playback Plugins" class="plugin" introduced="^2">
     <unit bldFile="upnpmpxplugins/upnpplaybackplugins/group"/>
    </component>
--- a/upnpavcontroller/upnpavcontrollerhelper/src/upnpdownloaditemresolver.cpp	Tue Sep 21 11:21:11 2010 +0300
+++ b/upnpavcontroller/upnpavcontrollerhelper/src/upnpdownloaditemresolver.cpp	Mon Oct 04 13:32:20 2010 +0300
@@ -572,6 +572,7 @@
     // parse protocol info
     CUpnpDlnaProtocolInfo* pInfo = NULL;
     pInfo = CUpnpDlnaProtocolInfo::NewL( attr->Value() );
+    CleanupStack::PushL( pInfo );
     
     //if DLNA compliant item
     if ( pInfo->PnParameter() != KNullDesC8() )
@@ -590,6 +591,7 @@
             }
         
         }
+    CleanupStack::PopAndDestroy( pInfo );
     }
 
 
--- a/upnpavcontroller/upnpavcontrollerserver/src/upnpavcontrollerimpl.cpp	Tue Sep 21 11:21:11 2010 +0300
+++ b/upnpavcontroller/upnpavcontrollerserver/src/upnpavcontrollerimpl.cpp	Mon Oct 04 13:32:20 2010 +0300
@@ -440,8 +440,10 @@
                     {
                     CUpnpAVDevice* tempDev = CUpnpAVDevice::NewL(
                         *devList[i] );
+                    CleanupStack::PushL( tempDev );
                     // Ownership of tempDev transferred
                     tempList->AppendDeviceL( *tempDev );
+                    CleanupStack::Pop( tempDev );
                     }
                 }
             }
--- a/upnpavcontroller/upnpavcontrollerserver/src/upnpavcontrollerserver.cpp	Tue Sep 21 11:21:11 2010 +0300
+++ b/upnpavcontroller/upnpavcontrollerserver/src/upnpavcontrollerserver.cpp	Mon Oct 04 13:32:20 2010 +0300
@@ -739,7 +739,9 @@
         if( iStartMessages.Count() > 0 )
             {
             RMessage2* message = new (ELeave) RMessage2( aMessage );
+            CleanupStack::PushL( message);
             iStartMessages.AppendL( message );
+            CleanupStack::Pop( message );
             }
         else
             {
--- a/upnpavcontroller/upnpavcontrollerserver/src/upnpuploadsession.cpp	Tue Sep 21 11:21:11 2010 +0300
+++ b/upnpavcontroller/upnpavcontrollerserver/src/upnpuploadsession.cpp	Mon Oct 04 13:32:20 2010 +0300
@@ -378,9 +378,12 @@
     
     CUPnPResourceHelper* helper = CUPnPResourceHelper::NewL();
     CleanupStack::Pop( tmpUpnpItem );
+    CleanupStack::PushL( helper );
     helper->SetItem( tmpUpnpItem ); // Transfer ownership
     iResources.AppendL( helper );
     
+    CleanupStack::Pop( helper );
+    
     iUploader->MoveToTransferQueueL( (TAny*)transferItem.iKey );
     
     CleanupStack::PopAndDestroy( tmpTransferItem );
--- a/upnpavcontroller/upnpxmlparser/src/upnpxmlparserlite.cpp	Tue Sep 21 11:21:11 2010 +0300
+++ b/upnpavcontroller/upnpxmlparser/src/upnpxmlparserlite.cpp	Mon Oct 04 13:32:20 2010 +0300
@@ -289,15 +289,19 @@
                 CleanupStack::PushL( tempBuf );
                 HBufC* buf = HBufC::NewL( iFormatString->Length() +
                     tempBuf->Length() );
+                CleanupStack::PushL( buf );
                 buf->Des().Format( *iFormatString, tempBuf );
+                obj->SetTitleL( buf );
+                CleanupStack::Pop( buf );
                 CleanupStack::PopAndDestroy( tempBuf );
-                obj->SetTitleL( buf );
                 }
             else
                 {
                 HBufC* buf = HBufC::NewL( iTitleBuf->Length() );
+                CleanupStack::PushL( buf );
                 buf->Des().Copy( *iTitleBuf );
                 obj->SetTitleL( buf );
+                CleanupStack::Pop( buf );
                 }
             delete iTitleBuf; iTitleBuf = NULL;
             }
--- a/upnpavcontrolpoint/avcpengine/inc/upnpbrowsecommand.h	Tue Sep 21 11:21:11 2010 +0300
+++ b/upnpavcontrolpoint/avcpengine/inc/upnpbrowsecommand.h	Mon Oct 04 13:32:20 2010 +0300
@@ -53,7 +53,12 @@
 		/**
 		* Destructor.
 		*/	       
-		virtual ~CUpnpBrowseCommand();	       
+		virtual ~CUpnpBrowseCommand();	  
+		   
+		/**
+		* Cleanup Mechanism
+		*/
+		static void CleanupArray(TAny* aDirs);
 			
 	public:	// Method from CUpnpCommand
 		/**
--- a/upnpavcontrolpoint/avcpengine/src/upnpbrowsecommand.cpp	Tue Sep 21 11:21:11 2010 +0300
+++ b/upnpavcontrolpoint/avcpengine/src/upnpbrowsecommand.cpp	Mon Oct 04 13:32:20 2010 +0300
@@ -148,15 +148,26 @@
 	//ASSERT(aMessage.Function() == EDownloadDirList);
 
      TInt size = iResult.Count();
-      TFileInfo* dirs = new  TFileInfo[size];
+     TFileInfo* dirs = new  TFileInfo[size];
+     CleanupStack::PushL(TCleanupItem(CleanupArray, dirs));
       for (TInt i = 0; i < size; i++) 
       	{
          dirs[i] = iResult[i];
       	}
       TPtr8 result(reinterpret_cast<TUint8*>(dirs), sizeof(TFileInfo)*size, sizeof(TFileInfo)*size);          
       aMessage.WriteL(1, result);  
-      delete[] dirs;
+	  CleanupStack::PopAndDestroy(dirs);
 	}
+	
+// -----------------------------------------------------------------------------
+// CUpnpBrowseCommand::CleanupArray
+// -----------------------------------------------------------------------------
+// 
+void CUpnpBrowseCommand::CleanupArray(TAny* aDirs)
+    {
+    TFileInfo* dirs = (TFileInfo*) aDirs ;
+    delete[] dirs;
+    }
 
 
 // -----------------------------------------------------------------------------
--- a/upnpavcontrolpoint/avcpengineclient/inc/upnpavcpenginerfsclient.h	Tue Sep 21 11:21:11 2010 +0300
+++ b/upnpavcontrolpoint/avcpengineclient/inc/upnpavcpenginerfsclient.h	Mon Oct 04 13:32:20 2010 +0300
@@ -138,6 +138,12 @@
 		* @return converted object of CDirEnt
 		*/
 		CRsfwDirEnt* RUpnpAVCPEngineRFSClient::GetFileInformationL(TFileInfo& aFileInfo);
+		
+	public:
+		/*
+		 * Custom cleanup mechanism
+		 */
+		static void CleanupArray(TAny* aDirs);
 	};
 
 #endif // C_RUPNPAVCPENGINERFSCLIENT_H
--- a/upnpavcontrolpoint/avcpengineclient/src/upnpavcpenginerfsclient.cpp	Tue Sep 21 11:21:11 2010 +0300
+++ b/upnpavcontrolpoint/avcpengineclient/src/upnpavcpenginerfsclient.cpp	Mon Oct 04 13:32:20 2010 +0300
@@ -39,7 +39,16 @@
     :RUpnpAVCPEngineClient()
     {
     }
-
+	
+// -----------------------------------------------------------------------------
+// Cleanup mechanism
+// -----------------------------------------------------------------------------
+//
+void RUpnpAVCPEngineRFSClient::CleanupArray(TAny* aDirs)
+    {
+    TFileInfo* dirs = (TFileInfo*) aDirs ;
+    delete[] dirs;
+    }
 
 // -----------------------------------------------------------------------------
 // RUpnpAVCPEngineRFSClient::GetDirectoryL
@@ -64,6 +73,7 @@
     	{        
         TFileInfo* dirs = new TFileInfo[size];
         // put array on cleanup stack
+        CleanupStack::PushL(TCleanupItem(CleanupArray, dirs));
         TPtr8 result(reinterpret_cast<TUint8*>(dirs), sizeof(TFileInfo)*size, sizeof(TFileInfo)*size);
         err = SendReceive(EDownloadDirList,TIpcArgs(id, &result));
 
@@ -72,7 +82,7 @@
         	CRsfwDirEnt* entry = GetFileInformationL(dirs[i]);
             aDirList.AppendL(entry);
         	}
-        delete[] dirs;
+        CleanupStack::PopAndDestroy(dirs);
     	}
     return err;
 	}
--- a/upnpframework/upnpcommonui/src/upnpbrowsedialog.cpp	Tue Sep 21 11:21:11 2010 +0300
+++ b/upnpframework/upnpcommonui/src/upnpbrowsedialog.cpp	Mon Oct 04 13:32:20 2010 +0300
@@ -2456,11 +2456,13 @@
             if ( !alreadyInArray )
                 {
                 CUpnpItem* itemForSelectionArray = CUpnpItem::NewL();
+                CleanupStack::PushL( itemForSelectionArray );
                 
                 itemForSelectionArray->CopyL( *iResultArray[ indexes->At(
                                                      selectionCount ) ] );
 
                 iSelectedItemsArray.AppendL( itemForSelectionArray );
+                CleanupStack::Pop( itemForSelectionArray );
                 }
             }
         }
--- a/upnpharvester/common/cmsqlwrapper/src/cmsqldbclause.cpp	Tue Sep 21 11:21:11 2010 +0300
+++ b/upnpharvester/common/cmsqlwrapper/src/cmsqldbclause.cpp	Mon Oct 04 13:32:20 2010 +0300
@@ -275,6 +275,7 @@
                             ( dataField.Length() * multiplier ) );  
                         HBufC8* temp = HBufC8::NewMaxL( iFreeText->Length() + 
                             ( dataField.Length() * multiplier ) );
+                        CleanupStack::PushL( temp );
                         // Format dataField into clause
                         if( multiplier == 1 )
                             {                    
@@ -293,7 +294,7 @@
                         iClause = iClause->ReAllocL( iClause->Length() + 
                             temp->Length() );
                         iClause->Des().Append( *temp );
-                        delete temp;                        
+                        CleanupStack::PopAndDestroy( temp );                       
                         }
                     else
                         {
--- a/upnpmediaserver/avobjects/src/upnpdlnaprotocolinfo.cpp	Tue Sep 21 11:21:11 2010 +0300
+++ b/upnpmediaserver/avobjects/src/upnpdlnaprotocolinfo.cpp	Mon Oct 04 13:32:20 2010 +0300
@@ -272,8 +272,9 @@
                 User::Leave( KErrArgument );
         
         TLex8* ptr = new TLex8(value);
+        CleanupStack::PushL(ptr);
         User::LeaveIfError(ptr->Val(iDlnaFlags[i], EHex)); 
-        delete ptr;
+        CleanupStack::PopAndDestroy(ptr);
         }
     SkipAndMark(aLexer,1);
     }
--- a/upnpmediaserver/avobjects/src/upnpitem.cpp	Tue Sep 21 11:21:11 2010 +0300
+++ b/upnpmediaserver/avobjects/src/upnpitem.cpp	Mon Oct 04 13:32:20 2010 +0300
@@ -58,7 +58,9 @@
 EXPORT_C CUpnpItem* CUpnpItem::NewL( )
     {
     CUpnpItem* self = new( ELeave ) CUpnpItem;    
+    CleanupStack::PushL( self );
 	self->ConstructL();
+	CleanupStack::Pop( self );
     return self;
     }
 
--- a/upnpsettings/multiselectionui/src/upnpappmultiselectionpopup.cpp	Tue Sep 21 11:21:11 2010 +0300
+++ b/upnpsettings/multiselectionui/src/upnpappmultiselectionpopup.cpp	Mon Oct 04 13:32:20 2010 +0300
@@ -64,9 +64,12 @@
 
     CUPnPAppMultiselectionPopup* self =
                    new(ELeave) CUPnPAppMultiselectionPopup( NULL, aHeading );
+    CleanupStack::PushL( self);
 
     self->ConstructL( aMediaType, aFileSharingEngine,aSelectionIndexArray );
-
+	
+    CleanupStack::Pop( self);
+    
     __LOG("CUPnPAppMultiselectionPopup::NewL end");
     return self;
     }
--- a/upnpsettings/upnpgsplugin/src/upnpappsettingitemhomeiap.cpp	Tue Sep 21 11:21:11 2010 +0300
+++ b/upnpsettings/upnpgsplugin/src/upnpappsettingitemhomeiap.cpp	Mon Oct 04 13:32:20 2010 +0300
@@ -133,10 +133,12 @@
     if ( iSharingState || status == UPnPAVControllerFactory::EStatusActive )
         {
         CAknInformationNote* note = new (ELeave) CAknInformationNote;
+        CleanupStack::PushL(note);
         HBufC* noteText = iCoeEnv->AllocReadResourceLC(
             R_QTN_IUPNP_IAP_TURN_SHARING_OFF);
         note->ExecuteLD(*noteText);
         CleanupStack::PopAndDestroy(noteText);
+        CleanupStack::Pop(note);
         return;
         }
 
--- a/upnpsharing/upnpdlnaprofiler/src/upnpaudiosolverbase.cpp	Tue Sep 21 11:21:11 2010 +0300
+++ b/upnpsharing/upnpdlnaprofiler/src/upnpaudiosolverbase.cpp	Mon Oct 04 13:32:20 2010 +0300
@@ -323,8 +323,9 @@
     // delete temporary file
     RFs fs;
     User::LeaveIfError( fs.Connect() );
+    CleanupClosePushL( fs );
     User::LeaveIfError( fs.Delete( KTargetAudioFile() ) );
-    fs.Close();
+    CleanupStack::PopAndDestroy( &fs );
     
     return retval;
     }
--- a/upnpsharing/upnpdlnaprofiler/src/upnpdlnaprofiler.cpp	Tue Sep 21 11:21:11 2010 +0300
+++ b/upnpsharing/upnpdlnaprofiler/src/upnpdlnaprofiler.cpp	Mon Oct 04 13:32:20 2010 +0300
@@ -62,13 +62,19 @@
     {
     __LOG( "[UPnPDlnaProfiler] ConstructL" );
     CUpnpAudioSolverBase* baseAudioSolver = CUpnpAudioSolverBase::NewL();
+    CleanupStack::PushL( baseAudioSolver );
     iAudioSolvers.AppendL( baseAudioSolver );
+    CleanupStack::Pop( baseAudioSolver );
     
     CUpnpAvSolverBase* baseAvSolver = CUpnpAvSolverBase::NewL();
+    CleanupStack::PushL( baseAvSolver );
     iAvSolvers.AppendL( baseAvSolver );
+    CleanupStack::Pop( baseAvSolver );
     
     CUpnpImageSolverBase* baseImageSolver = CUpnpImageSolverBase::NewL();
+    CleanupStack::PushL( baseImageSolver );
     iImageSolvers.AppendL( baseImageSolver );
+    CleanupStack::Pop( baseImageSolver );
     }