diff -r 000000000000 -r b16258d2340f applayerprotocols/httpexamples/uaprof/examplecpimanager/examplecpimanager.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/applayerprotocols/httpexamples/uaprof/examplecpimanager/examplecpimanager.h Tue Feb 02 01:09:52 2010 +0200 @@ -0,0 +1,90 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// cexamplecpimanager.h +// +// + +#ifndef __CEXAMPLECPIMANAGER_H__ +#define __CEXAMPLECPIMANAGER_H__ + +// System Includes +#include +#include + + +/** CExampleCpiManager is an example implementation of a CPI Manager class that + provides the MHTTPCpiManager interface +*/ +class CExampleCpiManager : public CBase, public MHTTPCpiManager + { +public: // methods + + IMPORT_C static CExampleCpiManager* NewL(RStringPool aStringPool); + + IMPORT_C ~CExampleCpiManager(); + + /** Enumeration defining the two different types of CPI information + */ + enum TCpiType + { + EProfile, + EProfileDiff + }; + + +public: // methods from MHTTPCpiManager + + IMPORT_C virtual RPointerArray& GetProfiles(); + + IMPORT_C virtual RPointerArray& GetProfileDiffs(); + + +private: // methods + + CExampleCpiManager(RStringPool aStringPool); + + void ConstructL(); + + void FindCpiFilesL(); + + void DiscoverProfilesL(); + + void BuildProfilesL(TEntry& aEntry, CExampleCpiManager::TCpiType aCpiType); + + +private: // attributes + + /** String pool to be used + */ + RStringPool iStringPool; + + /** Array of CPI files + */ + RPointerArray iCpiFileList; + + /** Profile table + */ + RPointerArray iProfileData; + + /** Profile-Diff table + */ + RPointerArray iProfileDiffData; + + /** Handle to the file server + */ + RFs iFs; + }; + + +#endif //__CEXAMPLECPIMANAGER_H__