sl@0: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef __LOGSERVVIEWCHANGEMANAGER_H__ sl@0: #define __LOGSERVVIEWCHANGEMANAGER_H__ sl@0: sl@0: #include sl@0: #include "LogChangeDefinition.h" sl@0: #include "LogCliServShared.h" sl@0: #include "LogServBackupObserver.h" sl@0: #include "LogServDatabaseChangeObserver.h" sl@0: sl@0: // Classes referenced sl@0: class MLogServDatabaseChangeInterface; sl@0: sl@0: sl@0: ///////////////////////////////////////////////////////////////////////////////////////// sl@0: // -----> CLogServViewBase (header) sl@0: ///////////////////////////////////////////////////////////////////////////////////////// sl@0: /** sl@0: @internalComponent sl@0: */ sl@0: class CLogServViewChangeManager : public CBase sl@0: { sl@0: public: sl@0: static CLogServViewChangeManager* NewL(MLogServDatabaseChangeInterface& aChangeInterface); sl@0: ~CLogServViewChangeManager(); sl@0: sl@0: private: sl@0: CLogServViewChangeManager(MLogServDatabaseChangeInterface& aChangeInterface); sl@0: void ConstructL(); sl@0: sl@0: public: // CHANGE TRANSACTION sl@0: sl@0: /** sl@0: * sl@0: */ sl@0: void ChangeTransactionPrepare(); sl@0: sl@0: /** sl@0: * sl@0: */ sl@0: void ChangeTransactionSubmitL(TLogId aId, TLogDatabaseChangeType aType, TInt aViewIndex); sl@0: sl@0: /** sl@0: * sl@0: */ sl@0: void ChangeTransactionCommitL(); sl@0: sl@0: sl@0: public: // CHANGE DELIVERY sl@0: sl@0: /** sl@0: * Deliver the next available batch of changes. Panics if there sl@0: * aren't any. sl@0: */ sl@0: void DeliverChangesL(const RMessage2& aMessage); sl@0: sl@0: public: // CHANGE REQUEST MANAGEMENT sl@0: sl@0: /** sl@0: * The client has requested change notifications sl@0: */ sl@0: void RequestChangeNotifications(const RMessage2& aMessage); sl@0: sl@0: /** sl@0: * The client has cancelled a previous change notification request sl@0: */ sl@0: void RequestChangeNotificationsCancel(); sl@0: sl@0: private: sl@0: void NotifyClient(); sl@0: void CompleteClientChangeMessage(TInt aCompletionCode); sl@0: sl@0: private: sl@0: MLogServDatabaseChangeInterface& iChangeInterface; sl@0: sl@0: /** sl@0: * Completed when the view contents change sl@0: */ sl@0: RMessagePtr2 iClientSideChangeMessage; sl@0: sl@0: /** sl@0: * A buffer which contain the list of changed items sl@0: * for the current change transaction sl@0: */ sl@0: CLogChangeDefinition* iTransientChangeDefinition; sl@0: sl@0: /** sl@0: * All the change 'packages' which are outstanding for this client sl@0: */ sl@0: RPointerArray iPendingChanges; sl@0: sl@0: }; sl@0: sl@0: #endif