Update contrib.
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __LOGSERVOPERATIONBASE_H__
17 #define __LOGSERVOPERATIONBASE_H__
20 #include "LogServDefs.h"
21 #include "LogCliServShared.h"
22 #include "logpackage.h"
25 class MLogServTaskInterface;
26 class MLogServOperationManager;
29 Base class for LogEng server operations.
30 Maintains a copy of the original RMessage2 object.
32 @see MLogServOperationManager
33 @see MLogServTaskInterface
37 class CLogServOperationBase : public CBase
40 enum TCompletionStatus
42 EOperationComplete = 0,
43 EOperationCompleteWaitForClient
47 CLogServOperationBase(MLogServTaskInterface& aTaskInterface,
48 MLogServOperationManager& aOperationManager,
49 const RMessage2& aMessage,
50 CLogPackage& aPackage,
51 const TLogClientServerData& aClientServerData,
52 TLogServSessionId aSessionId);
55 ~CLogServOperationBase();
57 public: // FROM CLogServOperationBase
58 virtual void StartL(TRequestStatus& aStatus)=0;
59 virtual void WriteL(const RMessage2& aMessage);
60 virtual TCompletionStatus CompleteProcessingL(TInt aFinalCompletionCode);
63 void Complete(TInt aCompletionCode);
64 inline const TLogClientServerData& ClientServerData() const;
66 inline TBool HaveMessagePointer() const;
67 inline void ClearMessagePointer();
68 inline TLogOperationId Id() const;
69 inline CLogPackage& Package();
70 inline MLogServTaskInterface& TaskInterface() const;
71 inline MLogServOperationManager& OperationManager() const;
72 inline TLogOperationType Type() const;
73 inline TLogServSessionId SessionId();
74 static TUint QueueOffset();
75 inline void SetMessageCompletion(const TBool aMessageCompletion);
78 inline RMessage2& Message();
81 MLogServTaskInterface& iTaskInterface;
82 MLogServOperationManager& iOperationManager;
83 CLogPackage& iPackage;
85 TLogClientServerData iClientServerData;
86 TLogServSessionId iSessionId;
87 TSglQueLink iServerLink;
88 TBool iMessageCompletion;
92 #include "LogServOperationBase.inl"