[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-server-cvs
Subject: [Server-cvs] tools/unittest/services ut_clfact.cpp,1.3,1.4
From: dcollins () helixcommunity ! org
Date: 2010-09-18 19:40:22
Message-ID: 201009181939.o8IJdtJv032033 () mailer ! progressive-comp ! com
[Download RAW message or body]
Update of /cvsroot/server/tools/unittest/services
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv7019
Modified Files:
ut_clfact.cpp
Log Message:
fix VC10 build-buster caused by mixed unix/windows newlines
Index: ut_clfact.cpp
===================================================================
RCS file: /cvsroot/server/tools/unittest/services/ut_clfact.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ut_clfact.cpp 1 Aug 2008 18:54:40 -0000 1.3
+++ ut_clfact.cpp 18 Sep 2010 19:40:19 -0000 1.4
@@ -1,191 +1,191 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Source last modified: $Id$
- *
- * Portions Copyright (c) 1995-2003 RealNetworks, Inc. All Rights Reserved.
- *
- * The contents of this file, and the files included with this file,
- * are subject to the current version of the RealNetworks Public
- * Source License (the "RPSL") available at
- * http://www.helixcommunity.org/content/rpsl unless you have licensed
- * the file under the current version of the RealNetworks Community
- * Source License (the "RCSL") available at
- * http://www.helixcommunity.org/content/rcsl, in which case the RCSL
- * will apply. You may also obtain the license terms directly from
- * RealNetworks. You may not use this file except in compliance with
- * the RPSL or, if you have a valid RCSL with RealNetworks applicable
- * to this file, the RCSL. Please see the applicable RPSL or RCSL for
- * the rights, obligations and limitations governing use of the
- * contents of the file.
- *
- * This file is part of the Helix DNA Technology. RealNetworks is the
- * developer of the Original Code and owns the copyrights in the
- * portions it created.
- *
- * This file, and the files included with this file, is distributed
- * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY
- * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS
- * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
- * ENJOYMENT OR NON-INFRINGEMENT.
- *
- * Technology Compatibility Kit Test Suite(s) Location:
- * http://www.helixcommunity.org/content/tck
- *
- * Contributor(s):
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "hxtypes.h"
-#include "hxcom.h"
-#include "hxerror.h"
-#include "hxresult.h"
-#include "ihxpckts.h"
-
-#include "hxcomm.h"
-#include "ut_buffer.h"
-#include "ut_packet.h"
-#include "ut_values.h"
-#include "hxrquest.h"
-#include "ut_fsmanager.h"
-#include "ut_clfact.h"
-#include "hxxml.h"
-#include "hxheap.h"
-#include "xmlparse.h"
-#include "expatprs.h"
-
-#ifdef _DEBUG
-#undef HX_THIS_FILE
-static char HX_THIS_FILE[] = __FILE__;
-#endif
-
-/**
- * \brief CUTClassFactory Constructor
- */
-CUTClassFactory::CUTClassFactory(IUnknown *pContext):
- m_lRefCount(0), m_pContext(pContext)
-{
- HX_ADDREF(m_pContext);
-}
-
-/**
- * \brief CUTClassFactory Destructor
- */
-CUTClassFactory::~CUTClassFactory()
-{
- HX_RELEASE(m_pContext);
-}
-
-/**
- * \brief QueryInterface ref hxcom.h
- */
-STDMETHODIMP
-CUTClassFactory::QueryInterface(REFIID riid, void** ppvObj)
-{
- if (IsEqualIID(riid, IID_IUnknown))
- {
- AddRef();
- *ppvObj = (IUnknown*)this;
- return HXR_OK;
- }
- else if (IsEqualIID(riid, IID_IHXCommonClassFactory))
- {
- AddRef();
- *ppvObj = (IHXCommonClassFactory*)this;
- return HXR_OK;
- }
-
- *ppvObj = NULL;
- return HXR_NOINTERFACE;
-}
-
-/**
- * \brief AddRef ref hxcom.h
- */
-STDMETHODIMP_(ULONG32)
-CUTClassFactory::AddRef()
-{
- return InterlockedIncrement(&m_lRefCount);
-}
-
-/**
- * \brief Release ref hxcom.h
- */
-STDMETHODIMP_(ULONG32)
-CUTClassFactory::Release()
-{
- if (InterlockedDecrement(&m_lRefCount) > 0)
- {
- return m_lRefCount;
- }
-
- delete this;
- return 0;
-}
-
-/**
- * \brief CreateInstance ref hxccf.h
- */
-STDMETHODIMP
-CUTClassFactory::CreateInstance
-(
- REFCLSID /*IN*/ rclsid,
- void** /*OUT*/ ppUnknown
-)
-{
- if (IsEqualCLSID(rclsid, CLSID_IHXBuffer))
- {
- *ppUnknown = (IUnknown*)(IHXBuffer*)(new CUTBufferMD5(this));
- ((IUnknown*)*ppUnknown)->AddRef();
- return HXR_OK;
- }
- else if (IsEqualCLSID(rclsid, CLSID_IHXPacket))
- {
- *ppUnknown = (IUnknown*)(IHXPacket*)(new CUTPacket(this));
- ((IUnknown*)*ppUnknown)->AddRef();
- return HXR_OK;
- }
- else if (IsEqualCLSID(rclsid, CLSID_IHXValues))
- {
- *ppUnknown = (IUnknown*)(IHXValues*)(new CUTValues(this));
- ((IUnknown*)*ppUnknown)->AddRef();
- return HXR_OK;
- }
- else if (IsEqualCLSID(rclsid, CLSID_IHXRequest))
- {
- *ppUnknown = (IUnknown*)(IHXRequest*)(new CHXRequest());
- ((IUnknown*)*ppUnknown)->AddRef();
- return HXR_OK;
- }
- else if (IsEqualCLSID(rclsid, CLSID_IHXFileSystemManager))
- {
- *ppUnknown = (IUnknown*)(IHXFileSystemManager*)(new CUTFSManager(this));
- ((IUnknown*)*ppUnknown)->AddRef();
- return HXR_OK;
- }
- else if (IsEqualCLSID(rclsid, CLSID_IHXXMLParser))
- {
- *ppUnknown = (IUnknown*)(IHXXMLParser *)(new HXExpatXMLParser(m_pContext));
- ((IUnknown*)*ppUnknown)->AddRef();
- return HXR_OK;
- }
-
- /// \warning if you add new services, please update the doxygen doc in ut_clfact.h
- *ppUnknown = NULL;
- return HXR_NOINTERFACE;
-}
-
-/**
- * \brief CreateInstanceAggregatable ref hxccf.h
-
- * Not implemented.
- */
-STDMETHODIMP
-CUTClassFactory::CreateInstanceAggregatable
-(
- REFCLSID /*IN*/ rclsid,
- REF(IUnknown *) /*OUT*/ ppUnknown,
- IUnknown* /*IN*/ pUnkOuter
-)
-{
- return HXR_NOTIMPL;
-}
+/* ***** BEGIN LICENSE BLOCK *****
+ * Source last modified: $Id$
+ *
+ * Portions Copyright (c) 1995-2003 RealNetworks, Inc. All Rights Reserved.
+ *
+ * The contents of this file, and the files included with this file,
+ * are subject to the current version of the RealNetworks Public
+ * Source License (the "RPSL") available at
+ * http://www.helixcommunity.org/content/rpsl unless you have licensed
+ * the file under the current version of the RealNetworks Community
+ * Source License (the "RCSL") available at
+ * http://www.helixcommunity.org/content/rcsl, in which case the RCSL
+ * will apply. You may also obtain the license terms directly from
+ * RealNetworks. You may not use this file except in compliance with
+ * the RPSL or, if you have a valid RCSL with RealNetworks applicable
+ * to this file, the RCSL. Please see the applicable RPSL or RCSL for
+ * the rights, obligations and limitations governing use of the
+ * contents of the file.
+ *
+ * This file is part of the Helix DNA Technology. RealNetworks is the
+ * developer of the Original Code and owns the copyrights in the
+ * portions it created.
+ *
+ * This file, and the files included with this file, is distributed
+ * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY
+ * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS
+ * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
+ * ENJOYMENT OR NON-INFRINGEMENT.
+ *
+ * Technology Compatibility Kit Test Suite(s) Location:
+ * http://www.helixcommunity.org/content/tck
+ *
+ * Contributor(s):
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "hxtypes.h"
+#include "hxcom.h"
+#include "hxerror.h"
+#include "hxresult.h"
+#include "ihxpckts.h"
+
+#include "hxcomm.h"
+#include "ut_buffer.h"
+#include "ut_packet.h"
+#include "ut_values.h"
+#include "hxrquest.h"
+#include "ut_fsmanager.h"
+#include "ut_clfact.h"
+#include "hxxml.h"
+#include "hxheap.h"
+#include "xmlparse.h"
+#include "expatprs.h"
+
+#ifdef _DEBUG
+#undef HX_THIS_FILE
+static char HX_THIS_FILE[] = __FILE__;
+#endif
+
+/**
+ * \brief CUTClassFactory Constructor
+ */
+CUTClassFactory::CUTClassFactory(IUnknown *pContext):
+ m_lRefCount(0), m_pContext(pContext)
+{
+ HX_ADDREF(m_pContext);
+}
+
+/**
+ * \brief CUTClassFactory Destructor
+ */
+CUTClassFactory::~CUTClassFactory()
+{
+ HX_RELEASE(m_pContext);
+}
+
+/**
+ * \brief QueryInterface ref hxcom.h
+ */
+STDMETHODIMP
+CUTClassFactory::QueryInterface(REFIID riid, void** ppvObj)
+{
+ if (IsEqualIID(riid, IID_IUnknown))
+ {
+ AddRef();
+ *ppvObj = (IUnknown*)this;
+ return HXR_OK;
+ }
+ else if (IsEqualIID(riid, IID_IHXCommonClassFactory))
+ {
+ AddRef();
+ *ppvObj = (IHXCommonClassFactory*)this;
+ return HXR_OK;
+ }
+
+ *ppvObj = NULL;
+ return HXR_NOINTERFACE;
+}
+
+/**
+ * \brief AddRef ref hxcom.h
+ */
+STDMETHODIMP_(ULONG32)
+CUTClassFactory::AddRef()
+{
+ return InterlockedIncrement(&m_lRefCount);
+}
+
+/**
+ * \brief Release ref hxcom.h
+ */
+STDMETHODIMP_(ULONG32)
+CUTClassFactory::Release()
+{
+ if (InterlockedDecrement(&m_lRefCount) > 0)
+ {
+ return m_lRefCount;
+ }
+
+ delete this;
+ return 0;
+}
+
+/**
+ * \brief CreateInstance ref hxccf.h
+ */
+STDMETHODIMP
+CUTClassFactory::CreateInstance
+(
+ REFCLSID /*IN*/ rclsid,
+ void** /*OUT*/ ppUnknown
+)
+{
+ if (IsEqualCLSID(rclsid, CLSID_IHXBuffer))
+ {
+ *ppUnknown = (IUnknown*)(IHXBuffer*)(new CUTBufferMD5(this));
+ ((IUnknown*)*ppUnknown)->AddRef();
+ return HXR_OK;
+ }
+ else if (IsEqualCLSID(rclsid, CLSID_IHXPacket))
+ {
+ *ppUnknown = (IUnknown*)(IHXPacket*)(new CUTPacket(this));
+ ((IUnknown*)*ppUnknown)->AddRef();
+ return HXR_OK;
+ }
+ else if (IsEqualCLSID(rclsid, CLSID_IHXValues))
+ {
+ *ppUnknown = (IUnknown*)(IHXValues*)(new CUTValues(this));
+ ((IUnknown*)*ppUnknown)->AddRef();
+ return HXR_OK;
+ }
+ else if (IsEqualCLSID(rclsid, CLSID_IHXRequest))
+ {
+ *ppUnknown = (IUnknown*)(IHXRequest*)(new CHXRequest());
+ ((IUnknown*)*ppUnknown)->AddRef();
+ return HXR_OK;
+ }
+ else if (IsEqualCLSID(rclsid, CLSID_IHXFileSystemManager))
+ {
+ *ppUnknown = (IUnknown*)(IHXFileSystemManager*)(new CUTFSManager(this));
+ ((IUnknown*)*ppUnknown)->AddRef();
+ return HXR_OK;
+ }
+ else if (IsEqualCLSID(rclsid, CLSID_IHXXMLParser))
+ {
+ *ppUnknown = (IUnknown*)(IHXXMLParser *)(new HXExpatXMLParser(m_pContext));
+ ((IUnknown*)*ppUnknown)->AddRef();
+ return HXR_OK;
+ }
+
+ /// \warning if you add new services, please update the doxygen doc in ut_clfact.h
+ *ppUnknown = NULL;
+ return HXR_NOINTERFACE;
+}
+
+/**
+ * \brief CreateInstanceAggregatable ref hxccf.h
+
+ * Not implemented.
+ */
+STDMETHODIMP
+CUTClassFactory::CreateInstanceAggregatable
+(
+ REFCLSID /*IN*/ rclsid,
+ REF(IUnknown *) /*OUT*/ ppUnknown,
+ IUnknown* /*IN*/ pUnkOuter
+)
+{
+ return HXR_NOTIMPL;
+}
_______________________________________________
Server-cvs mailing list
Server-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/server-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic