diff -r 000000000000 -r bde4ae8d615e os/persistentdata/loggingservices/eventlogger/LogServ/inc/LogServOperationBase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/os/persistentdata/loggingservices/eventlogger/LogServ/inc/LogServOperationBase.h Fri Jun 15 03:10:57 2012 +0200 @@ -0,0 +1,94 @@ +// Copyright (c) 2002-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: +// + +#ifndef __LOGSERVOPERATIONBASE_H__ +#define __LOGSERVOPERATIONBASE_H__ + +#include +#include "LogServDefs.h" +#include "LogCliServShared.h" +#include "logpackage.h" + +// Classes referenced +class MLogServTaskInterface; +class MLogServOperationManager; + +/** +Base class for LogEng server operations. +Maintains a copy of the original RMessage2 object. + +@see MLogServOperationManager +@see MLogServTaskInterface + +@internalComponent +*/ +class CLogServOperationBase : public CBase + { +public: + enum TCompletionStatus + { + EOperationComplete = 0, + EOperationCompleteWaitForClient + }; + +protected: + CLogServOperationBase(MLogServTaskInterface& aTaskInterface, + MLogServOperationManager& aOperationManager, + const RMessage2& aMessage, + CLogPackage& aPackage, + const TLogClientServerData& aClientServerData, + TLogServSessionId aSessionId); + +public: + ~CLogServOperationBase(); + +public: // FROM CLogServOperationBase + virtual void StartL(TRequestStatus& aStatus)=0; + virtual void WriteL(const RMessage2& aMessage); + virtual TCompletionStatus CompleteProcessingL(TInt aFinalCompletionCode); + +public: + void Complete(TInt aCompletionCode); + inline const TLogClientServerData& ClientServerData() const; + inline void Cancel(); + inline TBool HaveMessagePointer() const; + inline void ClearMessagePointer(); + inline TLogOperationId Id() const; + inline CLogPackage& Package(); + inline MLogServTaskInterface& TaskInterface() const; + inline MLogServOperationManager& OperationManager() const; + inline TLogOperationType Type() const; + inline TLogServSessionId SessionId(); + static TUint QueueOffset(); + inline void SetMessageCompletion(const TBool aMessageCompletion); + +protected: + inline RMessage2& Message(); + +private: + MLogServTaskInterface& iTaskInterface; + MLogServOperationManager& iOperationManager; + CLogPackage& iPackage; + RMessage2 iMessage; + TLogClientServerData iClientServerData; + TLogServSessionId iSessionId; + TSglQueLink iServerLink; + TBool iMessageCompletion; + }; + + +#include "LogServOperationBase.inl" + +#endif