[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-server-cvs
Subject: [Server-cvs] tools/unittest/services/pub ut_fsmanager.h, NONE,
From: srao () helixcommunity ! org
Date: 2008-08-01 22:05:03
Message-ID: 200808012207.m71M7lnK015307 () mailer ! progressive-comp ! com
[Download RAW message or body]
Update of /cvsroot/server/tools/unittest/services/pub
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv3126
Added Files:
ut_fsmanager.h ut_server_request.h
Log Message:
Synopsis
========
PhaseII: Implement Unit Test frame work for PlaylistManager and test the phase-1 \
functionality using frame work
Branches: SERVER_12_1_RN, SERVER_CURRENT_RN Suggested Reviewer: Jamie, JJ
Description
===========
1. Added new target server-restricted_dataype_playlist_unittest to build system to \
down load PlaylistManager unit test code and related modules. (attached \
build_diff.txt)
2. Modified frame work to (ut_fw_diff.txt, playlist_piids.h)
1. Support Playlist Manager objects
2. xalan helper to support empty strings.
3. smil is only working with expat parser, so modified UT class factory to generate \
expat parser instead old XML parser. 4. Added Mock classes for fs-manager and \
server-request.
3. Fixed bugs found while doing unit testing and added couple of methods to process \
other parameters (plmgr_diff.txt) 4. PlaylistManager unit test frame work files added \
(which includes new source code and test cases in xml format) 5. Modified smil parser \
header file to make parseClockValue() method public. This method is needed in \
Playlist Manager to parse src-duration.
Files Affected
==============
/server-restricted/build/BIF/SERVER_12_1_COMMON_restricted.bif
/home/source/build/BIF/SERVER_12_1-internal.bif
/server/tools/unittest/framework/ut_testdriver.h
/server/tools/unittest/services/Umakefil
/server/tools/unittest/services/pub/ut_fsmanager.h [new file] \
/server/tools/unittest/services/pub/ut_server_request.h [new file] \
/server/tools/unittest/services/ut_fsmanager.cpp [new file] \
/server/tools/unittest/services/ut_server_request.cpp [new file]
/server/tools/unittest/services/ut_clfact.cpp
/server/tools/unittest/services/ut_context.cpp
/server/tools/unittest/services/pub/ut_clfact.h
/server/tools/unittest/utils/Umakefil
/server/tools/unittest/utils/iids.cpp
/server/tools/unittest/xalanhelper/ut_xalanhelper.cpp
/server/tools/unittest/utils/pub/playlist_piids.h [new file]
/server-restricted/datatype/playlist/unittest/plmgr_test_driver.cpp [new file] \
/server-restricted/datatype/playlist/unittest/plmgr_test_driver.h [new file] \
/server-restricted/datatype/playlist/unittest/ut_main.cpp [new file] \
/server-restricted/datatype/playlist/unittest/Umakefil [new file] \
/server-restricted/datatype/playlist/unittest/UnitTestConfig.xsd [new file] \
/server-restricted/datatype/playlist/unittest/ut_plmgr.xml [new file] \
/server-restricted/datatype/playlist/plmgr.cpp \
/server-restricted/datatype/playlist/pub/plmgr.h
/server/include/hxplaylist.h
/datatype/smil/renderer/smil2/pub/smlparse.h
Testing Performed
=================
Executed 23 test cases (written in file ut_plmgr.xml) and found all tests are passing
Build verified: win32-i386-vc7
Platforms tested: win32-i386-vc7
QA Hints
===============
None
--- NEW FILE: ut_fsmanager.h ---
/* ***** BEGIN LICENSE BLOCK *****
*
* Portions Copyright (c) 1995-2008 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 ***** */
#ifndef _UT_FSMANAGER_H_
#define _UT_FSMANAGER_H_
#include "hxcom.h"
#include "hxfiles.h"
#include "hxcache.h"
#include "ihxurlparser.h"
class URL;
class CUTFSManager;
class CUTFSManager : public IHXFileSystemManager
{
public:
CUTFSManager(IHXCommonClassFactory *pCommonClassFactory);
STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj);
STDMETHOD_(ULONG32, AddRef) (THIS);
STDMETHOD_(ULONG32, Release)(THIS);
STDMETHOD(Init) (THIS_
IHXFileSystemManagerResponse* /*IN*/ pFileManagerResponse
);
STDMETHOD(GetFileObject) (THIS_
IHXRequest* pRequest,
IHXAuthenticator* pAuth);
STDMETHOD(DoesExistDone) (THIS_
BOOL bExists);
STDMETHOD(FileObjectReady) (THIS_
HX_RESULT status,
IUnknown* pUnknown);
STDMETHOD(GetNewFileObject) (THIS_
IHXRequest* pRequest,
IHXAuthenticator* pAuth);
STDMETHOD(GetRelativeFileObject) (THIS_
IUnknown*,
const char*);
STDMETHOD(GetDirObjectFromURL) (THIS_
const char* pURL);
private:
~CUTFSManager();
HX_RESULT FileReadyHook(HX_RESULT result, IUnknown* pFileObject);
ULONG32 m_ulRefCount;
IHXFileSystemManagerResponse* m_pResponse;
IHXURL* m_url;
IUnknown* m_file_object;
IHXFileExists* m_file_exists;
IHXGetFileFromSamePool* m_pool;
BOOL m_bHandleRedirect;
BOOL m_bCollectReadStats;
IHXValues* m_last_options;
IHXValues* m_first_options;
CHXString m_plusPathLeft;
CHXString m_plusPathRight;
UINT32 m_ulHandlingPlusUrl;
/* These members added to hold data between asynchronous cdist calls */
IHXRequest* m_pRequest;
IUnknown* m_pFileObject;
HX_RESULT m_iResult;
BOOL m_bCheckingCache;
BOOL m_bIsCDistEligible;
BOOL m_bFound;
BOOL m_bEnableAMPDebug;
IUnknown* m_pContext;
IHXCommonClassFactory* m_pCommonClassFactory;
};
#endif
--- NEW FILE: ut_server_request.h ---
/* ***** BEGIN LICENSE BLOCK *****
*
* Portions Copyright (c) 1995-2008 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 ***** */
#ifndef _UT_SERVER_REQUEST_H_
#define _UT_SERVER_REQUEST_H_
#include "hxtypes.h"
#include "hxcom.h"
#include "hxfiles.h"
#include "ihxurlparser.h"
typedef enum
{
FS_HEADERS,
FF_HEADERS
} REQUEST_HEADER_TYPE;
class CUTServerRequest
{
public:
CUTServerRequest();
virtual ~CUTServerRequest();
CUTServerRequest* Clone(IHXCommonClassFactory* pCCF);
/*
* The IHXRequest interface is implemented by the CUTServerRequestWrapper
*/
STDMETHOD_(ULONG32,AddRef) (THIS);
STDMETHOD_(ULONG32,Release) (THIS);
STDMETHOD(SetRequestHeaders) (THIS_
REQUEST_HEADER_TYPE HeaderType,
IHXValues* pRequestHeaders);
STDMETHOD(GetRequestHeaders) (THIS_
REQUEST_HEADER_TYPE HeaderType,
REF(IHXValues*) pRequestHeaders);
STDMETHOD(SetResponseHeaders) (THIS_
REQUEST_HEADER_TYPE HeaderType,
IHXValues* pResponseHeaders);
STDMETHOD(GetResponseHeaders) (THIS_
REQUEST_HEADER_TYPE HeaderType,
REF(IHXValues*) pResponseHeaders);
STDMETHOD(SetURL) (THIS_
const char* pURL);
STDMETHOD(GetURL) (THIS_
REF(const char*) pURL);
/************************************************************************
* Method:
* IHXRequest::SetUserContext
* Purpose:
* Sets the Authenticated users Context.
*/
STDMETHOD(SetUserContext)
(
IUnknown* pIUnknownNewContext
);
/************************************************************************
* Method:
* IHXRequest::GetUserContext
* Purpose:
* Gets the Authenticated users Context.
*/
STDMETHOD(GetUserContext)
(
REF(IUnknown*) pIUnknownCurrentContext
);
/************************************************************************
* Method:
* IHXRequest::SetRequester
* Purpose:
* Sets the Object that made the request.
*/
STDMETHOD(SetRequester)
(
IUnknown* pIUnknownNewRequester
);
/************************************************************************
* Method:
* IHXRequest::GetRequester
* Purpose:
* Gets the Object that made the request.
*/
STDMETHOD(GetRequester)
(
REF(IUnknown*) pIUnknownCurrentRequester
);
/************************************************************************
* Method:
* IHXURLParser ::GetHXURL
* Purpose:
* Gets the IHXURL object
*/
STDMETHOD(GetHXURL) (THIS_
REF(IHXURL*) pURL);
private:
IHXValues* _GetRequestHeaders (REQUEST_HEADER_TYPE HeaderType);
IHXValues* _GetResponseHeaders (REQUEST_HEADER_TYPE HeaderType);
LONG32 m_lRefCount;
IHXURL* m_pURL;
IHXValues* m_pFSRequestHeaders;
IHXValues* m_pFSResponseHeaders;
IHXValues* m_pFFRequestHeaders;
IHXValues* m_pFFResponseHeaders;
IUnknown* m_pIUnknownUserContext;
IUnknown* m_pIUnknownRequester;
};
class CUTServerRequestWrapper
: public IHXRequest
, public IHXRequestContext
, public IHXURLParser
{
public:
CUTServerRequestWrapper(REQUEST_HEADER_TYPE pHeaderType,
CUTServerRequest *pServerRequest);
~CUTServerRequestWrapper();
HX_RESULT RemoveRequest(void);
HX_RESULT ReplaceRequest(CUTServerRequest* pRequest);
STDMETHOD(QueryInterface) (THIS_
REFIID riid,
void** ppvObj);
STDMETHOD_(ULONG32,AddRef) (THIS);
STDMETHOD_(ULONG32,Release) (THIS);
STDMETHOD(SetRequestHeaders) (THIS_
IHXValues* pRequestHeaders);
STDMETHOD(GetRequestHeaders) (THIS_
REF(IHXValues*) pRequestHeaders);
STDMETHOD(SetResponseHeaders) (THIS_
IHXValues* pResponseHeaders);
STDMETHOD(GetResponseHeaders) (THIS_
REF(IHXValues*) pResponseHeaders);
STDMETHOD(SetURL) (THIS_
const char* pURL);
STDMETHOD(GetURL) (THIS_
REF(const char*) pURL);
/************************************************************************
* Method:
* IHXRequest::SetUserContext
* Purpose:
* Sets the Authenticated users Context.
*/
STDMETHOD(SetUserContext)
(
IUnknown* pIUnknownNewContext
);
/************************************************************************
* Method:
* IHXRequest::GetUserContext
* Purpose:
* Gets the Authenticated users Context.
*/
STDMETHOD(GetUserContext)
(
REF(IUnknown*) pIUnknownCurrentContext
);
/************************************************************************
* Method:
* IHXRequest::SetRequester
* Purpose:
* Sets the Object that made the request.
*/
STDMETHOD(SetRequester)
(
IUnknown* pIUnknownNewRequester
);
/************************************************************************
* Method:
* IHXRequest::GetRequester
* Purpose:
* Gets the Object that made the request.
*/
STDMETHOD(GetRequester)
(
REF(IUnknown*) pIUnknownCurrentRequester
);
/************************************************************************
* Method:
* IHXURLParser ::GetHXURL
* Purpose:
* Gets the IHXURL object
*/
STDMETHOD(GetHXURL) (THIS_
REF(IHXURL*) pURL);
private:
LONG32 m_lRefCount;
REQUEST_HEADER_TYPE m_HeaderType;
CUTServerRequest* m_pServerRequest;
};
inline IHXValues*
CUTServerRequest::_GetRequestHeaders(REQUEST_HEADER_TYPE HeaderType)
{
return (HeaderType == FS_HEADERS) ? m_pFSRequestHeaders :
m_pFFRequestHeaders;
}
inline IHXValues*
CUTServerRequest::_GetResponseHeaders(REQUEST_HEADER_TYPE HeaderType)
{
return (HeaderType == FS_HEADERS) ? m_pFSResponseHeaders :
m_pFFResponseHeaders;
}
#endif // _UT_SERVER_REQUEST_H_
_______________________________________________
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