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.
williamr@4
     1
/*
williamr@4
     2
* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). 
williamr@4
     3
* All rights reserved.
williamr@4
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@4
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@4
     8
*
williamr@4
     9
* Initial Contributors:
williamr@4
    10
* Nokia Corporation - initial contribution.
williamr@4
    11
*
williamr@4
    12
* Contributors:
williamr@4
    13
*
williamr@4
    14
* Description: For adding content to be synchronized.
williamr@4
    15
*
williamr@4
    16
*/
williamr@4
    17
williamr@4
    18
#ifndef __SMLDATASYNCDEFS_H__
williamr@4
    19
#define __SMLDATASYNCDEFS_H__
williamr@4
    20
//
williamr@4
    21
#include <e32std.h>
williamr@4
    22
//
williamr@4
    23
class RReadStream;
williamr@4
    24
class RWriteStream;
williamr@4
    25
//
williamr@4
    26
williamr@4
    27
/**
williamr@4
    28
TSmlDbItemUid is the unique ID of an item in a data store
williamr@4
    29
williamr@4
    30
@publishedPartner
williamr@4
    31
@released
williamr@4
    32
*/
williamr@4
    33
typedef TInt TSmlDbItemUid;
williamr@4
    34
williamr@4
    35
/**
williamr@4
    36
KNullDataItemId is a null value of a Data Item ID, no item may have this ID.
williamr@4
    37
williamr@4
    38
@publishedPartner
williamr@4
    39
@released
williamr@4
    40
*/
williamr@4
    41
const TSmlDbItemUid KNullDataItemId = KMinTInt;
williamr@4
    42
williamr@4
    43
/**
williamr@4
    44
TSmlSyncTaskKey uniquely identifies a sync relationship between a local and remote data store.
williamr@4
    45
It should be used by Data Providers to resolve change information for a sync.
williamr@4
    46
williamr@4
    47
@publishedPartner
williamr@4
    48
@released
williamr@4
    49
*/
williamr@4
    50
typedef TUint32 TSmlSyncTaskKey;
williamr@4
    51
williamr@4
    52
williamr@4
    53
class MSmlSyncRelationship
williamr@4
    54
	/**
williamr@4
    55
	SyncML store interface exposed to Database Adaptor implementations.
williamr@4
    56
	This interface may be used by a DBA to store change information for a Data Store, in the context
williamr@4
    57
	of a sync relationship with a remote Data Store.
williamr@4
    58
	It is vital for correct synchronisation behaviour that change information is stored separately for
williamr@4
    59
	different remote Data Stores. This interface facilitates this by providing streams that are stored
williamr@4
    60
	against specific Sync Tasks, and a unique key that identifies the sync relationship.
williamr@4
    61
williamr@4
    62
	@publishedPartner
williamr@4
    63
	@released
williamr@4
    64
	*/
williamr@4
    65
	{
williamr@4
    66
	public:
williamr@4
    67
		/**
williamr@4
    68
		Returns the unique identifier for the synchronisation relationship.
williamr@4
    69
williamr@4
    70
		@return				A unique identifier for the sync relationship.
williamr@4
    71
		*/
williamr@4
    72
		virtual TSmlSyncTaskKey SyncTaskKey() const = 0;
williamr@4
    73
		/**
williamr@4
    74
		Opens a specified stream for reading, and places an item on the cleanup stack to close it.
williamr@4
    75
williamr@4
    76
		@param				 aReadStream	On return, an open read stream
williamr@4
    77
		@param				 aStreamUid		The UID of the stream to open for reading.
williamr@4
    78
		*/
williamr@4
    79
		virtual void OpenReadStreamLC(RReadStream& aReadStream, TUid aStreamUid) = 0;
williamr@4
    80
		/**
williamr@4
    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.
williamr@4
    82
williamr@4
    83
		@param				aWriteStream	On return, an open write stream
williamr@4
    84
		@param				aStreamUid		The UID of the stream to open or create
williamr@4
    85
		*/
williamr@4
    86
		virtual void OpenWriteStreamLC(RWriteStream& aWriteStream, TUid aStreamUid) = 0;
williamr@4
    87
		/**
williamr@4
    88
		Tests if the specified stream identified exists in the store.
williamr@4
    89
williamr@4
    90
		@param				aStreamUid The stream UID
williamr@4
    91
		@return				Non-zero if the stream exists, otherwise EFalse.
williamr@4
    92
		*/
williamr@4
    93
		virtual TBool IsStreamPresentL(TUid aStreamUid) const = 0 ;
williamr@4
    94
	};
williamr@4
    95
williamr@4
    96
williamr@4
    97
williamr@4
    98
williamr@4
    99
williamr@4
   100
///////////////////////////////////////////////////////////////////////////////
williamr@4
   101
///////////////////////////////////////////////////////////////////////////////
williamr@4
   102
///////////////////////////////////////////////////////////////////////////////
williamr@4
   103
#endif