installationservices/swcomponentregistry/inc_private/scrclient.inl
changeset 33 8110bf1194d1
parent 25 98b66e4fb0be
--- a/installationservices/swcomponentregistry/inc_private/scrclient.inl	Mon May 03 12:38:03 2010 +0300
+++ b/installationservices/swcomponentregistry/inc_private/scrclient.inl	Fri May 14 15:58:48 2010 +0300
@@ -154,7 +154,27 @@
 			{// destroy the filter if created locally
 			CleanupStack::PopAndDestroy((C*)localCopyOfObject);
 			}
-		}// Emd of ExternalizeFilterL
+		}// End of ExternalizeObjectL
+	
+    template <class C>
+    inline void ExternalizeRefObjectL(const C& aObject, RBuf8& aBuf)
+        {
+        // Get the required buffer size for the externalized C object
+        TInt bufSize = GetObjectBufferSizeL(aObject);
+            
+        // Clean the buffer and re-create it with the required buffer size 
+        aBuf.Close();
+        aBuf.CreateL(bufSize);
+            
+        // Externalize the filter object into the buffer
+        RDesWriteStream wstream(aBuf);
+        wstream.PushL();
+        wstream << aObject;
+        wstream.CommitL();
+        wstream.Pop();
+        wstream.Release();
+            
+        }// End of ExternalizeObjectL	
 	}
 
 #endif /* SCRCLIENT_INL */