epoc32/include/syncml/SmlDataSyncDefs.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description: For adding content to be synchronized.
    15 *
    16 */
    17 
    18 #ifndef __SMLDATASYNCDEFS_H__
    19 #define __SMLDATASYNCDEFS_H__
    20 //
    21 #include <e32std.h>
    22 //
    23 class RReadStream;
    24 class RWriteStream;
    25 //
    26 
    27 /**
    28 TSmlDbItemUid is the unique ID of an item in a data store
    29 
    30 @publishedPartner
    31 @released
    32 */
    33 typedef TInt TSmlDbItemUid;
    34 
    35 /**
    36 KNullDataItemId is a null value of a Data Item ID, no item may have this ID.
    37 
    38 @publishedPartner
    39 @released
    40 */
    41 const TSmlDbItemUid KNullDataItemId = KMinTInt;
    42 
    43 /**
    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.
    46 
    47 @publishedPartner
    48 @released
    49 */
    50 typedef TUint32 TSmlSyncTaskKey;
    51 
    52 
    53 class MSmlSyncRelationship
    54 	/**
    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.
    61 
    62 	@publishedPartner
    63 	@released
    64 	*/
    65 	{
    66 	public:
    67 		/**
    68 		Returns the unique identifier for the synchronisation relationship.
    69 
    70 		@return				A unique identifier for the sync relationship.
    71 		*/
    72 		virtual TSmlSyncTaskKey SyncTaskKey() const = 0;
    73 		/**
    74 		Opens a specified stream for reading, and places an item on the cleanup stack to close it.
    75 
    76 		@param				 aReadStream	On return, an open read stream
    77 		@param				 aStreamUid		The UID of the stream to open for reading.
    78 		*/
    79 		virtual void OpenReadStreamLC(RReadStream& aReadStream, TUid aStreamUid) = 0;
    80 		/**
    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.
    82 
    83 		@param				aWriteStream	On return, an open write stream
    84 		@param				aStreamUid		The UID of the stream to open or create
    85 		*/
    86 		virtual void OpenWriteStreamLC(RWriteStream& aWriteStream, TUid aStreamUid) = 0;
    87 		/**
    88 		Tests if the specified stream identified exists in the store.
    89 
    90 		@param				aStreamUid The stream UID
    91 		@return				Non-zero if the stream exists, otherwise EFalse.
    92 		*/
    93 		virtual TBool IsStreamPresentL(TUid aStreamUid) const = 0 ;
    94 	};
    95 
    96 
    97 
    98 
    99 
   100 ///////////////////////////////////////////////////////////////////////////////
   101 ///////////////////////////////////////////////////////////////////////////////
   102 ///////////////////////////////////////////////////////////////////////////////
   103 #endif