javacommons/jvms/nativeportlayer/inc.s60/mjavafile.h
changeset 21 2a9601315dfc
equal deleted inserted replaced
18:e8e63152f320 21:2a9601315dfc
       
     1 /*
       
     2 * Copyright (c) 2008 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:  MJavaFile
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MJAVAFILE_H
       
    19 #define MJAVAFILE_H
       
    20 
       
    21 #include <f32file.h>
       
    22 
       
    23 namespace javaruntime
       
    24 {
       
    25 
       
    26 class MJavaFile
       
    27 {
       
    28 
       
    29 public:
       
    30 
       
    31     virtual TInt Open(RFs& aFs,const TDesC& aFileName, TUint aFileMode) = 0;
       
    32     virtual void Close() = 0;
       
    33     virtual TInt Create(RFs& aFs,const TDesC& aName,TUint aFileMode) = 0;
       
    34     virtual TInt Read(TDes8& aDes) const = 0;
       
    35     virtual TInt Read(TDes8& aDes,TInt aLength) const = 0;
       
    36     virtual TInt Replace(RFs& aFs,const TDesC& aName,TUint aFileMode) = 0;
       
    37     virtual TInt Write(const TDesC8& aDes) = 0;
       
    38     virtual TInt Write(const TDesC8& aDes,TInt aLength) = 0;
       
    39     virtual TInt Write(TInt aPos,const TDesC8& aDes) = 0;
       
    40     virtual TInt Write(TInt aPos,const TDesC8& aDes,TInt aLength) = 0;
       
    41     virtual TInt Lock(TInt aPos,TInt aLength) const = 0;
       
    42     virtual TInt UnLock(TInt aPos,TInt aLength) const = 0;
       
    43     virtual TInt Seek(TSeek aMode,TInt& aPos) const = 0;
       
    44     virtual TInt Flush() = 0;
       
    45     virtual TInt Size(TInt& aSize) const = 0;
       
    46     virtual TInt SetSize(TInt aSize) = 0;
       
    47 
       
    48     virtual ~MJavaFile() {}
       
    49 
       
    50 };
       
    51 
       
    52 } // end of namespace javaruntime
       
    53 
       
    54 #endif // MJAVAFILE_H
       
    55