author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 14 Sep 2010 20:55:10 +0300 | |
branch | RCL_3 |
changeset 26 | 3e6957da2ff8 |
parent 25 | 4f0867e42d62 |
permissions | -rw-r--r-- |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: DS contacts dataprovider |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
// INCLUDE FILES |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
#include <barsc.h> |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
#include <bautils.h> |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
#include <e32base.h> |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
#include <s32strm.h> |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
#include <e32cmn.h> |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
#include <e32des16.h> |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
#include <s32mem.h> |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
#include <implementationproxy.h> |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
#include <vtoken.h> |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
29 |
#include <sysutil.h> |
26
3e6957da2ff8
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
30 |
#include <nsmlcontactsdatastoreformat_1_1_2.rsg> |
3e6957da2ff8
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
31 |
#include <nsmlcontactsdatastoreformat_1_2.rsg> |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
#include <data_caging_path_literals.hrh> |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
#include <SmlDataFormat.h> |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
#include <SmlDataProvider.h> |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
#include <e32property.h> |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
#include <DataSyncInternalPSKeys.h> |
25 | 37 |
#include <e32hashtab.h> |
38 |
||
39 |
#include <CVPbkContactStoreUriArray.h> |
|
40 |
#include <VPbkContactStoreUris.h> |
|
41 |
#include <TVPbkContactStoreUriPtr.h> |
|
42 |
#include <MVPbkContactStoreList.h> |
|
43 |
#include <MVPbkContactStoreProperties.h> |
|
44 |
#include <MVPbkStoreContactProperties.h> |
|
45 |
#include <MVPbkViewContact.h> |
|
46 |
#include <MVPbkStoreContact.h> |
|
47 |
#include <MVPbkStoreContact2.h> |
|
48 |
#include <MVPbkFieldType.h> |
|
49 |
#include <MVPbkContactFieldTextData.h> |
|
50 |
#include <CVPbkContactFieldIterator.h> |
|
51 |
#include <CVPbkContactViewDefinition.h> |
|
52 |
||
53 |
#include <MVPbkContactLink.h> |
|
54 |
#include <s32mem.h> |
|
55 |
||
56 |
#include <NSmlContactsDataStore.h> |
|
57 |
#include "NSmlContactsModsFetcher.h" |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
58 |
#include "nsmldebug.h" |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
59 |
#include "nsmlconstants.h" |
25 | 60 |
#include <NSmlDataModBase.h> |
61 |
#include "nsmlcontactsdefs.h" |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
62 |
#include "nsmldsimpluids.h" |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
63 |
#include "nsmlsnapshotitem.h" |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
64 |
#include "nsmlchangefinder.h" |
25 | 65 |
#include <VPbkEng.rsg> |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
66 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
67 |
#ifndef __WINS__ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
68 |
// This lowers the unnecessary compiler warning (armv5) to remark. |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
69 |
// "Warning: #174-D: expression has no effect..." is caused by |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
70 |
// DBG_ARGS8 macro in no-debug builds. |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
71 |
#pragma diag_remark 174 |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
72 |
#endif |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
73 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
74 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
75 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
76 |
// CNSmlContactsDataStore::CNSmlContactsBufferItem::~CNSmlContactsBufferItem |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
77 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
78 |
EXPORT_C CNSmlContactsDataStore::CNSmlContactsBufferItem::~CNSmlContactsBufferItem() |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
79 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
80 |
delete iItemData; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
81 |
delete iMimeType; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
82 |
delete iMimeVersion; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
83 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
84 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
85 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
86 |
// CNSmlContactsDataStore::NewL |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
87 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
88 |
EXPORT_C CNSmlContactsDataStore* CNSmlContactsDataStore::NewL() |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
89 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
90 |
_DBG_FILE("CNSmlContactsDataStore::NewL: BEGIN"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
91 |
CNSmlContactsDataStore* self = new ( ELeave ) CNSmlContactsDataStore(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
92 |
CleanupStack::PushL(self); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
93 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
94 |
self->ConstructL(); |
25 | 95 |
CleanupStack::Pop(self); // self |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
96 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
97 |
_DBG_FILE("CNSmlContactsDataStore::NewL: END"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
98 |
return self; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
99 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
100 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
101 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
102 |
// CNSmlContactsDataStore::CNSmlContactsDataStore() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
103 |
// ---------------------------------------------------------------------------- |
25 | 104 |
EXPORT_C CNSmlContactsDataStore::CNSmlContactsDataStore() : |
105 |
iKey( TKeyArrayFix( _FOFF( TNSmlSnapshotItem,ItemId() ),ECmpTInt )), |
|
106 |
iContactManager(NULL), |
|
107 |
iStore(NULL), |
|
108 |
iIdConverter(NULL), |
|
109 |
iContactViewBase(NULL), |
|
110 |
iSize(NULL), |
|
111 |
iBuf(NULL), |
|
112 |
iVCardEngine(NULL), |
|
113 |
iContactLnks(NULL) |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
114 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
115 |
_DBG_FILE("CNSmlContactsDataStore::CNSmlContactsDataStore(): begin"); |
25 | 116 |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
117 |
iSyncHistory = EFalse; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
118 |
iSnapshotRegistered = EFalse; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
119 |
|
25 | 120 |
iServerMaxObjectSize = 0; // Maximum size default value |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
121 |
iItemPos = -1; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
122 |
iModificationCount = KNSmlCompactAfterChanges; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
123 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
124 |
iState = ENSmlClosed; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
125 |
iStoreName = NULL; |
25 | 126 |
iRetCommand = KErrNone; |
127 |
iLastOperation = ENSmlNone; |
|
128 |
if(iDeleteAllOperation) |
|
129 |
{ |
|
130 |
delete iDeleteAllOperation; |
|
131 |
iDeleteAllOperation = NULL; |
|
132 |
} |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
133 |
_DBG_FILE("CNSmlContactsDataStore::CNSmlContactsDataStore(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
134 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
135 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
136 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
137 |
// CNSmlContactsDataStore::ConstructL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
138 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
139 |
EXPORT_C void CNSmlContactsDataStore::ConstructL() |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
140 |
{ |
25 | 141 |
_DBG_FILE("CNSmlContactsDataStore::ConstructL(): begin"); |
142 |
||
143 |
ConstructL( ( VPbkContactStoreUris::DefaultCntDbUri() ), KLegacySymbianDatabase ); |
|
144 |
||
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
145 |
_DBG_FILE("CNSmlContactsDataStore::ConstructL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
146 |
} |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
147 |
|
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
148 |
// ---------------------------------------------------------------------------- |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
149 |
// CNSmlContactsDataStore::ConstructL() |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
150 |
// ---------------------------------------------------------------------------- |
25 | 151 |
EXPORT_C void CNSmlContactsDataStore::ConstructL( |
152 |
const TDesC& aStoreName, const TDesC& aLegacyStore ) |
|
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
153 |
{ |
25 | 154 |
_DBG_FILE("CNSmlContactsDataStore::ConstructL(): begin"); |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
155 |
|
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
156 |
User::LeaveIfError( iRfs.Connect() ); |
25 | 157 |
|
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
158 |
iStringPool.OpenL(); |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
159 |
|
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
160 |
// Uid Sets |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
161 |
iNewUids = new (ELeave) CNSmlDataItemUidSet(); |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
162 |
iDeletedUids = new (ELeave) CNSmlDataItemUidSet(); |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
163 |
iSoftDeletedUids = new (ELeave) CNSmlDataItemUidSet(); |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
164 |
iMovedUids = new (ELeave) CNSmlDataItemUidSet(); |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
165 |
iReplacedUids = new (ELeave) CNSmlDataItemUidSet(); |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
166 |
|
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
167 |
// Create iDataMod |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
168 |
// This should be done after OpenL if there are more than one database |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
169 |
iDataMod = new (ELeave) CNSmlVCardMod(); |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
170 |
|
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
171 |
SetOwnStoreFormatL(); |
25 | 172 |
// open contact database |
173 |
CVPbkContactStoreUriArray* uriArray = CVPbkContactStoreUriArray::NewLC(); |
|
174 |
uriArray->AppendL( TVPbkContactStoreUriPtr( aStoreName )); |
|
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
175 |
|
25 | 176 |
iContactManager = CVPbkContactManager::NewL(*uriArray); |
177 |
CleanupStack::PopAndDestroy(uriArray); |
|
178 |
//Default store name |
|
179 |
iDefaultStoreName = aStoreName.AllocL(); |
|
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
180 |
|
25 | 181 |
//Fill iPacketStoreName buffer with legacy store name |
182 |
TBuf<KOldSymbianDBLength> dataBase(aLegacyStore); |
|
183 |
iPacketStoreName = HBufC::NewL(dataBase.Length()); |
|
184 |
TPtr pktStorePtr(iPacketStoreName->Des()); |
|
185 |
pktStorePtr.Copy(dataBase); |
|
186 |
iDeleteAllOperation = NULL; |
|
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
187 |
|
25 | 188 |
_DBG_FILE("CNSmlContactsDataStore::ConstructL(): end"); |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
189 |
} |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
190 |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
191 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
192 |
// CNSmlContactsDataStore::~CNSmlContactsDataStore() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
193 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
194 |
EXPORT_C CNSmlContactsDataStore::~CNSmlContactsDataStore() |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
195 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
196 |
_DBG_FILE("CNSmlContactsDataStore::~CNSmlContactsDataStore(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
197 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
198 |
delete iStoreFormat; // SetOwnStoreFormatL creates |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
199 |
iStringPool.Close(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
200 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
201 |
iRfs.Close(); |
25 | 202 |
iWriteStream.Close(); |
203 |
iReadStream.Close(); |
|
204 |
delete iBuf; |
|
205 |
||
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
206 |
if ( iChangeFinder ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
207 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
208 |
TRAP_IGNORE( iChangeFinder->CloseL() ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
209 |
delete iChangeFinder; |
25 | 210 |
iChangeFinder = NULL; |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
211 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
212 |
|
25 | 213 |
if(iIdConverter) |
214 |
{ |
|
215 |
delete iIdConverter; |
|
216 |
iIdConverter = NULL; |
|
217 |
} |
|
218 |
if(iContactLnks) |
|
219 |
{ |
|
220 |
delete iContactLnks; |
|
221 |
iContactLnks = NULL; |
|
222 |
} |
|
223 |
||
224 |
if(iContactViewBase) |
|
12
4d5e9526124e
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
11
diff
changeset
|
225 |
{ |
25 | 226 |
delete iContactViewBase; |
227 |
iContactViewBase = NULL; |
|
12
4d5e9526124e
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
11
diff
changeset
|
228 |
} |
25 | 229 |
if ( iContactsModsFetcher ) |
230 |
{ |
|
231 |
iContactsModsFetcher->CancelRequest(); |
|
232 |
delete iContactsModsFetcher; |
|
233 |
iContactsModsFetcher = NULL; |
|
234 |
} |
|
235 |
if ( iContactManager ) |
|
236 |
{ |
|
237 |
if(iStore) |
|
238 |
{ |
|
239 |
iStore->Close( *this ); |
|
240 |
} |
|
241 |
delete iContactManager; |
|
242 |
iContactManager = NULL; |
|
243 |
} |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
244 |
|
25 | 245 |
|
246 |
delete iVCardEngine; |
|
247 |
// Delete UidSets |
|
248 |
// |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
249 |
delete iNewUids; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
250 |
delete iDeletedUids; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
251 |
delete iSoftDeletedUids; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
252 |
delete iMovedUids; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
253 |
delete iReplacedUids; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
254 |
|
25 | 255 |
// |
256 |
// Empty BufferItemList if any |
|
257 |
// |
|
258 |
if ( iContactsBufferItemList.Count() > 0 ) |
|
259 |
{ |
|
260 |
if ( iContactsBufferItemList[iContactsBufferItemList.Count() - 1]->iItemData == iItemData ) |
|
261 |
{ |
|
262 |
iItemData = NULL; |
|
263 |
} |
|
264 |
} |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
265 |
iContactsBufferItemList.ResetAndDestroy(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
266 |
delete iDataMod; |
25 | 267 |
delete iMergeItem; |
268 |
||
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
269 |
if(iItemData) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
270 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
271 |
if(iItemData->Size() > 0 ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
272 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
273 |
delete iItemData; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
274 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
275 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
276 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
277 |
if(iItemDataAddBatch != iItemData) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
278 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
279 |
delete iItemDataAddBatch; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
280 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
281 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
282 |
delete iDefaultStoreName; |
25 | 283 |
delete iPacketStoreName; |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
284 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
285 |
delete iStoreName; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
286 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
287 |
iAddResultArray.Close(); |
25 | 288 |
|
289 |
if(iDeleteAllOperation) |
|
290 |
{ |
|
291 |
delete iDeleteAllOperation; |
|
292 |
iDeleteAllOperation = NULL; |
|
293 |
} |
|
294 |
||
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
295 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
296 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
297 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
298 |
// void CNSmlContactsDataStore::DoOpenL(const TDesC& aStoreName, |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
299 |
// MSmlSyncRelationship& aContext, |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
300 |
// TRequestStatus& aStatus) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
301 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
302 |
EXPORT_C void CNSmlContactsDataStore::DoOpenL( const TDesC& aStoreName, |
25 | 303 |
MSmlSyncRelationship& aContext, |
304 |
TRequestStatus& aStatus ) |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
305 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
306 |
DBG_ARGS(_S("CNSmlContactsDataStore::DoOpenL(): '%S' begin"), &aStoreName); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
307 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
308 |
iCallerStatus = &aStatus; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
309 |
*iCallerStatus = KRequestPending; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
310 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
311 |
if( iState != ENSmlClosed ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
312 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
313 |
User::RequestComplete( iCallerStatus, KErrInUse ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
314 |
return; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
315 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
316 |
|
25 | 317 |
if( RFs::CharToDrive(aStoreName[0], iDrive) != KErrNone ) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
318 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
319 |
RFs::CharToDrive( KNSmlDriveC()[0], iDrive ); |
25 | 320 |
} |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
321 |
iOpened = EFalse; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
322 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
323 |
if( iStoreName ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
324 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
325 |
delete iStoreName; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
326 |
iStoreName = NULL; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
327 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
328 |
|
25 | 329 |
if ( iChangeFinder ) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
330 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
331 |
iChangeFinder->CloseL(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
332 |
delete iChangeFinder; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
333 |
iChangeFinder = NULL; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
334 |
} |
25 | 335 |
// The Change finder maintains a list of all changes to the database. |
336 |
iChangeFinder = CNSmlChangeFinder::NewL( |
|
337 |
aContext, iKey, iSyncHistory, KNSmlContactsAdapterImplUid ); |
|
338 |
||
339 |
iState = ENSmlOpenAndWaiting; |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
340 |
|
25 | 341 |
//find and open the store |
342 |
if ( aStoreName == KNSmlContactStoreNameForDefaultDB ) |
|
343 |
{ |
|
344 |
iStore = iContactManager->ContactStoresL().Find( |
|
345 |
TVPbkContactStoreUriPtr(*iDefaultStoreName)); |
|
346 |
} |
|
347 |
else |
|
348 |
{ |
|
349 |
iStore = iContactManager->ContactStoresL().Find( |
|
350 |
TVPbkContactStoreUriPtr(aStoreName)); |
|
351 |
} |
|
352 |
iStore->OpenL(*this); |
|
353 |
||
354 |
iStoreName = aStoreName.AllocL(); |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
355 |
|
25 | 356 |
iVCardEngine = CVPbkVCardEng::NewL( *iContactManager ); |
357 |
iIdConverter = CVPbkContactIdConverter::NewL(*iStore ); |
|
358 |
if ( iContactsModsFetcher ) |
|
359 |
{ |
|
360 |
iContactsModsFetcher->CancelRequest(); |
|
361 |
delete iContactsModsFetcher; |
|
362 |
iContactsModsFetcher = NULL; |
|
363 |
} |
|
364 |
||
365 |
iContactsModsFetcher = CreateModsFetcherL(); |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
366 |
|
25 | 367 |
#ifdef __NSML_MODULETEST__ |
368 |
CActiveScheduler::Start(); |
|
369 |
#endif |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
370 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
371 |
_DBG_FILE("CNSmlContactsDataStore::DoOpenL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
372 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
373 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
374 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
375 |
// void CNSmlContactsDataStore::DoCancelRequest() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
376 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
377 |
EXPORT_C void CNSmlContactsDataStore::DoCancelRequest() |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
378 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
379 |
_DBG_FILE("CNSmlContactsDataStore::DoCancelRequest(): begin"); |
25 | 380 |
if(iLastOperation == ENSMLDeleteAllOp) |
381 |
{ |
|
382 |
if(iDeleteAllOperation) |
|
383 |
{ |
|
384 |
delete iDeleteAllOperation; |
|
385 |
iDeleteAllOperation = NULL; |
|
386 |
} |
|
387 |
||
388 |
if( iChangeFinder ) |
|
389 |
{ |
|
390 |
TRAP_IGNORE(iChangeFinder->ResetL()); |
|
391 |
} |
|
392 |
iSnapshotRegistered = EFalse; |
|
393 |
||
394 |
if(iContactLnks) |
|
395 |
{ |
|
396 |
delete iContactLnks; |
|
397 |
iContactLnks = NULL; |
|
398 |
iContactLink = NULL; |
|
399 |
} |
|
400 |
||
401 |
if(iContactViewBase) |
|
402 |
{ |
|
403 |
delete iContactViewBase; |
|
404 |
iContactViewBase = NULL; |
|
405 |
} |
|
406 |
User::RequestComplete( iCallerStatus, KErrCancel ); |
|
407 |
} |
|
408 |
if(iContactsModsFetcher) |
|
409 |
{ |
|
410 |
iContactsModsFetcher->CancelRequest(); |
|
411 |
} |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
412 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
413 |
_DBG_FILE("CNSmlContactsDataStore::DoCancelRequest(): NOT NEEDED end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
414 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
415 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
416 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
417 |
// void CNSmlContactsDataStore::DoStoreName() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
418 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
419 |
EXPORT_C const TDesC& CNSmlContactsDataStore::DoStoreName() const |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
420 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
421 |
_DBG_FILE("CNSmlContactsDataStore::DoStoreName(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
422 |
_DBG_FILE("CNSmlContactsDataStore::DoStoreName(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
423 |
return *iStoreName; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
424 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
425 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
426 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
427 |
// void CNSmlContactsDataStore::DefaultStoreNameL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
428 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
429 |
EXPORT_C const TDesC& CNSmlContactsDataStore::DefaultStoreNameL() const |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
430 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
431 |
_DBG_FILE("CNSmlContactsDataStore::DefaultStoreNameL(): begin"); |
25 | 432 |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
433 |
if ( !iDefaultStoreName ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
434 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
435 |
return KNullDesC; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
436 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
437 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
438 |
_DBG_FILE("CNSmlContactsDataStore::DefaultStoreNameL(): end"); |
25 | 439 |
//The engine methods that create syncml packet, use this information in Database fields |
440 |
return *iPacketStoreName; |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
441 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
442 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
443 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
444 |
// void CNSmlContactsDataStore::DoBeginTransactionL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
445 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
446 |
EXPORT_C void CNSmlContactsDataStore::DoBeginTransactionL() |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
447 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
448 |
_DBG_FILE("CNSmlContactsDataStore::DoBeginTransactionL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
449 |
User::Leave( KErrNotSupported ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
450 |
_DBG_FILE("CNSmlContactsDataStore::DoBeginTransactionL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
451 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
452 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
453 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
454 |
// void CNSmlContactsDataStore::DoCommitTransactionL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
455 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
456 |
EXPORT_C void CNSmlContactsDataStore::DoCommitTransactionL(TRequestStatus& aStatus) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
457 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
458 |
_DBG_FILE("CNSmlContactsDataStore::DoCommitTransactionL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
459 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
460 |
iCallerStatus = &aStatus; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
461 |
*iCallerStatus = KRequestPending; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
462 |
User::RequestComplete( iCallerStatus, KErrNotSupported ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
463 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
464 |
_DBG_FILE("CNSmlContactsDataStore::DoCommitTransactionL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
465 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
466 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
467 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
468 |
// void CNSmlContactsDataStore::DoRevertTransaction() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
469 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
470 |
EXPORT_C void CNSmlContactsDataStore::DoRevertTransaction(TRequestStatus& aStatus) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
471 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
472 |
_DBG_FILE("CNSmlContactsDataStore::DoRevertTransaction(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
473 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
474 |
iCallerStatus = &aStatus; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
475 |
*iCallerStatus = KRequestPending; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
476 |
User::RequestComplete( iCallerStatus, KErrNotSupported ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
477 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
478 |
_DBG_FILE("CNSmlContactsDataStore::DoRevertTransaction(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
479 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
480 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
481 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
482 |
// void CNSmlContactsDataStore::DoBeginBatchL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
483 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
484 |
EXPORT_C void CNSmlContactsDataStore::DoBeginBatchL() |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
485 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
486 |
_DBG_FILE("CNSmlContactsDataStore::DoBeginBatchL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
487 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
488 |
iBatchMode = ETrue; // SUPPORTED on Contacts |
25 | 489 |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
490 |
_DBG_FILE("CNSmlContactsDataStore::DoBeginBatchL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
491 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
492 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
493 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
494 |
// void CNSmlContactsDataStore::DoCommitBatchL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
495 |
// ---------------------------------------------------------------------------- |
25 | 496 |
EXPORT_C void CNSmlContactsDataStore::DoCommitBatchL( RArray<TInt>& aResultArray, TRequestStatus& aStatus ) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
497 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
498 |
_DBG_FILE("CNSmlContactsDataStore::DoCommitBatchL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
499 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
500 |
iCallerStatus = &aStatus; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
501 |
*iCallerStatus = KRequestPending; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
502 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
503 |
if( !iBatchMode ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
504 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
505 |
User::RequestComplete( iCallerStatus, KErrNotReady ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
506 |
_DBG_FILE("CNSmlContactsDataStore::DoCommitBatchL(): NOT ON BATCH MODE end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
507 |
return; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
508 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
509 |
// |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
510 |
// Go through Buffer and execute all commands return aResultArray |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
511 |
// |
25 | 512 |
|
513 |
iResultArray = &aResultArray; |
|
514 |
||
515 |
iIndex = 0; |
|
516 |
TRAPD( leavecode,ExecuteBufferL() ); |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
517 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
518 |
if( leavecode != KErrNone ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
519 |
{ |
25 | 520 |
User::RequestComplete( iCallerStatus, leavecode ); |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
521 |
} |
25 | 522 |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
523 |
_DBG_FILE("CNSmlContactsDataStore::DoCommitBatchL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
524 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
525 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
526 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
527 |
// void CNSmlContactsDataStore::ExecuteBufferL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
528 |
// ---------------------------------------------------------------------------- |
25 | 529 |
EXPORT_C void CNSmlContactsDataStore::ExecuteBufferL() |
530 |
{ |
|
531 |
_DBG_FILE("CNSmlContactsDataStore::ExecuteBufferL(): begin"); |
|
532 |
||
533 |
TInt retCommand( KErrNone ); |
|
534 |
||
535 |
// |
|
536 |
// Loop through buffered commands |
|
537 |
// |
|
538 |
if( iIndex < iContactsBufferItemList.Count()) |
|
539 |
{ |
|
540 |
||
541 |
if( iContactsBufferItemList[iIndex]->iStatus!= KNSmlNoError ) |
|
542 |
{ |
|
543 |
retCommand = iContactsBufferItemList[iIndex]->iStatus; |
|
544 |
} |
|
545 |
else if( iContactsBufferItemList[iIndex]->iModType == ENSmlCntItemAdd ) |
|
546 |
{ |
|
547 |
retCommand = ExecuteAddL(); |
|
548 |
} |
|
549 |
else if( iContactsBufferItemList[iIndex]->iModType == ENSmlCntItemReplace || |
|
550 |
iContactsBufferItemList[iIndex]->iModType == ENSmlCntItemFieldLevelReplace ) |
|
551 |
{ |
|
552 |
ExecuteUpdateL(); |
|
553 |
} |
|
554 |
else if( iContactsBufferItemList[iIndex]->iModType == ENSmlCntItemMove ) |
|
555 |
{ |
|
556 |
ExecuteMoveL(); |
|
557 |
} |
|
558 |
else if( iContactsBufferItemList[iIndex]->iModType == ENSmlCntItemDelete || |
|
559 |
iContactsBufferItemList[iIndex]->iModType == ENSmlCntItemSoftDelete ) |
|
560 |
{ |
|
561 |
ExecuteDeleteL(); |
|
562 |
} |
|
563 |
// |
|
564 |
// Set allready set commands from iContactsBufferItemList |
|
565 |
// |
|
566 |
if( ( iContactsBufferItemList[iIndex]->iModType == ENSmlCntItemAdd || |
|
567 |
iContactsBufferItemList[iIndex]->iModType == ENSmlCntItemReplace || |
|
568 |
iContactsBufferItemList[iIndex]->iModType == ENSmlCntItemFieldLevelReplace || |
|
569 |
iContactsBufferItemList[iIndex]->iModType == ENSmlCntItemDelete || |
|
570 |
iContactsBufferItemList[iIndex]->iModType == ENSmlCntItemSoftDelete ) && |
|
571 |
iContactsBufferItemList[iIndex]->iStatus != KNSmlNoError ) |
|
572 |
{ |
|
573 |
retCommand = iContactsBufferItemList[iIndex]->iStatus; |
|
574 |
} |
|
575 |
||
576 |
||
577 |
//if an error occurs when performing any operation |
|
578 |
//return the error status |
|
579 |
else if(retCommand!=KErrNone) |
|
580 |
{ |
|
581 |
User::RequestComplete( iCallerStatus, retCommand ); |
|
582 |
} |
|
583 |
||
584 |
iRetCommand = retCommand; |
|
585 |
} |
|
586 |
} |
|
587 |
||
588 |
// ---------------------------------------------------------------------------- |
|
589 |
// void CNSmlContactsDataStore::ExecuteAddL() |
|
590 |
// ---------------------------------------------------------------------------- |
|
591 |
||
592 |
EXPORT_C TInt CNSmlContactsDataStore::ExecuteAddL() |
|
593 |
{ |
|
594 |
TInt retCommand( KErrNone ); |
|
595 |
StripPropertyL( iItemDataAddBatch, KVersitTokenUID() ); // Remove UID's from data |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
596 |
|
25 | 597 |
TInt err( KErrNone ); |
598 |
if(iBatchMode) |
|
599 |
{ |
|
600 |
TRAP( err,LdoAddItemsL( iItemDataAddBatch, |
|
601 |
iItemDataAddBatch->Ptr(0).Length()) ); |
|
602 |
if(err!=KErrNone) |
|
603 |
{ |
|
604 |
retCommand = err; |
|
605 |
TInt j = iIndex; |
|
606 |
while( j < iContactsBufferItemList.Count() ) |
|
607 |
{ |
|
608 |
if( iContactsBufferItemList[j]->iModType == ENSmlCntItemAdd && |
|
609 |
iContactsBufferItemList[j]->iStatus == KNSmlNoError ) |
|
610 |
{ |
|
611 |
iContactsBufferItemList[j]->iStatus = KErrNotSupported; |
|
612 |
iResultArray->AppendL(KErrNotSupported); |
|
613 |
} |
|
614 |
j++; |
|
615 |
} |
|
616 |
} |
|
617 |
} |
|
618 |
else |
|
619 |
{ |
|
620 |
const TPtr8 dataPtr = iItemDataAddBatch->Ptr(0); |
|
621 |
TRAP( err, LdoAddItemL( dataPtr, |
|
622 |
iContactsBufferItemList[iIndex]->iSize)); |
|
623 |
if(err!=KErrNone) |
|
624 |
{ |
|
625 |
retCommand = err; |
|
626 |
} |
|
627 |
} |
|
628 |
return retCommand; |
|
629 |
} |
|
630 |
||
631 |
// ---------------------------------------------------------------------------- |
|
632 |
// void CNSmlContactsDataStore::ExecuteDeleteL() |
|
633 |
// ---------------------------------------------------------------------------- |
|
634 |
||
635 |
EXPORT_C void CNSmlContactsDataStore:: ExecuteDeleteL() |
|
636 |
{ |
|
637 |
||
638 |
if(iBatchMode) |
|
639 |
{ |
|
640 |
iContactLnks = CVPbkContactLinkArray::NewL(); |
|
641 |
||
642 |
TInt j=iIndex; |
|
643 |
while( j < iContactsBufferItemList.Count() ) |
|
644 |
{ |
|
645 |
if( (iContactsBufferItemList[j]->iModType == ENSmlCntItemDelete || |
|
646 |
iContactsBufferItemList[j]->iModType == ENSmlCntItemSoftDelete) && |
|
647 |
iContactsBufferItemList[j]->iStatus == KNSmlNoError ) |
|
648 |
{ |
|
649 |
TContactItemId id = iContactsBufferItemList[j]->iUid; |
|
650 |
||
651 |
if( id != 0 ) |
|
652 |
{ |
|
653 |
MVPbkContactLink* contactLink = iIdConverter->IdentifierToLinkLC(id); |
|
654 |
//check if the contact link is valid |
|
655 |
TInt index = iContactViewBase->IndexOfLinkL(*contactLink); |
|
656 |
if(index != KErrNotFound) |
|
657 |
{ |
|
658 |
iContactLnks->AppendL(contactLink); |
|
659 |
} |
|
660 |
else |
|
661 |
{ |
|
662 |
iContactsBufferItemList[j]->iStatus = KErrNotFound; |
|
663 |
} |
|
664 |
||
665 |
CleanupStack::Pop();//contactLink |
|
666 |
} |
|
667 |
else |
|
668 |
{ |
|
669 |
iContactsBufferItemList[j]->iStatus = KErrNotFound; |
|
670 |
} |
|
671 |
} |
|
672 |
j++; |
|
673 |
} |
|
674 |
||
675 |
delete iContactViewBase; |
|
676 |
iContactViewBase = NULL; |
|
677 |
||
678 |
iContactManager->DeleteContactsL( *iContactLnks, *this ); |
|
679 |
iLastOperation = ENSmlDeleteOp; |
|
680 |
} |
|
681 |
||
682 |
} |
|
683 |
||
684 |
// ---------------------------------------------------------------------------- |
|
685 |
// void CNSmlContactsDataStore::ExecuteUpdateL() |
|
686 |
// ---------------------------------------------------------------------------- |
|
687 |
||
688 |
EXPORT_C void CNSmlContactsDataStore::ExecuteUpdateL() |
|
689 |
{ |
|
690 |
iUid = iContactsBufferItemList[iIndex]->iUid; |
|
691 |
||
692 |
iDataMod->SetUsedMimeType( iServerMimeType, iServerMimeVersion ); |
|
693 |
||
694 |
// Check whether merging is needed or not. |
|
695 |
if( iDataMod->NeedsMerge() ) |
|
696 |
{ |
|
697 |
iMergeItem = CBufFlat::NewL(64); |
|
698 |
iWriteStream.Open(*iMergeItem); |
|
699 |
||
700 |
MVPbkContactLink* contactLink = iIdConverter->IdentifierToLinkLC(iUid); |
|
701 |
||
702 |
iVCardEngine->ExportVCardForSyncL(iWriteStream,*contactLink,*this); |
|
703 |
CleanupStack::PopAndDestroy(); |
|
704 |
||
705 |
iLastOperation = ENSMLUpdateExportOp; |
|
706 |
} |
|
707 |
else |
|
708 |
{ |
|
709 |
LdoUpdateItemL(); |
|
710 |
} |
|
711 |
} |
|
712 |
||
713 |
// ---------------------------------------------------------------------------- |
|
714 |
// void CNSmlContactsDataStore::ExecuteMoveL |
|
715 |
// ---------------------------------------------------------------------------- |
|
716 |
||
717 |
EXPORT_C void CNSmlContactsDataStore::ExecuteMoveL() |
|
718 |
{ |
|
719 |
// move command is not supported |
|
720 |
if(!iBatchMode) |
|
721 |
{ |
|
722 |
ResetBuffer(); |
|
723 |
User::RequestComplete( iCallerStatus, KErrNotSupported ); |
|
724 |
} |
|
725 |
else |
|
726 |
{ |
|
727 |
iResultArray->AppendL(KErrNotSupported); |
|
728 |
iIndex++; |
|
729 |
if(iIndex == iContactsBufferItemList.Count() ) |
|
730 |
{ |
|
731 |
ResetBuffer(); |
|
732 |
User::RequestComplete( iCallerStatus, KErrNone ); |
|
733 |
} |
|
734 |
else |
|
735 |
{ |
|
736 |
ExecuteBufferL(); |
|
737 |
} |
|
738 |
} |
|
739 |
} |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
740 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
741 |
// void CNSmlContactsDataStore::DoCancelBatch() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
742 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
743 |
EXPORT_C void CNSmlContactsDataStore::DoCancelBatch() |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
744 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
745 |
_DBG_FILE("CNSmlContactsDataStore::DoCancelBatch(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
746 |
if( iBatchMode ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
747 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
748 |
iBatchMode = EFalse; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
749 |
// |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
750 |
// Empty BufferItemList if any |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
751 |
// |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
752 |
iContactsBufferItemList.ResetAndDestroy(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
753 |
iItemData = NULL; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
754 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
755 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
756 |
_DBG_FILE("CNSmlContactsDataStore::DoCancelBatch(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
757 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
758 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
759 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
760 |
// void CNSmlContactsDataStore::DoSetRemoteStoreFormatL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
761 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
762 |
EXPORT_C void CNSmlContactsDataStore::DoSetRemoteStoreFormatL( const CSmlDataStoreFormat& aServerDataStoreFormat ) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
763 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
764 |
_DBG_FILE("CNSmlContactsDataStore::DoSetRemoteStoreFormatL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
765 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
766 |
TBool foundMime = EFalse; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
767 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
768 |
// |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
769 |
// KErrNotSupported is returned if server does not support same mime type |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
770 |
// and same mime type version as Data Provider. |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
771 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
772 |
TInt i=0; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
773 |
while( i< aServerDataStoreFormat.MimeFormatCount() && !foundMime ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
774 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
775 |
if( iUsedMimeType.MatchF(aServerDataStoreFormat.MimeFormat(i).MimeType().DesC()) ==0 && |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
776 |
iUsedMimeVersion.MatchF(aServerDataStoreFormat.MimeFormat(i).MimeVersion().DesC())==0 ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
777 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
778 |
foundMime = ETrue; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
779 |
iServerMimeType = aServerDataStoreFormat.MimeFormat(i).MimeType(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
780 |
iServerMimeVersion = aServerDataStoreFormat.MimeFormat(i).MimeVersion(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
781 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
782 |
i++; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
783 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
784 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
785 |
if( !foundMime ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
786 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
787 |
_DBG_FILE("CNSmlContactsDataStore::DoSetRemoteStoreFormatL(): SERVER MIMETYPE NOTSUPPORTED end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
788 |
User::Leave( KErrNotSupported ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
789 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
790 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
791 |
iDataMod->SetPartnerStoreFormat( (CSmlDataStoreFormat&) aServerDataStoreFormat ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
792 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
793 |
SetOwnStoreFormatL(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
794 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
795 |
TInt error = iDataMod->SetUsedMimeType( iServerMimeType, iServerMimeVersion ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
796 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
797 |
User::LeaveIfError( error ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
798 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
799 |
_DBG_FILE("CNSmlContactsDataStore::DoSetRemoteStoreFormatL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
800 |
return; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
801 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
802 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
803 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
804 |
// void CNSmlContactsDataStore::SetOwnStoreFormatL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
805 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
806 |
EXPORT_C void CNSmlContactsDataStore::SetOwnStoreFormatL() |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
807 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
808 |
_DBG_FILE("CNSmlContactsDataStore::SetOwnStoreFormatL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
809 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
810 |
if( !iStoreFormat ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
811 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
812 |
TFileName fileName; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
813 |
TParse parse; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
814 |
|
25 | 815 |
parse.Set( GetStoreFormatResourceFileL(), &KDC_RESOURCE_FILES_DIR, NULL ); |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
816 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
817 |
fileName = parse.FullName(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
818 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
819 |
RResourceFile resourceFile; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
820 |
BaflUtils::NearestLanguageFile( iRfs, fileName ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
821 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
822 |
resourceFile.OpenL( iRfs, fileName ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
823 |
CleanupClosePushL( resourceFile ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
824 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
825 |
HBufC8* contactsDataFormat = resourceFile.AllocReadLC( NSML_CONTACTS_DATA_STORE_FORMAT ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
826 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
827 |
TResourceReader reader; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
828 |
reader.SetBuffer( contactsDataFormat ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
829 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
830 |
iStoreFormat = CSmlDataStoreFormat::NewLC( iStringPool, reader ); |
25 | 831 |
CleanupStack::Pop(iStoreFormat); // iStoreFormat |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
832 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
833 |
CleanupStack::PopAndDestroy(2); // contactsDataFormat, resourceFile |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
834 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
835 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
836 |
iDataMod->SetOwnStoreFormat( *iStoreFormat ); |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
837 |
|
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
838 |
// Set own MIME type based on store format resource definition. Allows inherited classes to |
25 | 839 |
// use non-standard MIME type by recource change. E.g. Operator specific MIME types can be used. |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
840 |
iUsedMimeType.Set( iStoreFormat->MimeFormat(0).MimeType().DesC() ); |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
841 |
iUsedMimeVersion.Set( iStoreFormat->MimeFormat(0).MimeVersion().DesC() ); |
25 | 842 |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
843 |
_DBG_FILE("CNSmlContactsDataStore::SetOwnStoreFormatL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
844 |
return; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
845 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
846 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
847 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
848 |
// void CNSmlContactsDataStore::DoSetRemoteMaxObjectSize() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
849 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
850 |
EXPORT_C void CNSmlContactsDataStore::DoSetRemoteMaxObjectSize( TInt aServerMaxObjectSize ) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
851 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
852 |
_DBG_FILE("CNSmlContactsDataStore::DoSetRemoteMaxObjectSize(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
853 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
854 |
iServerMaxObjectSize = aServerMaxObjectSize; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
855 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
856 |
_DBG_FILE("CNSmlContactsDataStore::DoSetRemoteMaxObjectSize(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
857 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
858 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
859 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
860 |
// void CNSmlContactsDataStore::DoMaxObjectSize() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
861 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
862 |
EXPORT_C TInt CNSmlContactsDataStore::DoMaxObjectSize() const |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
863 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
864 |
_DBG_FILE("CNSmlContactsDataStore::DoMaxObjectSize(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
865 |
_DBG_FILE("CNSmlContactsDataStore::DoMaxObjectSize() 100 k: end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
866 |
return KNSmlDataStoreMaxSize; // 100 k |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
867 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
868 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
869 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
870 |
// void CNSmlContactsDataStore::DoOpenItemL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
871 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
872 |
EXPORT_C void CNSmlContactsDataStore::DoOpenItemL( TSmlDbItemUid aUid, |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
873 |
TBool& aFieldChange, |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
874 |
TInt& aSize, |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
875 |
TSmlDbItemUid& aParent, |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
876 |
TDes8& aMimeType, |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
877 |
TDes8& aMimeVer, |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
878 |
TRequestStatus& aStatus ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
879 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
880 |
_DBG_FILE("CNSmlContactsDataStore::DoOpenItemL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
881 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
882 |
iCallerStatus = &aStatus; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
883 |
*iCallerStatus = KRequestPending; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
884 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
885 |
if ( iState != ENSmlOpenAndWaiting ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
886 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
887 |
User::RequestComplete( iCallerStatus, KErrNotReady ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
888 |
return; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
889 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
890 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
891 |
iItemPos = 0; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
892 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
893 |
aFieldChange = EFalse; // Whole item sent NOT SUPPORT ON FIELDCHANGE |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
894 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
895 |
aMimeType = iStoreFormat->MimeFormat( 0 ).MimeType().DesC(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
896 |
aMimeVer = iStoreFormat->MimeFormat( 0 ).MimeVersion().DesC(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
897 |
aParent = KNullDataItemId; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
898 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
899 |
iModType = ENSmlCntItemRead; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
900 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
901 |
if( !iItemData ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
902 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
903 |
iItemData= CBufFlat::NewL( KNSmlItemDataExpandSize ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
904 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
905 |
else |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
906 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
907 |
iItemData->Reset(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
908 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
909 |
|
25 | 910 |
LdoFetchItemL( aUid, *iItemData ); |
911 |
iSize = &aSize; |
|
912 |
||
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
913 |
_DBG_FILE("CNSmlContactsDataStore::DoOpenItemL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
914 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
915 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
916 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
917 |
// void CNSmlContactsDataStore::DoCreateItemL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
918 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
919 |
EXPORT_C void CNSmlContactsDataStore::DoCreateItemL( TSmlDbItemUid& aUid, |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
920 |
TInt aSize, |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
921 |
TSmlDbItemUid /*aParent*/, |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
922 |
const TDesC8& aMimeType, |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
923 |
const TDesC8& aMimeVer, |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
924 |
TRequestStatus& aStatus ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
925 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
926 |
_DBG_FILE("CNSmlContactsDataStore::DoCreateItemL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
927 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
928 |
iCallerStatus = &aStatus; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
929 |
*iCallerStatus = KRequestPending; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
930 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
931 |
TInt err = KErrNone; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
932 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
933 |
if ( iState != ENSmlOpenAndWaiting ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
934 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
935 |
User::RequestComplete( iCallerStatus, KErrNotReady ); |
25 | 936 |
_DBG_FILE("CNSmlContactsDataStore::DoCreateItemL - KErrNotReady: END"); |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
937 |
return; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
938 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
939 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
940 |
iItemSize = aSize; // Size sent from server |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
941 |
iModType = ENSmlCntItemAdd; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
942 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
943 |
iMimeTypeItem.Set( aMimeType ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
944 |
iMimeVersionItem.Set( aMimeVer ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
945 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
946 |
if ( iItemPos == -1 || !iBatchMode ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
947 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
948 |
iItemPos = 0; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
949 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
950 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
951 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
952 |
if( iItemData ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
953 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
954 |
iItemData->Reset(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
955 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
956 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
957 |
if( !iItemDataAddBatch ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
958 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
959 |
iItemDataAddBatch= CBufFlat::NewL( KNSmlItemDataExpandSize ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
960 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
961 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
962 |
// Check MimeType and MimeVersion |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
963 |
if( ( aMimeType.MatchF( KNSmlvCard21Name ) < 0 ) && |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
964 |
( aMimeType.MatchF( KNSmlvCard30Name ) < 0 ) && |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
965 |
// Allow using custom MIME type defined in store format resource file |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
966 |
( aMimeType.MatchF( iUsedMimeType ) < 0 ) ) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
967 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
968 |
User::RequestComplete( iCallerStatus, KErrNotSupported ); |
25 | 969 |
_DBG_FILE("CNSmlContactsDataStore::DoCreateItemL - KErrNotSupported: END"); |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
970 |
return; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
971 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
972 |
|
25 | 973 |
// Is there enough space on drive |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
974 |
if( DriveBelowCriticalLevelL( aSize ) ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
975 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
976 |
err = KErrDiskFull; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
977 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
978 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
979 |
iItemData = AddBufferListL( aUid,aSize, err ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
980 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
981 |
if( iBatchMode ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
982 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
983 |
iState = ENSmlItemCreating; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
984 |
User::RequestComplete( iCallerStatus, KErrNone ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
985 |
_DBG_FILE("CNSmlContactsDataStore::DoCreateItemL(): begin BATCH"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
986 |
return ; // Put into buffer |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
987 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
988 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
989 |
if ( err == KErrNone ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
990 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
991 |
iState = ENSmlItemCreating; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
992 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
993 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
994 |
User::RequestComplete( iCallerStatus, err ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
995 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
996 |
_DBG_FILE("CNSmlContactsDataStore::DoCreateItemL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
997 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
998 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
999 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1000 |
// void CNSmlContactsDataStore::DoReplaceItemL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1001 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1002 |
EXPORT_C void CNSmlContactsDataStore::DoReplaceItemL( TSmlDbItemUid aUid, |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1003 |
TInt aSize, |
25 | 1004 |
TSmlDbItemUid /*aParent*/, |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1005 |
TBool aFieldChange, |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1006 |
TRequestStatus& aStatus ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1007 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1008 |
_DBG_FILE("CNSmlContactsDataStore::DoReplaceItemL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1009 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1010 |
iCallerStatus = &aStatus; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1011 |
*iCallerStatus = KRequestPending; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1012 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1013 |
TInt err = KErrNone; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1014 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1015 |
iUid = aUid; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1016 |
iItemSize = aSize; |
25 | 1017 |
iModType = aFieldChange ? ENSmlCntItemFieldLevelReplace : ENSmlCntItemReplace; |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1018 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1019 |
if ( iItemPos == -1 || !iBatchMode ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1020 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1021 |
iItemPos = 0; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1022 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1023 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1024 |
if ( iItemData ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1025 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1026 |
iItemData->Reset(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1027 |
} |
25 | 1028 |
|
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1029 |
iFieldLevelReplace = aFieldChange; |
25 | 1030 |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1031 |
iItemData = AddBufferListL( aUid, aSize, err ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1032 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1033 |
if( iBatchMode ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1034 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1035 |
iState = ENSmlItemUpdating; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1036 |
_DBG_FILE("CNSmlContactsDataStore::DoReplaceItemL(): BATCHMODE end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1037 |
User::RequestComplete( iCallerStatus, KErrNone ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1038 |
return; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1039 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1040 |
if ( err == KErrNone ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1041 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1042 |
iState = ENSmlItemUpdating; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1043 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1044 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1045 |
User::RequestComplete( iCallerStatus, err ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1046 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1047 |
_DBG_FILE("CNSmlContactsDataStore::DoReplaceItemL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1048 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1049 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1050 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1051 |
// void CNSmlContactsDataStore::DoReadItemL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1052 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1053 |
EXPORT_C void CNSmlContactsDataStore::DoReadItemL( TDes8& aBuffer ) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1054 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1055 |
_DBG_FILE("CNSmlContactsDataStore::DoReadItemL(): begin"); |
25 | 1056 |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1057 |
if ( iState != ENSmlItemOpen || !iItemData ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1058 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1059 |
iItemPos = -1; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1060 |
User::Leave( KErrNotReady ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1061 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1062 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1063 |
if ( iItemPos == -1 ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1064 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1065 |
User::Leave( KErrEof ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1066 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1067 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1068 |
if ( aBuffer.Size() < iItemData->Size() - iItemPos ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1069 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1070 |
iItemData->Read( iItemPos, aBuffer ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1071 |
iItemPos += aBuffer.Size(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1072 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1073 |
else |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1074 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1075 |
iItemData->Read( iItemPos, aBuffer, iItemData->Size() - iItemPos ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1076 |
iItemPos = -1; |
25 | 1077 |
} |
1078 |
||
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1079 |
_DBG_FILE("CNSmlContactsDataStore::DoReadItemL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1080 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1081 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1082 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1083 |
// void CNSmlContactsDataStore::DoWriteItemL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1084 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1085 |
EXPORT_C void CNSmlContactsDataStore::DoWriteItemL( const TDesC8& aData ) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1086 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1087 |
_DBG_FILE("CNSmlContactsDataStore::DoWriteItemL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1088 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1089 |
/* Data must be accumulated from pieces of information */ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1090 |
if ( iState == ENSmlItemCreating || iState == ENSmlItemUpdating ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1091 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1092 |
if ( iItemData ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1093 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1094 |
if ( iItemPos == -1 ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1095 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1096 |
iStateItem = KErrEof; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1097 |
if( iBatchMode ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1098 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1099 |
return; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1100 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1101 |
User::Leave( KErrEof ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1102 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1103 |
iItemData->InsertL( iItemData->Size(), aData ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1104 |
iItemPos += aData.Size(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1105 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1106 |
if ( aData.Size() > iItemSize ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1107 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1108 |
iState = ENSmlItemOverflow; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1109 |
iStateItem = KErrOverflow; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1110 |
_DBG_FILE("CNSmlContactsDataStore::DoWriteItemL(): KErrOverflow End"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1111 |
DBG_ARGS(_S("CNSmlContactsDataStore::DoWriteItemL(): Server sent=(%d) Item=(%d)"), |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1112 |
iItemSize, aData.Size()); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1113 |
if( iBatchMode ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1114 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1115 |
return; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1116 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1117 |
User::Leave( KErrOverflow ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1118 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1119 |
if ( aData.Size() == iItemSize ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1120 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1121 |
iStateItem = KErrNone; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1122 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1123 |
return; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1124 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1125 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1126 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1127 |
iStateItem = KErrNotReady; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1128 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1129 |
if( iBatchMode ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1130 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1131 |
_DBG_FILE("CNSmlContactsDataStore::DoWriteItemL(): KErrNotReady End"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1132 |
return; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1133 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1134 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1135 |
User::Leave( KErrNotReady ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1136 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1137 |
_DBG_FILE("CNSmlContactsDataStore::DoWriteItemL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1138 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1139 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1140 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1141 |
// void CNSmlContactsDataStore::DoCommitItemL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1142 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1143 |
EXPORT_C void CNSmlContactsDataStore::DoCommitItemL( TRequestStatus& aStatus ) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1144 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1145 |
iCallerStatus = &aStatus; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1146 |
*iCallerStatus = KRequestPending; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1147 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1148 |
_DBG_FILE("CNSmlContactsDataStore::DoCommitItemL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1149 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1150 |
// Data OK => insert to total buffer |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1151 |
if (iModType == ENSmlCntItemAdd && |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1152 |
iStateItem == KErrNone ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1153 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1154 |
iItemDataAddBatch->InsertL( iItemDataAddBatch->Size(),iItemData->Ptr(0), iItemData->Size() ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1155 |
iItemDataAddBatch->InsertL( iItemDataAddBatch->Size(), KVersitTokenCRLF() ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1156 |
if( iContactsBufferItemList.Count() > 0 ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1157 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1158 |
iContactsBufferItemList[iContactsBufferItemList.Count()-1]->iStatus = KNSmlNoError; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1159 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1160 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1161 |
else if ((iModType == ENSmlCntItemAdd || // If some write problems |
25 | 1162 |
iModType == ENSmlCntItemReplace || |
1163 |
iModType == ENSmlCntItemFieldLevelReplace ) && |
|
1164 |
iStateItem != KErrNone && |
|
1165 |
iContactsBufferItemList.Count() > 0) |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1166 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1167 |
iContactsBufferItemList[iContactsBufferItemList.Count()-1]->iStatus = iStateItem; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1168 |
} |
25 | 1169 |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1170 |
if( iBatchMode ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1171 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1172 |
iItemData = NULL; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1173 |
iState = ENSmlOpenAndWaiting; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1174 |
User::RequestComplete( iCallerStatus, KErrNone ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1175 |
return; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1176 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1177 |
|
25 | 1178 |
|
1179 |
iIndex = 0; |
|
1180 |
ExecuteBufferL(); |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1181 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1182 |
iItemData = NULL; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1183 |
iState = ENSmlOpenAndWaiting; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1184 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1185 |
_DBG_FILE("CNSmlContactsDataStore::DoCommitItemL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1186 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1187 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1188 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1189 |
// void CNSmlContactsDataStore::DoCloseItem() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1190 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1191 |
EXPORT_C void CNSmlContactsDataStore::DoCloseItem() |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1192 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1193 |
_DBG_FILE("CNSmlContactsDataStore::DoCloseItem(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1194 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1195 |
if ( iState == ENSmlItemOpen ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1196 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1197 |
iItemPos = -1; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1198 |
if ( iItemData ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1199 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1200 |
delete iItemData; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1201 |
iItemData = NULL; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1202 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1203 |
iState = ENSmlOpenAndWaiting; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1204 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1205 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1206 |
_DBG_FILE("CNSmlContactsDataStore::DoCloseItem(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1207 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1208 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1209 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1210 |
// void CNSmlContactsDataStore::DoMoveItemL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1211 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1212 |
EXPORT_C void CNSmlContactsDataStore::DoMoveItemL( TSmlDbItemUid aUid, TSmlDbItemUid /*aNewParent*/, TRequestStatus& aStatus ) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1213 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1214 |
_DBG_FILE("CNSmlContactsDataStore::DoMoveItemL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1215 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1216 |
iCallerStatus = &aStatus; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1217 |
*iCallerStatus = KRequestPending; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1218 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1219 |
if( iBatchMode ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1220 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1221 |
iModType = ENSmlCntItemMove; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1222 |
TInt fSize = 0; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1223 |
AddBufferListL( aUid, fSize, KErrNotSupported ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1224 |
User::RequestComplete( iCallerStatus, KErrNone ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1225 |
return; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1226 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1227 |
User::RequestComplete( iCallerStatus, KErrNotSupported ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1228 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1229 |
_DBG_FILE("CNSmlContactsDataStore::DoMoveItemL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1230 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1231 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1232 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1233 |
// void CNSmlContactsDataStore::DoDeleteItemL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1234 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1235 |
EXPORT_C void CNSmlContactsDataStore::DoDeleteItemL( TSmlDbItemUid aUid, TRequestStatus& aStatus ) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1236 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1237 |
_DBG_FILE("CNSmlContactsDataStore::DoDeleteItemL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1238 |
iCallerStatus = &aStatus; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1239 |
*iCallerStatus = KRequestPending; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1240 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1241 |
if( iBatchMode ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1242 |
{ |
25 | 1243 |
if(iContactViewBase ==NULL) |
1244 |
{ |
|
1245 |
CreateViewL(); |
|
1246 |
} |
|
1247 |
if( iModType != ENSmlCntItemSoftDelete ) // Treated like deletes |
|
1248 |
{ |
|
1249 |
iModType = ENSmlCntItemDelete; |
|
24
8e7494275d3a
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
1250 |
} |
25 | 1251 |
|
1252 |
TInt fSize = 0; |
|
1253 |
AddBufferListL( aUid, fSize, KErrNone ); |
|
1254 |
User::RequestComplete( iCallerStatus, KErrNone ); |
|
1255 |
return; |
|
1256 |
} |
|
1257 |
iUid = aUid; |
|
1258 |
||
1259 |
//add the contactlink to CVPbkContactLinkArray |
|
1260 |
MVPbkContactLink* contactLink = iIdConverter->IdentifierToLinkLC(aUid); |
|
1261 |
CleanupStack::Pop(); |
|
1262 |
CVPbkContactLinkArray* contactLnks = CVPbkContactLinkArray::NewLC(); |
|
1263 |
contactLnks->AppendL( contactLink ); |
|
1264 |
||
1265 |
iContactManager->DeleteContactsL( *contactLnks, *this ); |
|
1266 |
CleanupStack::PopAndDestroy(); |
|
1267 |
iLastOperation = ENSmlDeleteOp; |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1268 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1269 |
_DBG_FILE("CNSmlContactsDataStore::DoDeleteItemL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1270 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1271 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1272 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1273 |
// void CNSmlContactsDataStore::DoSoftDeleteItemL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1274 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1275 |
EXPORT_C void CNSmlContactsDataStore::DoSoftDeleteItemL( TSmlDbItemUid /*aUid*/, TRequestStatus& aStatus ) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1276 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1277 |
_DBG_FILE("CNSmlContactsDataStore::DoSoftDeleteItemL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1278 |
iCallerStatus = &aStatus; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1279 |
*iCallerStatus = KRequestPending; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1280 |
User::RequestComplete( iCallerStatus, KErrNotSupported ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1281 |
_DBG_FILE("CNSmlContactsDataStore::DoSoftDeleteItemL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1282 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1283 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1284 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1285 |
// void CNSmlContactsDataStore::DoDeleteAllItemsL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1286 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1287 |
EXPORT_C void CNSmlContactsDataStore::DoDeleteAllItemsL( TRequestStatus& aStatus ) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1288 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1289 |
_DBG_FILE("CNSmlContactsDataStore::DoDeleteAllItemsL(): begin"); |
25 | 1290 |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1291 |
iCallerStatus = &aStatus; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1292 |
*iCallerStatus = KRequestPending; |
25 | 1293 |
|
1294 |
//create view to get all the contactlinks to delete |
|
1295 |
if(iContactViewBase ==NULL) |
|
1296 |
{ |
|
1297 |
CreateViewL(); |
|
1298 |
} |
|
1299 |
||
1300 |
iLastOperation = ENSMLDeleteAllOp; |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1301 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1302 |
_DBG_FILE("CNSmlContactsDataStore::DoDeleteAllItemsL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1303 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1304 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1305 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1306 |
// TBool CNSmlContactsDataStore::DoHasSyncHistory() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1307 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1308 |
EXPORT_C TBool CNSmlContactsDataStore::DoHasSyncHistory() const |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1309 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1310 |
_DBG_FILE("CNSmlContactsDataStore::DoHasSyncHistory(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1311 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1312 |
TBool doHasSyncHistory = EFalse; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1313 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1314 |
if( !iOpened ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1315 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1316 |
_DBG_FILE("CNSmlContactsDataStore::DoHasSyncHistory(): NOT OPEN end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1317 |
return doHasSyncHistory; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1318 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1319 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1320 |
if( iSyncHistory ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1321 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1322 |
if ( iOpenedStoreId != iChangeFinder->DataStoreUid() ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1323 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1324 |
iChangeFinder->SetDataStoreUid( iOpenedStoreId ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1325 |
doHasSyncHistory = EFalse; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1326 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1327 |
else |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1328 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1329 |
doHasSyncHistory = ETrue; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1330 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1331 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1332 |
else |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1333 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1334 |
iChangeFinder->SetDataStoreUid( iOpenedStoreId ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1335 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1336 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1337 |
_DBG_FILE("CNSmlContactsDataStore::DoHasSyncHistory(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1338 |
return doHasSyncHistory; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1339 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1340 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1341 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1342 |
// void CNSmlContactsDataStore::DoAddedItems() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1343 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1344 |
EXPORT_C const MSmlDataItemUidSet& CNSmlContactsDataStore::DoAddedItems() const |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1345 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1346 |
_DBG_FILE("CNSmlContactsDataStore::DoAddedItems(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1347 |
if ( iState == ENSmlOpenAndWaiting ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1348 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1349 |
iNewUids->Reset(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1350 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1351 |
if( iChangeFinder ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1352 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1353 |
TRAPD( err,iChangeFinder->FindNewItemsL( *iNewUids ) ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1354 |
if( err != KErrNone ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1355 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1356 |
_DBG_FILE("CNSmlContactsDataStore::DoAddedItems(): LEAVE end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1357 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1358 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1359 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1360 |
_DBG_FILE("CNSmlContactsDataStore::DoAddedItems(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1361 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1362 |
return *iNewUids; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1363 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1364 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1365 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1366 |
// void CNSmlContactsDataStore::DoDeletedItems() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1367 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1368 |
EXPORT_C const MSmlDataItemUidSet& CNSmlContactsDataStore::DoDeletedItems() const |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1369 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1370 |
_DBG_FILE("CNSmlContactsDataStore::DoDeletedItems(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1371 |
if ( iState == ENSmlOpenAndWaiting ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1372 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1373 |
iDeletedUids->Reset(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1374 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1375 |
if( iChangeFinder ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1376 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1377 |
TRAPD(err,iChangeFinder->FindDeletedItemsL( *iDeletedUids ) ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1378 |
if( err != KErrNone ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1379 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1380 |
_DBG_FILE("CNSmlContactsDataStore::DoDeletedItems(): LEAVE end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1381 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1382 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1383 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1384 |
_DBG_FILE("CNSmlContactsDataStore::DoDeletedItems(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1385 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1386 |
return *iDeletedUids; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1387 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1388 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1389 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1390 |
// void CNSmlContactsDataStore::DoSoftDeletedItems() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1391 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1392 |
EXPORT_C const MSmlDataItemUidSet& CNSmlContactsDataStore::DoSoftDeletedItems() const |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1393 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1394 |
_DBG_FILE("CNSmlContactsDataStore::DoSoftDeletedItems(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1395 |
if ( iState == ENSmlOpenAndWaiting ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1396 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1397 |
iSoftDeletedUids->Reset(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1398 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1399 |
if( iChangeFinder ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1400 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1401 |
TRAPD( err, iChangeFinder->FindSoftDeletedItemsL( *iSoftDeletedUids ) ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1402 |
if( err != KErrNone ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1403 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1404 |
_DBG_FILE("CNSmlContactsDataStore::DoSoftDeletedItems(): LEAVE end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1405 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1406 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1407 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1408 |
_DBG_FILE("CNSmlContactsDataStore::DoSoftDeletedItems: END"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1409 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1410 |
return *iSoftDeletedUids; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1411 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1412 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1413 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1414 |
// void CNSmlContactsDataStore::DoModifiedItems() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1415 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1416 |
EXPORT_C const MSmlDataItemUidSet& CNSmlContactsDataStore::DoModifiedItems() const |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1417 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1418 |
_DBG_FILE("CNSmlContactsDataStore::DoModifiedItems(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1419 |
if ( iState == ENSmlOpenAndWaiting ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1420 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1421 |
iReplacedUids->Reset(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1422 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1423 |
if( iChangeFinder ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1424 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1425 |
TRAPD( err, iChangeFinder->FindChangedItemsL( *iReplacedUids ) ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1426 |
if( err != KErrNone ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1427 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1428 |
_DBG_FILE("CNSmlContactsDataStore::DoModifiedItems(): LEAVE end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1429 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1430 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1431 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1432 |
_DBG_FILE("CNSmlContactsDataStore::DoModifiedItems: END"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1433 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1434 |
return *iReplacedUids; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1435 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1436 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1437 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1438 |
// void CNSmlContactsDataStore::DoMovedItems() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1439 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1440 |
EXPORT_C const MSmlDataItemUidSet& CNSmlContactsDataStore::DoMovedItems() const |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1441 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1442 |
_DBG_FILE("CNSmlContactsDataStore::DoMovedItems(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1443 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1444 |
if ( iState == ENSmlOpenAndWaiting ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1445 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1446 |
iMovedUids->Reset(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1447 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1448 |
if( iChangeFinder ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1449 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1450 |
TRAPD( err, iChangeFinder->FindMovedItemsL( *iMovedUids ) ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1451 |
if( err != KErrNone ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1452 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1453 |
_DBG_FILE("CNSmlContactsDataStore::DoMovedItems(): LEAVE end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1454 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1455 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1456 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1457 |
_DBG_FILE("CNSmlContactsDataStore::DoMovedItems: END"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1458 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1459 |
return *iMovedUids; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1460 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1461 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1462 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1463 |
// void CNSmlContactsDataStore::DoResetChangeInfoL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1464 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1465 |
EXPORT_C void CNSmlContactsDataStore::DoResetChangeInfoL( TRequestStatus& aStatus ) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1466 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1467 |
_DBG_FILE("CNSmlContactsDataStore::DoResetChangeInfoL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1468 |
iCallerStatus = &aStatus; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1469 |
*iCallerStatus = KRequestPending; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1470 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1471 |
if( iChangeFinder ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1472 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1473 |
iChangeFinder->ResetL(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1474 |
} |
25 | 1475 |
|
1476 |
iSnapshotRegistered = EFalse; |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1477 |
|
25 | 1478 |
if ( iContactsModsFetcher ) |
1479 |
{ |
|
1480 |
iContactsModsFetcher->FetchModificationsL( aStatus ); |
|
1481 |
#ifdef __NSML_MODULETEST__ |
|
1482 |
CActiveScheduler::Start(); |
|
1483 |
#endif |
|
1484 |
} |
|
1485 |
else |
|
1486 |
{ |
|
1487 |
User::RequestComplete( iCallerStatus, KErrNone ); |
|
1488 |
} |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1489 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1490 |
_DBG_FILE("CNSmlContactsDataStore::DoResetChangeInfoL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1491 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1492 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1493 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1494 |
// void CNSmlContactsDataStore::DoCommitChangeInfoL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1495 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1496 |
EXPORT_C void CNSmlContactsDataStore::DoCommitChangeInfoL( TRequestStatus& aStatus, |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1497 |
const MSmlDataItemUidSet& aItems ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1498 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1499 |
_DBG_FILE("CNSmlContactsDataStore::DoCommitChangeInfoL(aItems): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1500 |
iCallerStatus = &aStatus; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1501 |
*iCallerStatus = KRequestPending; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1502 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1503 |
if( iChangeFinder ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1504 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1505 |
iChangeFinder->CommitChangesL( aItems ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1506 |
User::RequestComplete( iCallerStatus, KErrNone ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1507 |
return; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1508 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1509 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1510 |
User::RequestComplete( iCallerStatus, KErrNotReady ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1511 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1512 |
_DBG_FILE("CNSmlContactsDataStore::DoCommitChangeInfoL(aItems): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1513 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1514 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1515 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1516 |
// void CNSmlContactsDataStore::DoCommitChangeInfoL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1517 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1518 |
EXPORT_C void CNSmlContactsDataStore::DoCommitChangeInfoL( TRequestStatus& aStatus ) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1519 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1520 |
_DBG_FILE("CNSmlContactsDataStore::DoCommitChangeInfoL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1521 |
iCallerStatus = &aStatus; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1522 |
*iCallerStatus = KRequestPending; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1523 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1524 |
if( iChangeFinder ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1525 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1526 |
iChangeFinder->CommitChangesL(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1527 |
User::RequestComplete( iCallerStatus, KErrNone ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1528 |
return; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1529 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1530 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1531 |
User::RequestComplete( iCallerStatus, KErrNotReady ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1532 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1533 |
_DBG_FILE("CNSmlContactsDataStore::DoCommitChangeInfoL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1534 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1535 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1536 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1537 |
// CDesCArray* CNSmlContactsDataStore::DoListStoresLC() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1538 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1539 |
EXPORT_C CDesCArray* CNSmlContactsDataStore::DoListStoresLC() |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1540 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1541 |
_DBG_FILE("CNSmlContactsDataStore::DoListStoresLC(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1542 |
|
25 | 1543 |
MVPbkContactStoreList& storeList = iContactManager->ContactStoresL(); |
1544 |
CDesCArrayFlat* stores = new (ELeave) CDesCArrayFlat(storeList.Count()); |
|
1545 |
CleanupStack::PushL( stores ); |
|
1546 |
||
1547 |
TBuf<KVPbhkPrefixLength> phoneDataBasePrefix(KVPbhkSymbianDBPrefix); |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1548 |
|
25 | 1549 |
for(TInt i=0 ; i< storeList.Count(); i++) |
1550 |
{ |
|
1551 |
TBuf<KNSmlDefaultStoreNameMaxSize> currentStore(storeList.At(i).StoreProperties().Uri().UriDes()); |
|
1552 |
||
1553 |
if(currentStore.Find(phoneDataBasePrefix) == 0)//Check if Symbian Database |
|
1554 |
{ |
|
1555 |
//For backward compatability with local and remote servers |
|
1556 |
//The Symbian Db name remains unchanged |
|
1557 |
//The engine methods that create syncml packet, use this information in Database fields |
|
1558 |
stores->AppendL(*iPacketStoreName); |
|
1559 |
} |
|
1560 |
else//End Symbian Database check |
|
1561 |
{ |
|
1562 |
stores->AppendL(storeList.At(i).StoreProperties().Uri().UriDes()); |
|
1563 |
} |
|
1564 |
} |
|
1565 |
||
1566 |
_DBG_FILE("CNSmlContactsDataStore::DoListStoresLC(): end"); |
|
1567 |
||
1568 |
return stores; |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1569 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1570 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1571 |
// ------------------------------------------------------------------------------------------------ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1572 |
// TInt CNSmlContactsDataStore::LdoFetchItemL( TSmlDbItemUid& aUid, CBufBase& aItem ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1573 |
// ------------------------------------------------------------------------------------------------ |
25 | 1574 |
EXPORT_C void CNSmlContactsDataStore::LdoFetchItemL( TSmlDbItemUid& aUid, CBufBase& aItem ) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1575 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1576 |
_DBG_FILE("CNSmlContactsDataStore::LdoFetchItemL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1577 |
|
25 | 1578 |
iWriteStream.Open(aItem); |
1579 |
||
1580 |
MVPbkContactLink* contactLink = iIdConverter->IdentifierToLinkLC(aUid); |
|
1581 |
iVCardEngine->ExportVCardForSyncL(iWriteStream,*contactLink,*this); |
|
1582 |
CleanupStack::PopAndDestroy(); |
|
1583 |
||
1584 |
iLastOperation = ENSMLFetchOp; |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1585 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1586 |
_DBG_FILE("CNSmlContactsDataStore::LdoFetchItemL(): end"); |
25 | 1587 |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1588 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1589 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1590 |
// ------------------------------------------------------------------------------------------------ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1591 |
// TInt CNSmlContactsDataStore::LdoAddItemL( TSmlDbItemUid& aUid, |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1592 |
// const TDesC8& aItem, |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1593 |
// TInt aSize, |
25 | 1594 |
// TTime& aLastModified, |
1595 |
// TBool& aConfidential ) |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1596 |
// ------------------------------------------------------------------------------------------------ |
25 | 1597 |
EXPORT_C void CNSmlContactsDataStore::LdoAddItemL( const TDesC8& aItem, |
1598 |
TInt aSize) |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1599 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1600 |
_DBG_FILE("CNSmlContactsDataStore::LdoAddItemL(): begin"); |
25 | 1601 |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1602 |
if( !iOpened ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1603 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1604 |
User::Leave( KErrNotReady ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1605 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1606 |
|
25 | 1607 |
// Is there enough space on drive |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1608 |
if( DriveBelowCriticalLevelL( aSize ) ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1609 |
{ |
25 | 1610 |
User::Leave( KErrDiskFull ); |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1611 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1612 |
|
25 | 1613 |
iBuf = aItem.AllocLC(); |
1614 |
StripPropertyL( iBuf, KVersitTokenUID() ); |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1615 |
|
25 | 1616 |
iReadStream.Open( *iBuf ); |
1617 |
// import a vcard without checking for duplicates |
|
1618 |
iVCardEngine->ImportVCardForSyncL(*iStore,iReadStream,*this); |
|
1619 |
iLastOperation = ENSmlAddOp; |
|
1620 |
CleanupStack::Pop(iBuf); |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1621 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1622 |
_DBG_FILE("CNSmlContactsDataStore::LdoAddItemL(): end"); |
25 | 1623 |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1624 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1625 |
// ------------------------------------------------------------------------------------------------ |
25 | 1626 |
// TInt CNSmlContactsDataStore::LdoAddItemsL( CBufBase*& aItems, |
1627 |
// TInt aSize) |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1628 |
// ------------------------------------------------------------------------------------------------ |
25 | 1629 |
EXPORT_C void CNSmlContactsDataStore::LdoAddItemsL( CBufBase*& aItems, |
1630 |
TInt aSize) |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1631 |
{ |
25 | 1632 |
_DBG_FILE("CNSmlContactsDataStore::LdoAddItemL(): begin"); |
1633 |
||
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1634 |
if( !iOpened ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1635 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1636 |
User::Leave( KErrNotReady ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1637 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1638 |
|
25 | 1639 |
// Is there enough space on drive |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1640 |
if( DriveBelowCriticalLevelL( aSize ) ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1641 |
{ |
25 | 1642 |
User::Leave( KErrDiskFull ); |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1643 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1644 |
|
25 | 1645 |
iReadStream.Open( aItems->Ptr(0) ); |
1646 |
// import vcards without checking for duplicates |
|
1647 |
iVCardEngine->ImportVCardForSyncL(*iStore,iReadStream,*this); |
|
1648 |
iLastOperation = ENSmlAddOp; |
|
1649 |
_DBG_FILE("CNSmlContactsDataStore::LdoAddItemL(): end"); |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1650 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1651 |
} |
25 | 1652 |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1653 |
// ------------------------------------------------------------------------------------------------ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1654 |
// TInt CNSmlContactsDataStore::LdoUpdateItemL(TSmlDbItemUid aUid, |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1655 |
// const TDesC8& aItem, |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1656 |
// TInt aSize, |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1657 |
// TTime& aLastModified ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1658 |
// ------------------------------------------------------------------------------------------------ |
25 | 1659 |
EXPORT_C void CNSmlContactsDataStore::LdoUpdateItemL() |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1660 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1661 |
_DBG_FILE("CNSmlContactsDataStore::LdoUpdateItemL(): begin"); |
24
8e7494275d3a
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
12
diff
changeset
|
1662 |
|
25 | 1663 |
iBuf = iContactsBufferItemList[iIndex]->iItemData->Ptr(0).AllocLC(); |
1664 |
// Remove UID's from data |
|
1665 |
StripPropertyL( iBuf, KVersitTokenUID() ); |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1666 |
|
25 | 1667 |
iReadStream.Open( *iBuf ); |
1668 |
iContactLink = iIdConverter->IdentifierToLinkLC(iUid); |
|
1669 |
iVCardEngine->ImportVCardMergeL(*iContactLink, *iStore, iReadStream, *this); |
|
1670 |
||
1671 |
CleanupStack::Pop(); |
|
1672 |
iLastOperation = ENSMLUpdateImportOp; |
|
1673 |
CleanupStack::Pop(iBuf); |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1674 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1675 |
_DBG_FILE("CNSmlContactsDataStore::LdoUpdateItemL(): end"); |
25 | 1676 |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1677 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1678 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1679 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1680 |
// ------------------------------------------------------------------------------------------------ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1681 |
// CNSmlContactsDataStore::DriveBelowCriticalLevelL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1682 |
// ------------------------------------------------------------------------------------------------ |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1683 |
EXPORT_C TBool CNSmlContactsDataStore::DriveBelowCriticalLevelL( TInt aSize ) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1684 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1685 |
return SysUtil::DiskSpaceBelowCriticalLevelL( &iRfs, aSize, iDrive ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1686 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1687 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1688 |
// ---------------------------------------------------------------------------- |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1689 |
// CBufBase* CNSmlContactsDataStore::AddBufferListL() |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1690 |
// ---------------------------------------------------------------------------- |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1691 |
EXPORT_C CBufBase* CNSmlContactsDataStore::AddBufferListL( TSmlDbItemUid& aUid, TInt aSize, TInt aStatus ) |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1692 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1693 |
_DBG_FILE("CNSmlContactsDataStore::AddBufferListL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1694 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1695 |
CNSmlContactsBufferItem* newBufferItem = new (ELeave) CNSmlContactsBufferItem; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1696 |
CleanupStack::PushL( newBufferItem ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1697 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1698 |
if( iModType == ENSmlCntItemAdd ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1699 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1700 |
newBufferItem->iPUid = &aUid; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1701 |
newBufferItem->iItemData = CBufFlat::NewL( KNSmlItemDataExpandSize ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1702 |
newBufferItem->iStatus = KErrGeneral; // Default for add |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1703 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1704 |
else |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1705 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1706 |
newBufferItem->iPUid = &aUid; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1707 |
newBufferItem->iUid = aUid; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1708 |
newBufferItem->iItemData = CBufFlat::NewL( KNSmlItemDataExpandSize ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1709 |
newBufferItem->iStatus = KNSmlNoError; // Default if not handled |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1710 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1711 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1712 |
newBufferItem->iModType = iModType; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1713 |
newBufferItem->iMimeType = iMimeTypeItem.AllocL(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1714 |
newBufferItem->iMimeVersion = iMimeVersionItem.AllocL(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1715 |
newBufferItem->iSize = aSize; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1716 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1717 |
if( aStatus != KErrNone ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1718 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1719 |
newBufferItem->iStatus = aStatus; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1720 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1721 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1722 |
iContactsBufferItemList.AppendL( newBufferItem ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1723 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1724 |
iMimeTypeItem.Set( KNullDesC8 ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1725 |
iMimeVersionItem.Set( KNullDesC8 ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1726 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1727 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1728 |
CleanupStack::Pop(); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1729 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1730 |
if( iModType == ENSmlCntItemAdd && |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1731 |
aStatus == KErrNotSupported ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1732 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1733 |
iStateItem = KErrNotSupported; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1734 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1735 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1736 |
_DBG_FILE("CNSmlContactsDataStore::AddBufferListL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1737 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1738 |
return newBufferItem->iItemData; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1739 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1740 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1741 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1742 |
// ------------------------------------------------------------------------------------------------ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1743 |
// void CNSmlContactsDataStore::StripPropertyL( HBufC8*& aItem, const TDesC8& aProperty ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1744 |
// ------------------------------------------------------------------------------------------------ |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1745 |
EXPORT_C void CNSmlContactsDataStore::StripPropertyL( HBufC8*& aItem, const TDesC8& aProperty ) const |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1746 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1747 |
_DBG_FILE("CNSmlContactsDataStore::StripPropertyL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1748 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1749 |
if( !aItem ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1750 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1751 |
_DBG_FILE("CNSmlContactsDataStore::StripPropertyL(): NULL pointer"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1752 |
return; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1753 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1754 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1755 |
TPtr8 hItemPtr( aItem->Des() ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1756 |
HBufC8* propBuf = HBufC8::NewLC( aProperty.Length() + 2 ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1757 |
TPtr8 propPtr( propBuf->Des() ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1758 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1759 |
propPtr.Append( KVersitTokenCRLF() ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1760 |
propPtr.Append( aProperty ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1761 |
TInt propPos = hItemPtr.Find( propPtr ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1762 |
if( propPos != KErrNotFound ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1763 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1764 |
_DBG_FILE("CNSmlContactsDataStore::StripPropertyL(): property found in item data -> removing it"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1765 |
_DBG_FILE( aProperty.Ptr() ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1766 |
TPtrC8 propPosPtr( hItemPtr.Mid( propPos + KVersitTokenCRLF().Length() ) ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1767 |
TInt propEndPos = propPosPtr.Find( KVersitTokenCRLF() ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1768 |
hItemPtr.Delete( propPos, propEndPos + KVersitTokenCRLF().Length() ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1769 |
_DBG_FILE("CNSmlContactsDataStore::StripPropertyL(): property removed"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1770 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1771 |
CleanupStack::PopAndDestroy(); // propBuf |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1772 |
_DBG_FILE("CNSmlContactsDataStore::StripPropertyL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1773 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1774 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1775 |
// ------------------------------------------------------------------------------------------------ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1776 |
// void CNSmlContactsDataStore::StripPropertyL( CBufBase*& aItem, const TDesC8& aProperty ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1777 |
// ------------------------------------------------------------------------------------------------ |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
1778 |
EXPORT_C void CNSmlContactsDataStore::StripPropertyL( CBufBase*& aItem, const TDesC8& aProperty ) const |
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1779 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1780 |
_DBG_FILE("CNSmlContactsDataStore::StripPropertyL(): begin"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1781 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1782 |
if( !aItem ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1783 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1784 |
_DBG_FILE("CNSmlContactsDataStore::StripPropertyL(): NULL pointer"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1785 |
return; |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1786 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1787 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1788 |
HBufC8* propBuf = HBufC8::NewLC( aProperty.Length() + 2 ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1789 |
TPtr8 propPtr( propBuf->Des() ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1790 |
propPtr.Append( KVersitTokenCRLF() ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1791 |
propPtr.Append( aProperty ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1792 |
TInt propPos = aItem->Ptr(0).Find( propPtr ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1793 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1794 |
while( propPos != KErrNotFound ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1795 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1796 |
_DBG_FILE("CNSmlContactsDataStore::StripPropertyL(): property found in item data -> removing it"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1797 |
_DBG_FILE( aProperty.Ptr() ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1798 |
TInt propEndPos = aItem->Ptr( propPos + KVersitTokenCRLF().Length()).Find(KVersitTokenCRLF() ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1799 |
if( propEndPos != KErrNotFound ) |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1800 |
{ |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1801 |
aItem->Delete( propPos + KVersitTokenCRLF().Length(), propEndPos ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1802 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1803 |
|
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1804 |
propPos = aItem->Ptr(0).Find( propPtr ); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1805 |
_DBG_FILE("CNSmlContactsDataStore::StripPropertyL(): property removed"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1806 |
} |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1807 |
CleanupStack::PopAndDestroy(); // propBuf |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1808 |
_DBG_FILE("CNSmlContactsDataStore::StripPropertyL(): end"); |
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1809 |
} |
25 | 1810 |
|
1811 |
// ---------------------------------------------------------------------------- |
|
1812 |
// CNSmlContactsDataStore::IsConfidentialL |
|
1813 |
// ---------------------------------------------------------------------------- |
|
1814 |
// |
|
1815 |
EXPORT_C TBool CNSmlContactsDataStore::IsConfidentialL( MVPbkStoreContact& aItem ) |
|
1816 |
{ |
|
1817 |
_DBG_FILE("CNSmlContactsDataStore::IsConfidentialL(): begin"); |
|
1818 |
TBool ret( EFalse ); |
|
1819 |
||
1820 |
//find X-CLASS field type |
|
1821 |
const MVPbkFieldType* syncclass = |
|
1822 |
iContactManager->FieldTypes().Find(R_VPBK_FIELD_TYPE_SYNCCLASS ); |
|
1823 |
CVPbkBaseContactFieldTypeIterator* itr = |
|
1824 |
CVPbkBaseContactFieldTypeIterator::NewLC( *syncclass, |
|
1825 |
aItem.Fields() ); |
|
1826 |
while ( itr->HasNext() ) |
|
1827 |
{ |
|
1828 |
const MVPbkBaseContactField* field = itr->Next(); |
|
1829 |
const MVPbkContactFieldTextData& data = MVPbkContactFieldTextData::Cast(field->FieldData()); |
|
1830 |
TPtrC ptr = data.Text(); |
|
1831 |
//compare the sync type |
|
1832 |
if ( ptr.Compare( KNSmlContactSyncNoSync ) == 0 ) |
|
1833 |
{ |
|
1834 |
_DBG_FILE("CNSmlContactsDataStore::IsConfidentialL(): \ |
|
1835 |
find confidential"); |
|
1836 |
ret = ETrue; |
|
1837 |
} |
|
1838 |
||
1839 |
} |
|
1840 |
CleanupStack::PopAndDestroy( itr ); |
|
1841 |
||
1842 |
_DBG_FILE("CNSmlContactsDataStore::IsConfidentialL(): end"); |
|
1843 |
return ret; |
|
1844 |
} |
|
1845 |
||
1846 |
// ---------------------------------------------------------------------------- |
|
1847 |
// CNSmlContactsDataStore::ResetBuffer |
|
1848 |
// ---------------------------------------------------------------------------- |
|
1849 |
// |
|
1850 |
EXPORT_C void CNSmlContactsDataStore:: ResetBuffer() |
|
1851 |
{ |
|
1852 |
if( iItemDataAddBatch ) |
|
1853 |
{ |
|
1854 |
iItemDataAddBatch->Reset(); |
|
1855 |
} |
|
1856 |
iContactsBufferItemList.ResetAndDestroy(); |
|
1857 |
} |
|
1858 |
// ----------------------------------------------------------------------------- |
|
1859 |
// From MVPbkContactStoreListObserver |
|
1860 |
// Called when a contact store is ready to use. |
|
1861 |
// ----------------------------------------------------------------------------- |
|
1862 |
||
1863 |
EXPORT_C void CNSmlContactsDataStore::StoreReady( MVPbkContactStore& /*aContactStore*/ ) |
|
1864 |
{ |
|
1865 |
_DBG_FILE("CNSmlContactsDataStore::StoreReady(): begin"); |
|
1866 |
//The contact data base opened successfully |
|
1867 |
iOpened = ETrue; |
|
1868 |
//id to uniquely identify the opened store |
|
1869 |
iOpenedStoreId = DefaultHash::Des16( |
|
1870 |
iStore->StoreProperties().Uri().UriDes()); |
|
1871 |
||
1872 |
TRAPD(error, iContactsModsFetcher->FetchModificationsL( *iCallerStatus )); |
|
1873 |
if(error != KErrNone) |
|
1874 |
{ |
|
1875 |
User::RequestComplete( iCallerStatus, error ); |
|
1876 |
} |
|
1877 |
_DBG_FILE("CNSmlContactsDataStore::StoreReady(): end"); |
|
1878 |
} |
|
1879 |
||
1880 |
||
1881 |
// --------------------------------------------------------------------------- |
|
1882 |
// From MVPbkContactStoreListObserver |
|
1883 |
// Called when a contact store becomes unavailable. |
|
1884 |
// --------------------------------------------------------------------------- |
|
1885 |
// |
|
1886 |
EXPORT_C void CNSmlContactsDataStore::StoreUnavailable( |
|
1887 |
MVPbkContactStore& /*aContactStore*/, |
|
1888 |
TInt aReason ) |
|
1889 |
{ |
|
1890 |
_DBG_FILE("CNSmlContactsDataStore::StoreUnavailable(): begin"); |
|
1891 |
||
1892 |
//Unable open the default contact data base |
|
1893 |
iOpened = EFalse; |
|
1894 |
delete iStoreName; |
|
1895 |
iStoreName = NULL; |
|
1896 |
iOpenedStoreId = 0; |
|
1897 |
User::RequestComplete( iCallerStatus, aReason ); |
|
1898 |
_DBG_FILE("CNSmlContactsDataStore::StoreUnavailable(): end"); |
|
1899 |
return; |
|
1900 |
||
1901 |
} |
|
1902 |
||
1903 |
// --------------------------------------------------------------------------- |
|
1904 |
// From MVPbkContactStoreListObserver |
|
1905 |
// --------------------------------------------------------------------------- |
|
1906 |
// |
|
1907 |
EXPORT_C void CNSmlContactsDataStore::HandleStoreEventL( |
|
1908 |
MVPbkContactStore& /*aContactStore*/, |
|
1909 |
TVPbkContactStoreEvent /*aStoreEvent*/ ) |
|
1910 |
{ |
|
1911 |
//Indication not needed. |
|
1912 |
} |
|
1913 |
||
1914 |
// --------------------------------------------------------------------------- |
|
1915 |
// CNSmlContactsDataStore::VPbkSingleContactOperationComplete |
|
1916 |
// --------------------------------------------------------------------------- |
|
1917 |
// |
|
1918 |
EXPORT_C void CNSmlContactsDataStore::VPbkSingleContactOperationComplete( |
|
1919 |
MVPbkContactOperationBase& aOperation, |
|
1920 |
MVPbkStoreContact* aContact ) |
|
1921 |
{ |
|
1922 |
MVPbkContactOperationBase* operation = &aOperation; |
|
1923 |
if ( operation ) |
|
1924 |
{ |
|
1925 |
delete operation; |
|
1926 |
operation = NULL; |
|
1927 |
} |
|
1928 |
TRAPD(error ,SingleContactOperationCompleteL(aContact)); |
|
1929 |
delete aContact; |
|
1930 |
if(error!= KErrNone) |
|
1931 |
{ |
|
1932 |
User::RequestComplete( iCallerStatus, error ); |
|
1933 |
} |
|
1934 |
} |
|
1935 |
||
1936 |
// --------------------------------------------------------------------------- |
|
1937 |
// CNSmlContactsDataStore::VPbkSingleContactOperationFailed |
|
1938 |
// --------------------------------------------------------------------------- |
|
1939 |
// |
|
1940 |
EXPORT_C void CNSmlContactsDataStore::VPbkSingleContactOperationFailed( |
|
1941 |
MVPbkContactOperationBase& aOperation, |
|
1942 |
TInt aError ) |
|
1943 |
{ |
|
1944 |
MVPbkContactOperationBase* operation = &aOperation; |
|
1945 |
if ( operation ) |
|
1946 |
{ |
|
1947 |
delete operation; |
|
1948 |
operation = NULL; |
|
1949 |
} |
|
1950 |
||
1951 |
if(iLastOperation == ENSMLFetchOp) |
|
1952 |
{ |
|
1953 |
iWriteStream.Close(); |
|
1954 |
User::RequestComplete( iCallerStatus, aError ); |
|
1955 |
} |
|
1956 |
else if (iLastOperation == ENSMLUpdateExportOp) |
|
1957 |
{ |
|
1958 |
iWriteStream.Close(); |
|
1959 |
delete iMergeItem; |
|
1960 |
iMergeItem = NULL; |
|
1961 |
User::RequestComplete( iCallerStatus, aError ); |
|
1962 |
} |
|
1963 |
else if (iLastOperation == ENSMLUpdateImportOp) |
|
1964 |
{ |
|
1965 |
if(iBatchMode) |
|
1966 |
{ |
|
1967 |
iResultArray->Append( aError ); |
|
1968 |
} |
|
1969 |
delete iContactLink; |
|
1970 |
iContactLink = NULL; |
|
1971 |
delete iBuf; |
|
1972 |
iBuf = NULL; |
|
1973 |
iReadStream.Close(); |
|
1974 |
iIndex++; |
|
1975 |
if(iIndex == iContactsBufferItemList.Count() ) |
|
1976 |
{ |
|
1977 |
ResetBuffer(); |
|
1978 |
User::RequestComplete( iCallerStatus, aError ); |
|
1979 |
} |
|
1980 |
else |
|
1981 |
{ |
|
1982 |
_DBG_FILE("VPbkSingleContactOperationFailed, Continuing to complete the Batch Operation"); |
|
1983 |
ExecuteBufferL(); |
|
1984 |
} |
|
1985 |
} |
|
1986 |
else if(iLastOperation == ENSmlRetrieveOp) |
|
1987 |
{ |
|
1988 |
iRetrieveCount--; |
|
1989 |
if(iBatchMode) |
|
1990 |
{ |
|
1991 |
iResultArray->AppendL( aError ); |
|
1992 |
} |
|
1993 |
iIndex++; |
|
1994 |
if(iIndex == iContactsBufferItemList.Count() ) |
|
1995 |
{ |
|
1996 |
ResetBuffer(); |
|
1997 |
User::RequestComplete( iCallerStatus, aError ); |
|
1998 |
} |
|
1999 |
else if(!iRetrieveCount) |
|
2000 |
{ |
|
2001 |
_DBG_FILE("VPbkSingleContactOperationFailed, Continuing to complete the Batch Operation"); |
|
2002 |
ExecuteBufferL(); |
|
2003 |
} |
|
2004 |
} |
|
2005 |
else |
|
2006 |
{ |
|
2007 |
_DBG_FILE("VPbkSingleContactOperationFailed, No Matching LastOperation Completing the Operation"); |
|
2008 |
User::RequestComplete( iCallerStatus, aError ); |
|
2009 |
} |
|
2010 |
_DBG_FILE("CNSmlContactsDataStore::VPbkSingleContactOperationFailed(): end"); |
|
2011 |
} |
|
2012 |
// --------------------------------------------------------------------------- |
|
2013 |
// CNSmlContactsDataStore::VPbkSingleContactOperationFailed |
|
2014 |
// --------------------------------------------------------------------------- |
|
2015 |
// |
|
2016 |
EXPORT_C void CNSmlContactsDataStore::SingleContactOperationCompleteL( |
|
2017 |
MVPbkStoreContact* aContact) |
|
2018 |
{ |
|
2019 |
if(iLastOperation == ENSMLFetchOp) |
|
2020 |
{ |
|
2021 |
iWriteStream.Close(); |
|
2022 |
||
2023 |
iItemData->Compress(); |
|
2024 |
//strip the fields not supported by server |
|
2025 |
iDataMod->StripTxL( *iItemData ); |
|
2026 |
*iSize = iItemData->Size(); |
|
2027 |
iState = ENSmlItemOpen; |
|
2028 |
if ( iServerMaxObjectSize == 0 || *iSize <= iServerMaxObjectSize ) |
|
2029 |
{ |
|
2030 |
User::RequestComplete( iCallerStatus, KErrNone ); |
|
2031 |
} |
|
2032 |
else |
|
2033 |
{ |
|
2034 |
User::RequestComplete( iCallerStatus, KErrTooBig ); |
|
2035 |
} |
|
2036 |
} |
|
2037 |
else if (iLastOperation == ENSMLUpdateExportOp) |
|
2038 |
{ |
|
2039 |
iDataMod->MergeRxL( *iContactsBufferItemList[iIndex]->iItemData, |
|
2040 |
*iMergeItem, iFieldLevelReplace ); |
|
2041 |
iWriteStream.Close(); |
|
2042 |
delete iMergeItem; |
|
2043 |
iMergeItem = NULL; |
|
2044 |
LdoUpdateItemL(); |
|
2045 |
} |
|
2046 |
else if (iLastOperation == ENSMLUpdateImportOp) |
|
2047 |
{ |
|
2048 |
iFieldLevelReplace = EFalse; |
|
2049 |
||
2050 |
if(!IsConfidentialL(*aContact)) |
|
2051 |
{ |
|
2052 |
TInt32 id = iIdConverter->LinkToIdentifier(*aContact->CreateLinkLC()); |
|
2053 |
||
2054 |
TNSmlSnapshotItem item(id); |
|
2055 |
||
2056 |
MVPbkStoreContact2* tempContact = |
|
2057 |
reinterpret_cast<MVPbkStoreContact2*> (aContact->StoreContactExtension (KMVPbkStoreContactExtension2Uid)); |
|
2058 |
||
2059 |
MVPbkStoreContactProperties *contactProterties |
|
2060 |
= tempContact ->PropertiesL();; |
|
2061 |
CleanupDeletePushL(contactProterties); |
|
2062 |
item.SetLastChangedDate(contactProterties->LastModifiedL()); |
|
2063 |
CleanupStack::PopAndDestroy(); |
|
2064 |
||
2065 |
item.SetSoftDelete( EFalse ); |
|
2066 |
||
2067 |
TRAP_IGNORE(iChangeFinder->ItemUpdatedL( item )); |
|
2068 |
||
2069 |
CleanupStack::PopAndDestroy(); |
|
2070 |
if(iBatchMode) |
|
2071 |
{ |
|
2072 |
iResultArray->Append(KErrNone); |
|
2073 |
} |
|
2074 |
||
2075 |
delete iContactLink; |
|
2076 |
iContactLink = NULL; |
|
2077 |
||
2078 |
delete iBuf; |
|
2079 |
iBuf = NULL; |
|
2080 |
iReadStream.Close(); |
|
2081 |
||
2082 |
iIndex++; |
|
2083 |
if(iIndex == iContactsBufferItemList.Count() ) |
|
2084 |
{ |
|
2085 |
ResetBuffer(); |
|
2086 |
User::RequestComplete( iCallerStatus, iRetCommand ); |
|
2087 |
} |
|
2088 |
else |
|
2089 |
{ |
|
2090 |
ExecuteBufferL(); |
|
2091 |
} |
|
2092 |
} |
|
2093 |
||
2094 |
} |
|
2095 |
else if(iLastOperation == ENSmlRetrieveOp) |
|
2096 |
{ |
|
2097 |
iRetrieveCount--; |
|
2098 |
if(!IsConfidentialL(*aContact)) |
|
2099 |
{ |
|
2100 |
TInt32 id = iIdConverter->LinkToIdentifier(*aContact->CreateLinkLC()); |
|
2101 |
*iContactsBufferItemList[iIndex]->iPUid = id; |
|
2102 |
||
2103 |
TNSmlSnapshotItem item(id); |
|
2104 |
||
2105 |
MVPbkStoreContact2* tempContact = |
|
2106 |
reinterpret_cast<MVPbkStoreContact2*> (aContact->StoreContactExtension (KMVPbkStoreContactExtension2Uid)); |
|
2107 |
||
2108 |
MVPbkStoreContactProperties *contactProterties |
|
2109 |
= tempContact ->PropertiesL();; |
|
2110 |
CleanupDeletePushL(contactProterties); |
|
2111 |
item.SetLastChangedDate(contactProterties->LastModifiedL()); |
|
2112 |
CleanupStack::PopAndDestroy(); |
|
2113 |
||
2114 |
item.SetSoftDelete( EFalse ); |
|
2115 |
// Add the snapshot item to the Change Finder. |
|
2116 |
TRAP_IGNORE(iChangeFinder->ItemAddedL( item )); |
|
2117 |
||
2118 |
CleanupStack::PopAndDestroy(); |
|
2119 |
} |
|
2120 |
if(iBatchMode) |
|
2121 |
{ |
|
2122 |
iResultArray->AppendL(iRetCommand); |
|
2123 |
} |
|
2124 |
||
2125 |
iIndex++; |
|
2126 |
if(iIndex == iContactsBufferItemList.Count() ) |
|
2127 |
{ |
|
2128 |
ResetBuffer(); |
|
2129 |
User::RequestComplete( iCallerStatus, iRetCommand ); |
|
2130 |
} |
|
2131 |
else if(!iRetrieveCount) |
|
2132 |
{ |
|
2133 |
ExecuteBufferL(); |
|
2134 |
} |
|
2135 |
||
2136 |
} |
|
2137 |
} |
|
2138 |
// --------------------------------------------------------------------------- |
|
2139 |
// CNSmlContactsDataStore::ContactsSaved. |
|
2140 |
// --------------------------------------------------------------------------- |
|
2141 |
// |
|
2142 |
EXPORT_C void CNSmlContactsDataStore::ContactsSaved( |
|
2143 |
MVPbkContactOperationBase& aOperation, |
|
2144 |
MVPbkContactLinkArray* aResults ) |
|
2145 |
{ |
|
2146 |
MVPbkContactOperationBase* operation = &aOperation; |
|
2147 |
if ( operation ) |
|
2148 |
{ |
|
2149 |
delete operation; |
|
2150 |
operation = NULL; |
|
2151 |
} |
|
2152 |
||
2153 |
if(iLastOperation == ENSmlAddOp) |
|
2154 |
{ |
|
2155 |
//Count of contacts to be added from server to client |
|
2156 |
TInt cntAddCount( 0 ); |
|
2157 |
TInt i(iIndex); |
|
2158 |
while( i<iContactsBufferItemList.Count() ) |
|
2159 |
{ |
|
2160 |
if ( iContactsBufferItemList[i]->iModType == ENSmlCntItemAdd && |
|
2161 |
iContactsBufferItemList[i]->iStatus == KNSmlNoError ) |
|
2162 |
{ |
|
2163 |
cntAddCount++; |
|
2164 |
} |
|
2165 |
i++; |
|
2166 |
} |
|
2167 |
||
2168 |
//Count of contacts successfully added to client |
|
2169 |
iRetrieveCount = aResults->Count(); |
|
2170 |
||
2171 |
//Count of contacts which could not be added |
|
2172 |
TInt cntAddFailedCount(0); |
|
2173 |
cntAddFailedCount = cntAddCount-iRetrieveCount; |
|
2174 |
while(cntAddFailedCount > 0) |
|
2175 |
{ |
|
2176 |
iContactsBufferItemList[iIndex++]->iStatus = KErrGeneral; |
|
2177 |
iResultArray->Append(KErrGeneral); |
|
2178 |
cntAddFailedCount--; |
|
2179 |
} |
|
2180 |
||
2181 |
if ( aResults->Count() > 0 ) |
|
2182 |
{ |
|
2183 |
for(TInt i=0;i<aResults->Count();i++) |
|
2184 |
{ |
|
2185 |
//retrieve the contact |
|
2186 |
TRAPD(error,iContactManager->RetrieveContactL( aResults->At(i), *this )); |
|
2187 |
if(error != KErrNone) |
|
2188 |
{ |
|
2189 |
User::RequestComplete( iCallerStatus, error ); |
|
2190 |
} |
|
2191 |
iLastOperation = ENSmlRetrieveOp; |
|
2192 |
} |
|
2193 |
} |
|
2194 |
delete iBuf; |
|
2195 |
delete aResults; |
|
2196 |
iBuf = NULL; |
|
2197 |
iReadStream.Close(); |
|
2198 |
} |
|
2199 |
||
2200 |
} |
|
2201 |
||
2202 |
// --------------------------------------------------------------------------- |
|
2203 |
// CNSmlContactsDataStore::ContactsSavingFailed |
|
2204 |
// --------------------------------------------------------------------------- |
|
2205 |
// |
|
2206 |
EXPORT_C void CNSmlContactsDataStore::ContactsSavingFailed( |
|
2207 |
MVPbkContactOperationBase& aOperation, TInt aError ) |
|
2208 |
{ |
|
2209 |
MVPbkContactOperationBase* operation = &aOperation; |
|
2210 |
if ( operation ) |
|
2211 |
{ |
|
2212 |
delete operation; |
|
2213 |
operation = NULL; |
|
2214 |
} |
|
2215 |
||
2216 |
if(iLastOperation == ENSmlAddOp) |
|
2217 |
{ |
|
2218 |
if(iBatchMode) |
|
2219 |
{ |
|
2220 |
while( iIndex < iContactsBufferItemList.Count() && |
|
2221 |
iContactsBufferItemList[iIndex]->iModType == ENSmlCntItemAdd ) |
|
2222 |
{ |
|
2223 |
iContactsBufferItemList[iIndex++]->iStatus = KErrGeneral; |
|
2224 |
iResultArray->Append(KErrGeneral); |
|
2225 |
} |
|
2226 |
} |
|
2227 |
else |
|
2228 |
{ |
|
2229 |
iIndex++; |
|
2230 |
} |
|
2231 |
||
2232 |
if(iIndex == iContactsBufferItemList.Count()) |
|
2233 |
{ |
|
2234 |
User::RequestComplete( iCallerStatus, aError ); |
|
2235 |
ResetBuffer(); |
|
2236 |
delete iBuf; |
|
2237 |
iBuf = NULL; |
|
2238 |
iReadStream.Close(); |
|
2239 |
} |
|
2240 |
//Execute the remaining commands in batch |
|
2241 |
else |
|
2242 |
{ |
|
2243 |
TRAPD(error,ExecuteBufferL()); |
|
2244 |
if(error != KErrNone) |
|
2245 |
{ |
|
2246 |
User::RequestComplete( iCallerStatus, error ); |
|
2247 |
} |
|
2248 |
} |
|
2249 |
} |
|
2250 |
} |
|
2251 |
// --------------------------------------------------------------------------- |
|
2252 |
// CNSmlContactsDataStore::StepComplete |
|
2253 |
// --------------------------------------------------------------------------- |
|
2254 |
// |
|
2255 |
EXPORT_C void CNSmlContactsDataStore::StepComplete( |
|
2256 |
MVPbkContactOperationBase& /*aOperation*/, |
|
2257 |
TInt aStepSize ) |
|
2258 |
{ |
|
2259 |
if(iLastOperation == ENSmlDeleteOp) |
|
2260 |
{ |
|
2261 |
if(iBatchMode) |
|
2262 |
{ |
|
2263 |
for(TInt i = 0 ; i<aStepSize && iIndex < iContactsBufferItemList.Count() ;i++) |
|
2264 |
{ |
|
2265 |
iResultArray->Append(KErrNone); |
|
2266 |
if( iContactsBufferItemList[iIndex]->iModType == ENSmlCntItemDelete && |
|
2267 |
iContactsBufferItemList[iIndex]->iStatus == KNSmlNoError ) |
|
2268 |
{ |
|
2269 |
iContactsBufferItemList[iIndex]->iStatus = KErrNone; |
|
2270 |
iUid = iContactsBufferItemList[iIndex]->iUid; |
|
2271 |
iChangeFinder->ItemDeleted( TNSmlSnapshotItem( iUid )); |
|
2272 |
} |
|
2273 |
else if( iContactsBufferItemList[iIndex]->iModType == ENSmlCntItemSoftDelete && |
|
2274 |
iContactsBufferItemList[iIndex]->iStatus == KNSmlNoError ) |
|
2275 |
{ |
|
2276 |
||
2277 |
iContactsBufferItemList[iIndex]->iStatus = KErrNone; |
|
2278 |
iUid = iContactsBufferItemList[iIndex]->iUid; |
|
2279 |
TRAP_IGNORE(iChangeFinder->ItemSoftDeletedL( TNSmlSnapshotItem( iUid ) )); |
|
2280 |
} |
|
2281 |
iIndex++; |
|
2282 |
} |
|
2283 |
} |
|
2284 |
else |
|
2285 |
{ |
|
2286 |
iChangeFinder->ItemDeleted( TNSmlSnapshotItem( iUid ) ); |
|
2287 |
User::RequestComplete( iCallerStatus, KErrNone ); |
|
2288 |
} |
|
2289 |
} |
|
2290 |
} |
|
2291 |
// --------------------------------------------------------------------------- |
|
2292 |
// CNSmlContactsDataStore::StepFailed |
|
2293 |
// --------------------------------------------------------------------------- |
|
2294 |
// |
|
2295 |
EXPORT_C TBool CNSmlContactsDataStore::StepFailed( |
|
2296 |
MVPbkContactOperationBase& /*aOperation*/, |
|
2297 |
TInt /*aStepSize*/, |
|
2298 |
TInt aError ) |
|
2299 |
{ |
|
2300 |
if(iLastOperation == ENSmlDeleteOp) |
|
2301 |
{ |
|
2302 |
if(iBatchMode) |
|
2303 |
{ |
|
2304 |
if( iIndex < iContactsBufferItemList.Count() && |
|
2305 |
iContactsBufferItemList[iIndex]->iModType == ENSmlCntItemDelete ) |
|
2306 |
{ |
|
2307 |
iContactsBufferItemList[iIndex++]->iStatus = KErrGeneral; |
|
2308 |
iResultArray->Append(KErrGeneral); |
|
2309 |
} |
|
2310 |
||
2311 |
} |
|
2312 |
else |
|
2313 |
{ |
|
2314 |
User::RequestComplete( iCallerStatus, aError ); |
|
2315 |
} |
|
2316 |
} |
|
2317 |
return ETrue; |
|
2318 |
} |
|
2319 |
// --------------------------------------------------------------------------- |
|
2320 |
// CNSmlContactsDataStore::OperationComplete |
|
2321 |
// --------------------------------------------------------------------------- |
|
2322 |
// |
|
2323 |
EXPORT_C void CNSmlContactsDataStore::OperationComplete |
|
2324 |
( MVPbkContactOperationBase& aOperation ) |
|
2325 |
{ |
|
2326 |
MVPbkContactOperationBase* operation = &aOperation; |
|
2327 |
if ( operation ) |
|
2328 |
{ |
|
2329 |
delete operation; |
|
2330 |
operation = NULL; |
|
2331 |
} |
|
2332 |
||
2333 |
TRAPD(error ,OperationCompleteL()); |
|
2334 |
if(error != KErrNone) |
|
2335 |
{ |
|
2336 |
User::RequestComplete( iCallerStatus, error ); |
|
2337 |
} |
|
2338 |
} |
|
2339 |
||
2340 |
// --------------------------------------------------------------------------- |
|
2341 |
// CNSmlContactsDataStore::OperationCompleteL |
|
2342 |
// --------------------------------------------------------------------------- |
|
2343 |
// |
|
2344 |
EXPORT_C void CNSmlContactsDataStore::OperationCompleteL() |
|
2345 |
{ |
|
2346 |
if(iLastOperation == ENSmlDeleteOp) |
|
2347 |
{ |
|
2348 |
if(iBatchMode ) |
|
2349 |
{ |
|
2350 |
if(iResultArray->Count() != iContactsBufferItemList.Count()) |
|
2351 |
{ |
|
2352 |
while( iIndex < iContactsBufferItemList.Count() && |
|
2353 |
iContactsBufferItemList[iIndex]->iModType == ENSmlCntItemDelete |
|
2354 |
&& iContactsBufferItemList[iIndex]->iStatus == KErrNotFound ) |
|
2355 |
{ |
|
2356 |
iResultArray->Append(KErrNotFound); |
|
2357 |
iIndex++; |
|
2358 |
} |
|
2359 |
} |
|
2360 |
||
2361 |
if(iIndex == iContactsBufferItemList.Count()) |
|
2362 |
{ |
|
2363 |
if(iItemData) |
|
2364 |
{ |
|
2365 |
iItemData->Reset(); |
|
2366 |
} |
|
2367 |
||
2368 |
ResetBuffer(); |
|
2369 |
User::RequestComplete( iCallerStatus, KErrNone ); |
|
2370 |
} |
|
2371 |
else |
|
2372 |
{ |
|
2373 |
ExecuteBufferL(); |
|
2374 |
} |
|
2375 |
} |
|
2376 |
else |
|
2377 |
{ |
|
2378 |
||
2379 |
if(iItemData) |
|
2380 |
{ |
|
2381 |
iItemData->Reset(); |
|
2382 |
} |
|
2383 |
||
2384 |
ResetBuffer(); |
|
2385 |
} |
|
2386 |
} |
|
2387 |
else |
|
2388 |
{ |
|
2389 |
if(iLastOperation == ENSMLDeleteAllOp) |
|
2390 |
{ |
|
2391 |
iDeleteAllOperation = NULL; |
|
2392 |
} |
|
2393 |
if( iChangeFinder ) |
|
2394 |
{ |
|
2395 |
iChangeFinder->ResetL(); |
|
2396 |
} |
|
2397 |
iSnapshotRegistered = EFalse; |
|
2398 |
||
2399 |
delete iContactLnks; |
|
2400 |
iContactLnks = NULL; |
|
2401 |
iContactLink = NULL; |
|
2402 |
||
2403 |
delete iContactViewBase; |
|
2404 |
iContactViewBase = NULL; |
|
2405 |
User::RequestComplete( iCallerStatus, KErrNone ); |
|
2406 |
||
2407 |
} |
|
2408 |
||
2409 |
} |
|
2410 |
||
2411 |
// --------------------------------------------------------------------------- |
|
2412 |
// CNSmlContactsDataStore::ContactViewReady |
|
2413 |
// Implements the view ready function of MVPbkContactViewObserver |
|
2414 |
// --------------------------------------------------------------------------- |
|
2415 |
EXPORT_C void CNSmlContactsDataStore::ContactViewReady( |
|
2416 |
MVPbkContactViewBase& /*aView*/ ) |
|
2417 |
{ |
|
2418 |
if(iLastOperation == ENSMLDeleteAllOp) |
|
2419 |
{ |
|
2420 |
TRAPD(error,DoDeleteAllContactsL()); |
|
2421 |
if(error != KErrNone) |
|
2422 |
{ |
|
2423 |
User::RequestComplete( iCallerStatus, error ); |
|
2424 |
} |
|
2425 |
} |
|
2426 |
} |
|
2427 |
// --------------------------------------------------------------------------- |
|
2428 |
// CNSmlContactsDataStore::PrepareForContactsDeleteL() |
|
2429 |
// Delete all the contacts at client |
|
2430 |
// --------------------------------------------------------------------------- |
|
2431 |
EXPORT_C void CNSmlContactsDataStore::DoDeleteAllContactsL() |
|
2432 |
{ |
|
2433 |
iContactLnks = CVPbkContactLinkArray::NewL(); |
|
2434 |
TInt contactCount = iContactViewBase->ContactCountL(); |
|
2435 |
//add all the contact links to ContactLinkArray |
|
2436 |
for( TInt i = 0; i < contactCount; i++ ) |
|
2437 |
{ |
|
2438 |
const MVPbkViewContact& contact = |
|
2439 |
iContactViewBase->ContactAtL(i); |
|
2440 |
iContactLink = contact.CreateLinkLC(); |
|
2441 |
iContactLnks->AppendL(iContactLink); |
|
2442 |
CleanupStack::Pop(); |
|
2443 |
} |
|
2444 |
||
2445 |
iDeleteAllOperation = iContactManager->DeleteContactsL( *iContactLnks, *this ); |
|
2446 |
||
2447 |
} |
|
2448 |
||
2449 |
// --------------------------------------------------------------------------- |
|
2450 |
// CNSmlContactsDataStore::ContactViewUnavailable |
|
2451 |
// Implements the view unavailable function of MVPbkContactViewObserver |
|
2452 |
// --------------------------------------------------------------------------- |
|
2453 |
EXPORT_C void CNSmlContactsDataStore::ContactViewUnavailable( |
|
2454 |
MVPbkContactViewBase& /*aView*/ ) |
|
2455 |
{ |
|
2456 |
||
2457 |
} |
|
2458 |
||
2459 |
// --------------------------------------------------------------------------- |
|
2460 |
// CNSmlContactsDataStore::ContactAddedToView |
|
2461 |
// Implements the add contact function of MVPbkContactViewObserver |
|
2462 |
// --------------------------------------------------------------------------- |
|
2463 |
EXPORT_C void CNSmlContactsDataStore::ContactAddedToView( |
|
2464 |
MVPbkContactViewBase& /*aView*/, |
|
2465 |
TInt /*aIndex*/, |
|
2466 |
const MVPbkContactLink& /*aContactLink*/ ) |
|
2467 |
{ |
|
2468 |
} |
|
2469 |
||
2470 |
// --------------------------------------------------------------------------- |
|
2471 |
// CNSmlContactsDataStore::ContactRemovedFromView |
|
2472 |
// Implements the remove contact function of MVPbkContactViewObserver |
|
2473 |
// --------------------------------------------------------------------------- |
|
2474 |
EXPORT_C void CNSmlContactsDataStore::ContactRemovedFromView( |
|
2475 |
MVPbkContactViewBase& /*aView*/, |
|
2476 |
TInt /*aIndex*/, |
|
2477 |
const MVPbkContactLink& /*aContactLink*/ ) |
|
2478 |
{ |
|
2479 |
} |
|
2480 |
||
2481 |
// --------------------------------------------------------------------------- |
|
2482 |
// CNSmlContactsDataStore::ContactViewError |
|
2483 |
// Implements the view error function of MVPbkContactViewObserver |
|
2484 |
// --------------------------------------------------------------------------- |
|
2485 |
EXPORT_C void CNSmlContactsDataStore::ContactViewError( |
|
2486 |
MVPbkContactViewBase& /*aView*/, |
|
2487 |
TInt /*aError*/, |
|
2488 |
TBool /*aErrorNotified*/ ) |
|
2489 |
{ |
|
2490 |
||
2491 |
} |
|
2492 |
||
2493 |
// ----------------------------------------------------------------------------- |
|
2494 |
// CNSmlContactsDataStore::CreateViewL() |
|
2495 |
// Create a contact view |
|
2496 |
// ----------------------------------------------------------------------------- |
|
2497 |
EXPORT_C void CNSmlContactsDataStore::CreateViewL() |
|
2498 |
{ |
|
2499 |
||
2500 |
CVPbkContactViewDefinition* viewDef = CVPbkContactViewDefinition::NewL(); |
|
2501 |
CleanupStack::PushL( viewDef ); |
|
2502 |
viewDef->SetType( EVPbkContactsView ); |
|
2503 |
||
2504 |
viewDef->SetUriL(iStore->StoreProperties().Uri().UriDes()); |
|
2505 |
||
2506 |
iContactViewBase = iContactManager->CreateContactViewLC( |
|
2507 |
*this, |
|
2508 |
*viewDef, |
|
2509 |
iContactManager->FieldTypes() ); |
|
2510 |
CleanupStack::Pop(); |
|
2511 |
CleanupStack::PopAndDestroy(viewDef); |
|
2512 |
} |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2513 |
|
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2514 |
// ------------------------------------------------------------------------------------------------ |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2515 |
// CNSmlContactsDataStore::GetStoreFormatResourceFileL |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2516 |
// ------------------------------------------------------------------------------------------------ |
25 | 2517 |
EXPORT_C const TDesC& CNSmlContactsDataStore::GetStoreFormatResourceFileL() |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2518 |
{ |
25 | 2519 |
_DBG_FILE("CNSmlContactsDataStore::GetStoreFormatResourceFileL(): begin"); |
2520 |
||
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2521 |
// Check correct Data Sync protocol |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2522 |
TInt value( EDataSyncNotRunning ); |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2523 |
TInt error = RProperty::Get( KPSUidDataSynchronizationInternalKeys, |
25 | 2524 |
KDataSyncStatus, value ); |
2525 |
if ( error == KErrNone && |
|
2526 |
value == EDataSyncRunning ) |
|
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2527 |
{ |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2528 |
return KNSmlContactsStoreFormatRsc_1_1_2; |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2529 |
} |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2530 |
else // error or protocol version 1.2 |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2531 |
{ |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2532 |
return KNSmlContactsStoreFormatRsc_1_2; |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2533 |
} |
25 | 2534 |
_DBG_FILE("CNSmlContactsDataStore::GetStoreFormatResourceFileL(): end"); |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2535 |
} |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2536 |
|
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2537 |
// ------------------------------------------------------------------------------------------------ |
25 | 2538 |
// CNSmlContactsDataStore::CreateModsFetcherL |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2539 |
// ------------------------------------------------------------------------------------------------ |
25 | 2540 |
EXPORT_C MContactsModsFetcher* CNSmlContactsDataStore::CreateModsFetcherL() |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2541 |
{ |
25 | 2542 |
_DBG_FILE("CNSmlContactsDataStore::CreateModsFetcherL(): begin"); |
2543 |
CNSmlContactsModsFetcher* modsFetcher = |
|
2544 |
new ( ELeave ) CNSmlContactsModsFetcher( iSnapshotRegistered, |
|
2545 |
*iContactManager,*iStore, iKey, *iChangeFinder ); |
|
2546 |
CleanupStack::PushL( modsFetcher ); |
|
2547 |
modsFetcher->ConstructL(); |
|
2548 |
CleanupStack::Pop( modsFetcher ); |
|
2549 |
_DBG_FILE("CNSmlContactsDataStore::CreateModsFetcherL(): end"); |
|
2550 |
return modsFetcher; |
|
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2551 |
} |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2552 |
|
25 | 2553 |
// ------------------------------------------------------------------------------------------------ |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2554 |
// CNSmlContactsDataStore::GetDataMod |
25 | 2555 |
// ------------------------------------------------------------------------------------------------ |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2556 |
EXPORT_C CNSmlDataModBase& CNSmlContactsDataStore::GetDataMod() |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2557 |
{ |
25 | 2558 |
_DBG_FILE("CNSmlContactsDataStore::GetDataMod()"); |
10
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2559 |
return *iDataMod; |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2560 |
} |
b922b9936679
Revision: 201007
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
8
diff
changeset
|
2561 |
|
0
dab8a81a92de
Revision: 200948
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2562 |
// End of File |