os/persistentdata/loggingservices/eventlogger/LogServ/inc/LogServViewChangeManager.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/loggingservices/eventlogger/LogServ/inc/LogServViewChangeManager.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,108 @@
1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef __LOGSERVVIEWCHANGEMANAGER_H__
1.20 +#define __LOGSERVVIEWCHANGEMANAGER_H__
1.21 +
1.22 +#include <logcli.h>
1.23 +#include "LogChangeDefinition.h"
1.24 +#include "LogCliServShared.h"
1.25 +#include "LogServBackupObserver.h"
1.26 +#include "LogServDatabaseChangeObserver.h"
1.27 +
1.28 +// Classes referenced
1.29 +class MLogServDatabaseChangeInterface;
1.30 +
1.31 +
1.32 +/////////////////////////////////////////////////////////////////////////////////////////
1.33 +// -----> CLogServViewBase (header)
1.34 +/////////////////////////////////////////////////////////////////////////////////////////
1.35 +/**
1.36 +@internalComponent
1.37 +*/
1.38 +class CLogServViewChangeManager : public CBase
1.39 + {
1.40 +public:
1.41 + static CLogServViewChangeManager* NewL(MLogServDatabaseChangeInterface& aChangeInterface);
1.42 + ~CLogServViewChangeManager();
1.43 +
1.44 +private:
1.45 + CLogServViewChangeManager(MLogServDatabaseChangeInterface& aChangeInterface);
1.46 + void ConstructL();
1.47 +
1.48 +public: // CHANGE TRANSACTION
1.49 +
1.50 + /**
1.51 + *
1.52 + */
1.53 + void ChangeTransactionPrepare();
1.54 +
1.55 + /**
1.56 + *
1.57 + */
1.58 + void ChangeTransactionSubmitL(TLogId aId, TLogDatabaseChangeType aType, TInt aViewIndex);
1.59 +
1.60 + /**
1.61 + *
1.62 + */
1.63 + void ChangeTransactionCommitL();
1.64 +
1.65 +
1.66 +public: // CHANGE DELIVERY
1.67 +
1.68 + /**
1.69 + * Deliver the next available batch of changes. Panics if there
1.70 + * aren't any.
1.71 + */
1.72 + void DeliverChangesL(const RMessage2& aMessage);
1.73 +
1.74 +public: // CHANGE REQUEST MANAGEMENT
1.75 +
1.76 + /**
1.77 + * The client has requested change notifications
1.78 + */
1.79 + void RequestChangeNotifications(const RMessage2& aMessage);
1.80 +
1.81 + /**
1.82 + * The client has cancelled a previous change notification request
1.83 + */
1.84 + void RequestChangeNotificationsCancel();
1.85 +
1.86 +private:
1.87 + void NotifyClient();
1.88 + void CompleteClientChangeMessage(TInt aCompletionCode);
1.89 +
1.90 +private:
1.91 + MLogServDatabaseChangeInterface& iChangeInterface;
1.92 +
1.93 + /**
1.94 + * Completed when the view contents change
1.95 + */
1.96 + RMessagePtr2 iClientSideChangeMessage;
1.97 +
1.98 + /**
1.99 + * A buffer which contain the list of changed items
1.100 + * for the current change transaction
1.101 + */
1.102 + CLogChangeDefinition* iTransientChangeDefinition;
1.103 +
1.104 + /**
1.105 + * All the change 'packages' which are outstanding for this client
1.106 + */
1.107 + RPointerArray<CBufBase> iPendingChanges;
1.108 +
1.109 + };
1.110 +
1.111 +#endif