os/kernelhwsrv/kerneltest/f32test/fileshare/handshare.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kerneltest/f32test/fileshare/handshare.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,71 @@
     1.4 +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// f32test\handlesharing\handshare.h
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#ifndef __HANDSHR_H__
    1.22 +#define __HANDSHR_H__
    1.23 +#include <e32base.h>
    1.24 +#include <f32file.h>
    1.25 +
    1.26 +
    1.27 +
    1.28 +class RFileHandleSharer : public RSessionBase
    1.29 +	{
    1.30 +public:
    1.31 +	enum TMessage
    1.32 +		{
    1.33 +		EMsgGetFileHandle2,
    1.34 +		EMsgGetFileHandle,
    1.35 +		EMsgPassFileHandle,
    1.36 +		EMsgPassInvalidFileHandle,
    1.37 +		EMsgPassFileHandleProcess,
    1.38 +		EMsgExit,
    1.39 +		EMsgSync,
    1.40 +		EMsgDrive
    1.41 +		};
    1.42 +public:
    1.43 +	TInt Connect();
    1.44 +	TInt SetTestDrive(TInt aDrive);	//set the drive to test
    1.45 +	TInt GetFileHandle(TInt &aHandle, TFileMode aFileMode);	//get file handle from server1
    1.46 +	TInt GetFileHandle2(TInt &aHandle, TFileMode aFileMode);	//get file handle from server2 
    1.47 +	TInt PassFileHandle(TInt filehandle , RFs &session);		//to test the 
    1.48 +	TInt PassFileHandle(TIpcArgs& aIpcArgs);
    1.49 +	TInt PassFileHandleProcess();
    1.50 +	TInt PassInvalidFileHandle(TIpcArgs& aIpcArgs);
    1.51 +	TInt Exit();
    1.52 +	void Sync();
    1.53 +	};
    1.54 +
    1.55 +
    1.56 +class RFileHandleSharer2 : public RFileHandleSharer
    1.57 +	{
    1.58 +public:
    1.59 +	TInt Connect();
    1.60 +	TInt GetFileHandle(TInt &aHandle, TFileMode aFileMode);
    1.61 +	TInt PassFileHandleNew(TIpcArgs& aIpcArgs);
    1.62 +	TInt Exit();
    1.63 +	};
    1.64 +
    1.65 +
    1.66 +
    1.67 +#endif
    1.68 +
    1.69 +_LIT8(KTestData, "Client Write Client Write");
    1.70 +_LIT8(KTestData1, "Server Write Server Write");
    1.71 +
    1.72 +
    1.73 +_LIT( KSvrFileName, "mini.txt");
    1.74 +_LIT( KCliFileName, "mighty.txt");