sl@0
|
1 |
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
#ifndef __LOGSERVVIEWCHANGEMANAGER_H__
|
sl@0
|
17 |
#define __LOGSERVVIEWCHANGEMANAGER_H__
|
sl@0
|
18 |
|
sl@0
|
19 |
#include <logcli.h>
|
sl@0
|
20 |
#include "LogChangeDefinition.h"
|
sl@0
|
21 |
#include "LogCliServShared.h"
|
sl@0
|
22 |
#include "LogServBackupObserver.h"
|
sl@0
|
23 |
#include "LogServDatabaseChangeObserver.h"
|
sl@0
|
24 |
|
sl@0
|
25 |
// Classes referenced
|
sl@0
|
26 |
class MLogServDatabaseChangeInterface;
|
sl@0
|
27 |
|
sl@0
|
28 |
|
sl@0
|
29 |
/////////////////////////////////////////////////////////////////////////////////////////
|
sl@0
|
30 |
// -----> CLogServViewBase (header)
|
sl@0
|
31 |
/////////////////////////////////////////////////////////////////////////////////////////
|
sl@0
|
32 |
/**
|
sl@0
|
33 |
@internalComponent
|
sl@0
|
34 |
*/
|
sl@0
|
35 |
class CLogServViewChangeManager : public CBase
|
sl@0
|
36 |
{
|
sl@0
|
37 |
public:
|
sl@0
|
38 |
static CLogServViewChangeManager* NewL(MLogServDatabaseChangeInterface& aChangeInterface);
|
sl@0
|
39 |
~CLogServViewChangeManager();
|
sl@0
|
40 |
|
sl@0
|
41 |
private:
|
sl@0
|
42 |
CLogServViewChangeManager(MLogServDatabaseChangeInterface& aChangeInterface);
|
sl@0
|
43 |
void ConstructL();
|
sl@0
|
44 |
|
sl@0
|
45 |
public: // CHANGE TRANSACTION
|
sl@0
|
46 |
|
sl@0
|
47 |
/**
|
sl@0
|
48 |
*
|
sl@0
|
49 |
*/
|
sl@0
|
50 |
void ChangeTransactionPrepare();
|
sl@0
|
51 |
|
sl@0
|
52 |
/**
|
sl@0
|
53 |
*
|
sl@0
|
54 |
*/
|
sl@0
|
55 |
void ChangeTransactionSubmitL(TLogId aId, TLogDatabaseChangeType aType, TInt aViewIndex);
|
sl@0
|
56 |
|
sl@0
|
57 |
/**
|
sl@0
|
58 |
*
|
sl@0
|
59 |
*/
|
sl@0
|
60 |
void ChangeTransactionCommitL();
|
sl@0
|
61 |
|
sl@0
|
62 |
|
sl@0
|
63 |
public: // CHANGE DELIVERY
|
sl@0
|
64 |
|
sl@0
|
65 |
/**
|
sl@0
|
66 |
* Deliver the next available batch of changes. Panics if there
|
sl@0
|
67 |
* aren't any.
|
sl@0
|
68 |
*/
|
sl@0
|
69 |
void DeliverChangesL(const RMessage2& aMessage);
|
sl@0
|
70 |
|
sl@0
|
71 |
public: // CHANGE REQUEST MANAGEMENT
|
sl@0
|
72 |
|
sl@0
|
73 |
/**
|
sl@0
|
74 |
* The client has requested change notifications
|
sl@0
|
75 |
*/
|
sl@0
|
76 |
void RequestChangeNotifications(const RMessage2& aMessage);
|
sl@0
|
77 |
|
sl@0
|
78 |
/**
|
sl@0
|
79 |
* The client has cancelled a previous change notification request
|
sl@0
|
80 |
*/
|
sl@0
|
81 |
void RequestChangeNotificationsCancel();
|
sl@0
|
82 |
|
sl@0
|
83 |
private:
|
sl@0
|
84 |
void NotifyClient();
|
sl@0
|
85 |
void CompleteClientChangeMessage(TInt aCompletionCode);
|
sl@0
|
86 |
|
sl@0
|
87 |
private:
|
sl@0
|
88 |
MLogServDatabaseChangeInterface& iChangeInterface;
|
sl@0
|
89 |
|
sl@0
|
90 |
/**
|
sl@0
|
91 |
* Completed when the view contents change
|
sl@0
|
92 |
*/
|
sl@0
|
93 |
RMessagePtr2 iClientSideChangeMessage;
|
sl@0
|
94 |
|
sl@0
|
95 |
/**
|
sl@0
|
96 |
* A buffer which contain the list of changed items
|
sl@0
|
97 |
* for the current change transaction
|
sl@0
|
98 |
*/
|
sl@0
|
99 |
CLogChangeDefinition* iTransientChangeDefinition;
|
sl@0
|
100 |
|
sl@0
|
101 |
/**
|
sl@0
|
102 |
* All the change 'packages' which are outstanding for this client
|
sl@0
|
103 |
*/
|
sl@0
|
104 |
RPointerArray<CBufBase> iPendingChanges;
|
sl@0
|
105 |
|
sl@0
|
106 |
};
|
sl@0
|
107 |
|
sl@0
|
108 |
#endif
|