[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-server-cvs
Subject: [Server-cvs] tools/unittest/services ut_context.cpp, 1.6,
From: dcollins () helixcommunity ! org
Date: 2010-09-18 19:43:07
Message-ID: 201009181942.o8IJgfCi032280 () mailer ! progressive-comp ! com
[Download RAW message or body]
Update of /cvsroot/server/tools/unittest/services
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv7345
Modified Files:
ut_context.cpp ut_fileobject.cpp
Log Message:
fix VC10 build-busters caused by mixed Unix/Windows newlines
Index: ut_context.cpp
===================================================================
RCS file: /cvsroot/server/tools/unittest/services/ut_context.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- ut_context.cpp 1 Aug 2008 18:54:40 -0000 1.6
+++ ut_context.cpp 18 Sep 2010 19:43:05 -0000 1.7
@@ -1,171 +1,171 @@
-/* ***** 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 "hxcomm.h"
-#include "hxerror.h"
-#include "hxstring.h"
-#include "hxbrdcst.h"
-#include "ut_errmsg.h"
-#include "ut_clfact.h"
-#include "ut_fastalloc.h"
-#include "ut_context.h"
-#include "ut_registry.h"
-#include "ut_scheduler.h"
-#include "ut_netsvcs.h"
-#include "commreg.h"
-
-#include "hxheap.h"
-#ifdef _DEBUG
-#undef HX_THIS_FILE
-static char HX_THIS_FILE[] = __FILE__;
-#endif
-
-/**
- * \brief CUTContext Constructor
- */
-CUTContext::CUTContext()
-{
- m_ulRefCount = 0;
-
- m_spClassFactory = (IHXCommonClassFactory*) new CUTClassFactory(this);
-
- m_spErrorMessages = (IHXErrorMessages*) new CUTErrorMessages;
- m_spFastAlloc = (IHXFastAlloc*) new CUTFastAlloc();
- m_spRegistry = (IHXRegistry*) new CUTRegistry(this);
-
- m_spRegistry->QueryInterface(IID_IHXRegistry2, (void**)&m_spRegistry2);
-
- m_spScheduler = static_cast<IHXScheduler*>(new CUTScheduler);
-
- m_spNetServices = static_cast<IHXNetServices*>(new CUTNetServices);
-}
-
-/**
- * \brief CUTContext Destructor
- */
-CUTContext::~CUTContext()
-{
-}
-
-/**
- * \brief Close - release member variable to prevent mutual reference
- */
-void CUTContext::Close()
-{
- m_spClassFactory.Clear();
- m_spErrorMessages.Clear();
- m_spRegistry.Clear();
- m_spRegistry2.Clear();
- m_spScheduler.Clear();
-}
-
-/**
- * \brief QueryInterface ref hxcom.h
- */
-STDMETHODIMP
-CUTContext::QueryInterface(REFIID riid, void** ppvObj)
-{
- if (IsEqualIID(riid, IID_IUnknown))
- {
- AddRef();
- *ppvObj = (IUnknown*)this;
- return HXR_OK;
- }
- else if (IsEqualIID(riid, IID_IHXCommonClassFactory))
- {
- m_spClassFactory.AsPtr((IHXCommonClassFactory**)ppvObj);
- return HXR_OK;
- }
- else if (IsEqualIID(riid, IID_IHXErrorMessages))
- {
- m_spErrorMessages.AsPtr((IHXErrorMessages**)ppvObj);
- return HXR_OK;
- }
- else if (IsEqualIID(riid, IID_IHXRegistry))
- {
- m_spRegistry.AsPtr((IHXRegistry**)ppvObj);
- return HXR_OK;
- }
- else if (IsEqualIID(riid, IID_IHXRegistry2))
- {
- m_spRegistry2.AsPtr((IHXRegistry2**)ppvObj);
- return HXR_OK;
- }
- else if (IsEqualIID(riid, IID_IHXScheduler))
- {
- m_spScheduler.AsPtr((IHXScheduler**)ppvObj);
- return HXR_OK;
- }
- else if (IsEqualIID(riid, IID_IHXNetServices))
- {
- m_spNetServices.AsPtr((IHXNetServices**)ppvObj);
- return HXR_OK;
- }else if (IsEqualIID(riid, IID_IHXFastAlloc))
- {
- m_spFastAlloc.AsPtr((IHXFastAlloc**)ppvObj);
- return HXR_OK;
- }
- /// \warning if you add new services, please update the doxygen doc in ut_context.h
- *ppvObj = NULL;
- return HXR_NOINTERFACE;
-}
-
-/**
- * \brief AddRef ref hxcom.h
- */
-STDMETHODIMP_(ULONG32)
-CUTContext::AddRef()
-{
- return InterlockedIncrement(&m_ulRefCount);
-}
-
-/**
- * \brief Release ref hxcom.h
- */
-STDMETHODIMP_(ULONG32)
-CUTContext::Release()
-{
- if (InterlockedDecrement(&m_ulRefCount) > 0)
- {
- return m_ulRefCount;
- }
- delete this;
- return 0;
-}
+/* ***** 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 "hxcomm.h"
+#include "hxerror.h"
+#include "hxstring.h"
+#include "hxbrdcst.h"
+#include "ut_errmsg.h"
+#include "ut_clfact.h"
+#include "ut_fastalloc.h"
+#include "ut_context.h"
+#include "ut_registry.h"
+#include "ut_scheduler.h"
+#include "ut_netsvcs.h"
+#include "commreg.h"
+
+#include "hxheap.h"
+#ifdef _DEBUG
+#undef HX_THIS_FILE
+static char HX_THIS_FILE[] = __FILE__;
+#endif
+
+/**
+ * \brief CUTContext Constructor
+ */
+CUTContext::CUTContext()
+{
+ m_ulRefCount = 0;
+
+ m_spClassFactory = (IHXCommonClassFactory*) new CUTClassFactory(this);
+
+ m_spErrorMessages = (IHXErrorMessages*) new CUTErrorMessages;
+ m_spFastAlloc = (IHXFastAlloc*) new CUTFastAlloc();
+ m_spRegistry = (IHXRegistry*) new CUTRegistry(this);
+
+ m_spRegistry->QueryInterface(IID_IHXRegistry2, (void**)&m_spRegistry2);
+
+ m_spScheduler = static_cast<IHXScheduler*>(new CUTScheduler);
+
+ m_spNetServices = static_cast<IHXNetServices*>(new CUTNetServices);
+}
+
+/**
+ * \brief CUTContext Destructor
+ */
+CUTContext::~CUTContext()
+{
+}
+
+/**
+ * \brief Close - release member variable to prevent mutual reference
+ */
+void CUTContext::Close()
+{
+ m_spClassFactory.Clear();
+ m_spErrorMessages.Clear();
+ m_spRegistry.Clear();
+ m_spRegistry2.Clear();
+ m_spScheduler.Clear();
+}
+
+/**
+ * \brief QueryInterface ref hxcom.h
+ */
+STDMETHODIMP
+CUTContext::QueryInterface(REFIID riid, void** ppvObj)
+{
+ if (IsEqualIID(riid, IID_IUnknown))
+ {
+ AddRef();
+ *ppvObj = (IUnknown*)this;
+ return HXR_OK;
+ }
+ else if (IsEqualIID(riid, IID_IHXCommonClassFactory))
+ {
+ m_spClassFactory.AsPtr((IHXCommonClassFactory**)ppvObj);
+ return HXR_OK;
+ }
+ else if (IsEqualIID(riid, IID_IHXErrorMessages))
+ {
+ m_spErrorMessages.AsPtr((IHXErrorMessages**)ppvObj);
+ return HXR_OK;
+ }
+ else if (IsEqualIID(riid, IID_IHXRegistry))
+ {
+ m_spRegistry.AsPtr((IHXRegistry**)ppvObj);
+ return HXR_OK;
+ }
+ else if (IsEqualIID(riid, IID_IHXRegistry2))
+ {
+ m_spRegistry2.AsPtr((IHXRegistry2**)ppvObj);
+ return HXR_OK;
+ }
+ else if (IsEqualIID(riid, IID_IHXScheduler))
+ {
+ m_spScheduler.AsPtr((IHXScheduler**)ppvObj);
+ return HXR_OK;
+ }
+ else if (IsEqualIID(riid, IID_IHXNetServices))
+ {
+ m_spNetServices.AsPtr((IHXNetServices**)ppvObj);
+ return HXR_OK;
+ }else if (IsEqualIID(riid, IID_IHXFastAlloc))
+ {
+ m_spFastAlloc.AsPtr((IHXFastAlloc**)ppvObj);
+ return HXR_OK;
+ }
+ /// \warning if you add new services, please update the doxygen doc in ut_context.h
+ *ppvObj = NULL;
+ return HXR_NOINTERFACE;
+}
+
+/**
+ * \brief AddRef ref hxcom.h
+ */
+STDMETHODIMP_(ULONG32)
+CUTContext::AddRef()
+{
+ return InterlockedIncrement(&m_ulRefCount);
+}
+
+/**
+ * \brief Release ref hxcom.h
+ */
+STDMETHODIMP_(ULONG32)
+CUTContext::Release()
+{
+ if (InterlockedDecrement(&m_ulRefCount) > 0)
+ {
+ return m_ulRefCount;
+ }
+ delete this;
+ return 0;
+}
Index: ut_fileobject.cpp
===================================================================
RCS file: /cvsroot/server/tools/unittest/services/ut_fileobject.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ut_fileobject.cpp 11 Sep 2008 01:11:06 -0000 1.2
+++ ut_fileobject.cpp 18 Sep 2010 19:43:05 -0000 1.3
@@ -1,905 +1,905 @@
-/* ***** 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
[...1779 lines suppressed...]
+ char* pLastSeparator = strrchr(m_BasePath,OS_PATH_SEPARATOR_CHAR);
+ *pLastSeparator = '\0';
+
+ pFileObject = new CMyExampleFileObject(m_pClassFactory,m_BasePath,NULL);
+
+ if (!pFileObject)
+ {
+ return HXR_OUTOFMEMORY;
+ }
+
+ lReturnVal = pFileObject->QueryInterface(IID_IUnknown,
+ (void**)&pUnknown);
+
+ response->FileObjectReady(lReturnVal == HXR_OK ?
+ HXR_OK : HXR_FAILED,
+ pUnknown);
+ HX_RELEASE(pUnknown);
+
+ return lReturnVal;
+}
_______________________________________________
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