epoc32/include/syncml/SmlDataSyncDefs.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/syncml/SmlDataSyncDefs.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,103 @@
     1.4 +/*
     1.5 +* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). 
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: For adding content to be synchronized.
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +#ifndef __SMLDATASYNCDEFS_H__
    1.22 +#define __SMLDATASYNCDEFS_H__
    1.23 +//
    1.24 +#include <e32std.h>
    1.25 +//
    1.26 +class RReadStream;
    1.27 +class RWriteStream;
    1.28 +//
    1.29 +
    1.30 +/**
    1.31 +TSmlDbItemUid is the unique ID of an item in a data store
    1.32 +
    1.33 +@publishedPartner
    1.34 +@released
    1.35 +*/
    1.36 +typedef TInt TSmlDbItemUid;
    1.37 +
    1.38 +/**
    1.39 +KNullDataItemId is a null value of a Data Item ID, no item may have this ID.
    1.40 +
    1.41 +@publishedPartner
    1.42 +@released
    1.43 +*/
    1.44 +const TSmlDbItemUid KNullDataItemId = KMinTInt;
    1.45 +
    1.46 +/**
    1.47 +TSmlSyncTaskKey uniquely identifies a sync relationship between a local and remote data store.
    1.48 +It should be used by Data Providers to resolve change information for a sync.
    1.49 +
    1.50 +@publishedPartner
    1.51 +@released
    1.52 +*/
    1.53 +typedef TUint32 TSmlSyncTaskKey;
    1.54 +
    1.55 +
    1.56 +class MSmlSyncRelationship
    1.57 +	/**
    1.58 +	SyncML store interface exposed to Database Adaptor implementations.
    1.59 +	This interface may be used by a DBA to store change information for a Data Store, in the context
    1.60 +	of a sync relationship with a remote Data Store.
    1.61 +	It is vital for correct synchronisation behaviour that change information is stored separately for
    1.62 +	different remote Data Stores. This interface facilitates this by providing streams that are stored
    1.63 +	against specific Sync Tasks, and a unique key that identifies the sync relationship.
    1.64 +
    1.65 +	@publishedPartner
    1.66 +	@released
    1.67 +	*/
    1.68 +	{
    1.69 +	public:
    1.70 +		/**
    1.71 +		Returns the unique identifier for the synchronisation relationship.
    1.72 +
    1.73 +		@return				A unique identifier for the sync relationship.
    1.74 +		*/
    1.75 +		virtual TSmlSyncTaskKey SyncTaskKey() const = 0;
    1.76 +		/**
    1.77 +		Opens a specified stream for reading, and places an item on the cleanup stack to close it.
    1.78 +
    1.79 +		@param				 aReadStream	On return, an open read stream
    1.80 +		@param				 aStreamUid		The UID of the stream to open for reading.
    1.81 +		*/
    1.82 +		virtual void OpenReadStreamLC(RReadStream& aReadStream, TUid aStreamUid) = 0;
    1.83 +		/**
    1.84 +		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.
    1.85 +
    1.86 +		@param				aWriteStream	On return, an open write stream
    1.87 +		@param				aStreamUid		The UID of the stream to open or create
    1.88 +		*/
    1.89 +		virtual void OpenWriteStreamLC(RWriteStream& aWriteStream, TUid aStreamUid) = 0;
    1.90 +		/**
    1.91 +		Tests if the specified stream identified exists in the store.
    1.92 +
    1.93 +		@param				aStreamUid The stream UID
    1.94 +		@return				Non-zero if the stream exists, otherwise EFalse.
    1.95 +		*/
    1.96 +		virtual TBool IsStreamPresentL(TUid aStreamUid) const = 0 ;
    1.97 +	};
    1.98 +
    1.99 +
   1.100 +
   1.101 +
   1.102 +
   1.103 +///////////////////////////////////////////////////////////////////////////////
   1.104 +///////////////////////////////////////////////////////////////////////////////
   1.105 +///////////////////////////////////////////////////////////////////////////////
   1.106 +#endif