genericservices/activebackupclient/inc/abclientsession.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 * Declaration of RABClientSession
       
    16 * 
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 /**
       
    23  @file
       
    24 */
       
    25 #ifndef __ABCLIENTSESSION_H__
       
    26 #define __ABCLIENTSESSION_H__
       
    27 
       
    28 #include <e32std.h>
       
    29 #include <e32cmn.h>
       
    30 #include <connect/sbdefs.h>
       
    31 #include <connect/abclientserver.h>
       
    32 
       
    33 namespace conn
       
    34 	{ 
       
    35 
       
    36 	class TServerStart;
       
    37 	class RABClientSession : public RSessionBase
       
    38     /** The active backup client to the Secure Backup Engine.
       
    39 
       
    40 	@internalComponent
       
    41     */
       
    42     {
       
    43 public:
       
    44 	RABClientSession();
       
    45 	TInt Connect();
       
    46 	void Close();
       
    47 	TVersion Version() const;
       
    48 	
       
    49 	// IPC calls for the callbacks
       
    50 	HBufC8* GetDataFromServerLC(const TInt aDataLength, TABCallbackCommands aCallbackRequestingData);
       
    51 	HBufC8* GetDataFromServerLC(const TInt aDataLength, TABCallbackCommands aCallbackRequestingData, TDriveNumber& aDriveNum);
       
    52 	void SendDataLengthToServerL(TDesC8& aData, TBool aFinished, TABCallbackCommands aCallbackSendingData);
       
    53 	void PrimeServerForCallbackL(TPckgBuf<TABCallbackCommands>& aCallback, TPckgBuf<TInt>& aArg1, 
       
    54 		TPckgBuf<TInt>& aArg2, TRequestStatus& aStatus);
       
    55 	void PrimeServerForCallbackWithResponseL(TPckgBuf<TABCallbackCommands>& aCallback, TPckgBuf<TInt>& aArg1, 
       
    56 		TPckgBuf<TInt>& aArg2, TInt aResult, TRequestStatus& aStatus);
       
    57 	void PrimeServerForCallbackWithResponseL(TPckgBuf<TABCallbackCommands>& aCallback, TPckgBuf<TInt>& aArg1, 
       
    58 		TPckgBuf<TInt>& aArg2, TDesC8& aResult, TRequestStatus& aStatus);
       
    59 	void PropagateLeave(TInt aLeaveCode);
       
    60 	
       
    61 	// IPC calls on the ABClient interface
       
    62 	void BURModeInfoL(TDriveList& aDriveList, TBURPartType& aBackupType, TBackupIncType& aIncBackupType);
       
    63 	TBool DoesPartialBURAffectMeL();
       
    64 	void ConfirmReadyForBURL(TInt aErrorCode);
       
    65 	void CancelServerCallbackL();
       
    66 
       
    67 private:
       
    68 	static TInt StartServer();
       
    69 
       
    70     };
       
    71 
       
    72   } // end namespace
       
    73 
       
    74 #endif // __ABCLIENTSESSION_H__