2 * Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: For adding content to be synchronized.
18 #ifndef __SMLDATASYNCDEFS_H__
19 #define __SMLDATASYNCDEFS_H__
28 TSmlDbItemUid is the unique ID of an item in a data store
33 typedef TInt TSmlDbItemUid;
36 KNullDataItemId is a null value of a Data Item ID, no item may have this ID.
41 const TSmlDbItemUid KNullDataItemId = KMinTInt;
44 TSmlSyncTaskKey uniquely identifies a sync relationship between a local and remote data store.
45 It should be used by Data Providers to resolve change information for a sync.
50 typedef TUint32 TSmlSyncTaskKey;
53 class MSmlSyncRelationship
55 SyncML store interface exposed to Database Adaptor implementations.
56 This interface may be used by a DBA to store change information for a Data Store, in the context
57 of a sync relationship with a remote Data Store.
58 It is vital for correct synchronisation behaviour that change information is stored separately for
59 different remote Data Stores. This interface facilitates this by providing streams that are stored
60 against specific Sync Tasks, and a unique key that identifies the sync relationship.
68 Returns the unique identifier for the synchronisation relationship.
70 @return A unique identifier for the sync relationship.
72 virtual TSmlSyncTaskKey SyncTaskKey() const = 0;
74 Opens a specified stream for reading, and places an item on the cleanup stack to close it.
76 @param aReadStream On return, an open read stream
77 @param aStreamUid The UID of the stream to open for reading.
79 virtual void OpenReadStreamLC(RReadStream& aReadStream, TUid aStreamUid) = 0;
81 Opens the specified stream, or creates a new one if it does not exist, and places an item on the cleanup stack to close it.
83 @param aWriteStream On return, an open write stream
84 @param aStreamUid The UID of the stream to open or create
86 virtual void OpenWriteStreamLC(RWriteStream& aWriteStream, TUid aStreamUid) = 0;
88 Tests if the specified stream identified exists in the store.
90 @param aStreamUid The stream UID
91 @return Non-zero if the stream exists, otherwise EFalse.
93 virtual TBool IsStreamPresentL(TUid aStreamUid) const = 0 ;
100 ///////////////////////////////////////////////////////////////////////////////
101 ///////////////////////////////////////////////////////////////////////////////
102 ///////////////////////////////////////////////////////////////////////////////