genericservices/activebackupclient/inc/abclientserver.h
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 /**
       
     2 * Copyright (c) 2004-2009 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:
       
    15 * Contains defines shared between the Active Backup client and Server.
       
    16 * 
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 /**
       
    23  @file
       
    24 */
       
    25 
       
    26 #ifndef __ABCLIENTSERVER_H__
       
    27 #define __ABCLIENTSERVER_H__
       
    28 
       
    29 #include <connect/tserverstart.h>
       
    30 
       
    31 namespace conn
       
    32 	{
       
    33 	/** The name of the AB server.
       
    34 	@ingroup Client
       
    35 	@internalComponent
       
    36 	*/
       
    37 	_LIT(KABServerName,"!ABServer");
       
    38 
       
    39 	/** Number of times to attempt connection to server.
       
    40 	@ingroup Client
       
    41 	@internalComponent
       
    42 	*/
       
    43 	const TInt KABRetryCount = 4;
       
    44 
       
    45 	/** Number of async message slots.
       
    46 	@ingroup Client
       
    47 	@internalComponent
       
    48 	*/
       
    49 	const TInt KABASyncMessageSlots = 1;
       
    50 
       
    51 
       
    52 	/** The AB major version number.
       
    53 	@ingroup Client
       
    54 	@internalComponent
       
    55 	*/
       
    56 	const TUint KABMajorVersionNumber = 1;
       
    57 
       
    58     /** The AB minor version number.
       
    59 	@ingroup Client
       
    60 	@internalComponent
       
    61 	*/
       
    62 	const TUint KABMinorVersionNumber = 0;
       
    63 
       
    64     /** The AB build number
       
    65 	@ingroup Client
       
    66 	@internalComponent
       
    67 	*/
       
    68 	const TUint KABBuildVersionNumber = 0;
       
    69 	
       
    70 	/** Size of data blocks to send back to the PC from the ABClient
       
    71 	@ingroup Client
       
    72 	@internalComponent
       
    73 	*/
       
    74 	const TInt KABMaxSendDataBlock = 65536;
       
    75 
       
    76 	enum TABMessages
       
    77 	/** AB Client/Server Messages
       
    78 	@internalComponent
       
    79 	*/
       
    80 		{
       
    81 		EABMsgBURModeInfo,					/*!< Get info about the backup/restore mode */
       
    82 		EABMsgDoesPartialAffectMe,			/*!< Query whether or not this client is being operated on */
       
    83 		EABMsgConfirmReadyForBUR,			/*!< Confirm to the SBEngine that all data has now been prepared */
       
    84 		EABMsgPrimeForCallback,				/*!< This is the first msg that primes server for callbacks */
       
    85 		EABMsgPrimeForCallbackAndResponse,	/*!< Re-prime the server, sending a response from the last call */
       
    86 		EABMsgPrimeForCallbackAndResponseDes, /*!< As for PrimeForCallbackAndResponse but for sending a descriptor */
       
    87 		EABMsgPropagateLeave,				/*!< Propagate a leave from the callback, back to the engine */
       
    88 		EABMsgGetDataSync,					/*!< Synchronous call to get data from the server */
       
    89 		EABMsgSendDataLength,				/*!< Synchronous call to send the length of data to the server */
       
    90 		EABMsgClosingDownCallback,			/*!< Inform the server that we're closing down the callback interface */
       
    91 		EABMsgGetDriveNumForSuppliedSnapshot /*!< Called from within the ReceiveSnapshot callback to return the drive num */
       
    92 		};
       
    93 
       
    94 	enum TABCallbackCommands
       
    95 	/**
       
    96 	List of commands that the server requests the client to call on it's callback interface
       
    97 	@internalComponent
       
    98 	*/
       
    99 		{
       
   100 		EABCallbackAllSnapshotsSupplied,
       
   101 		EABCallbackReceiveSnapshotData,
       
   102 		EABCallbackGetExpectedDataSize,
       
   103 		EABCallbackGetSnapshotData,
       
   104 		EABCallbackInitialiseGetBackupData,
       
   105 		EABCallbackGetBackupDataSection,
       
   106 		EABCallbackInitialiseRestoreBaseDataSection,
       
   107 		EABCallbackRestoreBaseDataSection,
       
   108 		EABCallbackInitialiseRestoreIncrementData,
       
   109 		EABCallbackRestoreIncrementDataSection,
       
   110 		EABCallbackRestoreComplete,
       
   111 		EABCallbackInitialiseGetProxyBackupData,
       
   112 		EABCallbackInitialiseRestoreProxyBaseData,
       
   113 		EABCallbackTerminateMultiStageOperation,
       
   114 		EABCallbackGetDataChecksum
       
   115 		};
       
   116 		
       
   117 	/** The maximum size of descriptor data passed with each IPC call 
       
   118 	@internalComponent
       
   119 	*/
       
   120 	const TInt KIPCMessageSize = 4096;
       
   121 
       
   122 	}
       
   123 
       
   124 #endif //__ABCLIENTSERVER_H__