installationservices/swi/source/sisregistry/client/sisregistryentry.cpp
changeset 4 3eebb1e54d3a
parent 0 ba25891c3a9e
child 17 741e5bba2bd1
--- a/installationservices/swi/source/sisregistry/client/sisregistryentry.cpp	Fri Jan 22 09:56:12 2010 +0200
+++ b/installationservices/swi/source/sisregistry/client/sisregistryentry.cpp	Tue Jan 26 12:06:03 2010 +0200
@@ -639,3 +639,38 @@
 	return signedSuCert;	
 	}
 
+EXPORT_C void RSisRegistryEntry::RegistryFilesL(RPointerArray<HBufC>& aRegistryFiles)
+    {
+#ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
+    HBufC8* outputBuffer = HBufC8::NewLC(KDefaultBufferSize);
+	TPtr8 outputPtr(outputBuffer->Des());
+    
+    TInt result = SendReceive(ERegistryFiles, TIpcArgs(&outputPtr));
+    
+    if (KErrOverflow == result)
+        {
+        TInt lenNeeded;
+        TPckg<TInt> lenNeededPckg(lenNeeded);
+        lenNeededPckg.Copy(*outputBuffer);
+        
+        // Re-allocate output buffer
+        CleanupStack::PopAndDestroy(outputBuffer);
+        outputBuffer = HBufC8::NewLC(lenNeeded);
+        TPtr8 newOutputPtr(outputBuffer->Des());
+        
+        result = SendReceive(ERegistryFiles, TIpcArgs(&newOutputPtr));
+        }
+    User::LeaveIfError(result);
+
+    // Reading the list of files from the buffer
+    RDesReadStream outputStream(*outputBuffer);
+    CleanupClosePushL(outputStream);    
+    InternalizePointerArrayL(aRegistryFiles, outputStream);
+        
+    CleanupStack::PopAndDestroy(2, outputBuffer); // outputStream  
+#else
+    // There is API is not currently supported with USIF
+    User::Leave(KErrNotSupported);
+	aRegistryFiles.Close(); // To remove the compiler warning: variable/argument 'aRegistryFiles' is not used in function
+#endif
+    }