multimediacommsengine/tsrc/testdriver/testclient/filehandler/inc/RTcFileHandler.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2004 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:  See class definition below.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __RTCFILEHANDLER_H__
       
    19 #define __RTCFILEHANDLER_H__
       
    20 
       
    21 //	INCLUDES
       
    22 #include <e32base.h>
       
    23 
       
    24 //	CLASS DEFINITION
       
    25 /**
       
    26  * RTcFileHandler implements the client-side endpoint of a FileHandler
       
    27  * client-server session.
       
    28  */
       
    29 class RTcFileHandler
       
    30 	: public RSessionBase
       
    31 	{
       
    32 	public: // Constructors and destructor
       
    33 
       
    34 		/// Default constructor
       
    35 		IMPORT_C RTcFileHandler();
       
    36 
       
    37 	public: // from RHandleBase
       
    38 
       
    39 		/// Closes the connection to the server.
       
    40 		/// Stops watching for this client.
       
    41 		IMPORT_C void Close();
       
    42 
       
    43 	public:	// New methods
       
    44 
       
    45 		/**
       
    46 		 * Establishes a connection to the FileHandler server.
       
    47 		 * The server is automatically started if it was not already
       
    48 		 * up and running.
       
    49 		 *
       
    50 		 */
       
    51 		IMPORT_C TInt Connect();
       
    52 
       
    53 
       
    54 		IMPORT_C TInt CreateFile( const TDesC8& aDestinationPath, 
       
    55                                   const TDesC8& aData );
       
    56                                 
       
    57         IMPORT_C TInt CopyFile( const TDesC8& aSourcePath,
       
    58                                 const TDesC8& aDestinationPath );
       
    59 
       
    60         IMPORT_C TInt DeleteFile( const TDesC8& aDestinationPath );
       
    61         
       
    62 		/// @return Server version number.
       
    63 		IMPORT_C TVersion Version() const;
       
    64 
       
    65 	private: // New methods
       
    66 
       
    67 		/// Starts the server process.
       
    68 		void StartServerL();
       
    69 
       
    70 		/// @return ETrue if the server is already/still running
       
    71 		TBool IsServerStarted() const;
       
    72 
       
    73 	private: // Data
       
    74 
       
    75 		/// ETrue if there is an open connection, EFalse otherwise.
       
    76 		TBool iIsConnected;
       
    77 
       
    78     };
       
    79 
       
    80 #endif  // __RTCFILEHANDLER_H__