os/kernelhwsrv/kerneltest/f32test/fileshare/handshare.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // f32test\handlesharing\handshare.h
    15 // 
    16 //
    17 
    18 #ifndef __HANDSHR_H__
    19 #define __HANDSHR_H__
    20 #include <e32base.h>
    21 #include <f32file.h>
    22 
    23 
    24 
    25 class RFileHandleSharer : public RSessionBase
    26 	{
    27 public:
    28 	enum TMessage
    29 		{
    30 		EMsgGetFileHandle2,
    31 		EMsgGetFileHandle,
    32 		EMsgPassFileHandle,
    33 		EMsgPassInvalidFileHandle,
    34 		EMsgPassFileHandleProcess,
    35 		EMsgExit,
    36 		EMsgSync,
    37 		EMsgDrive
    38 		};
    39 public:
    40 	TInt Connect();
    41 	TInt SetTestDrive(TInt aDrive);	//set the drive to test
    42 	TInt GetFileHandle(TInt &aHandle, TFileMode aFileMode);	//get file handle from server1
    43 	TInt GetFileHandle2(TInt &aHandle, TFileMode aFileMode);	//get file handle from server2 
    44 	TInt PassFileHandle(TInt filehandle , RFs &session);		//to test the 
    45 	TInt PassFileHandle(TIpcArgs& aIpcArgs);
    46 	TInt PassFileHandleProcess();
    47 	TInt PassInvalidFileHandle(TIpcArgs& aIpcArgs);
    48 	TInt Exit();
    49 	void Sync();
    50 	};
    51 
    52 
    53 class RFileHandleSharer2 : public RFileHandleSharer
    54 	{
    55 public:
    56 	TInt Connect();
    57 	TInt GetFileHandle(TInt &aHandle, TFileMode aFileMode);
    58 	TInt PassFileHandleNew(TIpcArgs& aIpcArgs);
    59 	TInt Exit();
    60 	};
    61 
    62 
    63 
    64 #endif
    65 
    66 _LIT8(KTestData, "Client Write Client Write");
    67 _LIT8(KTestData1, "Server Write Server Write");
    68 
    69 
    70 _LIT( KSvrFileName, "mini.txt");
    71 _LIT( KCliFileName, "mighty.txt");