1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
/*
* Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
* Contact: http://www.qt-project.org/legal
* 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:
*
*/
/**
@file
@internalComponent
@released
*/
#include "clplgenericproxy.h"
CLplGenericProxy::CLplGenericProxy(MLplPersistenceBroker& aBroker, MLplTransactionManager& aTranMan)
:
iBroker(aBroker),
iTranMan(aTranMan)
{
}
/**
Store a new Contact.
*/
TContactItemId CLplGenericProxy::CreateL(CContactItem& aItem, TUint aSessionId)
{
#if defined(__PROFILE_DEBUG__)
RDebug::Print(_L("[CNTMODEL] MTD: CLplGenericProxy::CreateL"));
#endif
return iBroker.CreateL(aItem, aSessionId);
}
/**
Read an existing Contact (or parts of it as specified by the view definition).
*/
CContactItem* CLplGenericProxy::ReadLC(TContactItemId aItemId, const CContactItemViewDef& aView, TInt aInfoToRead, TUint aSessionId, TBool aIccOpenCheck) const
{
return iBroker.ReadLC(aItemId, aView, aInfoToRead, aSessionId, aIccOpenCheck);
}
/**
Update an existing Contact (or parts of it as specified by the view definition).
*/
void CLplGenericProxy::UpdateL(CContactItem& aItem, TUint aSessionId)
{
iBroker.UpdateL(aItem, aSessionId);
}
/**
Delete a Contact.
*/
CContactItem* CLplGenericProxy::DeleteLC(TContactItemId aItemId, TUint aSessionId, TCntSendEventAction aEventType)
{
return iBroker.DeleteLC(aItemId, aSessionId, aEventType);
}
/**
Change the type of an existing Contact.
*/
void CLplGenericProxy::ChangeTypeL(TContactItemId aItemId, TUid aNewType)
{
iBroker.ChangeTypeL(aItemId, aNewType);
}
/**
Start a new transaction.
*/
void CLplGenericProxy::StartTransactionL()
{
iTranMan.StartTransactionL();
}
/**
Commit the current transaction.
*/
void CLplGenericProxy::CommitCurrentTransactionL(TUint aSessionId)
{
iTranMan.CommitCurrentTransactionL(aSessionId);
}
/**
Rollback the current transaction.
*/
void CLplGenericProxy::RollbackCurrentTransactionL(TUint aSessionId)
{
iTranMan.RollbackCurrentTransactionL(aSessionId);
}
/**
Determine if a transaction is currently in progress.
*/
TBool CLplGenericProxy::IsTransactionActive() const
{
return iTranMan.IsTransactionActive();
}
/** Does nothing since the analyser proxy sets the connection ID.
*/
void CLplGenericProxy::SetConnectionId(TInt /*aConnectionId*/)
{
}
|