javacommons/jvms/nativeportlayer/inc.s60/javafile.h
changeset 80 d6dafc5d983f
parent 21 2a9601315dfc
equal deleted inserted replaced
78:71ad690e91f5 80:d6dafc5d983f
     1 /*
     1 /*
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    35 
    35 
    36 OS_NONSHARABLE_CLASS(CJavaFile): public CBase, public MJavaFile
    36 OS_NONSHARABLE_CLASS(CJavaFile): public CBase, public MJavaFile
    37 {
    37 {
    38 
    38 
    39 public:
    39 public:
    40     static MJavaFile* NewL();
       
    41 
    40 
       
    41     CJavaFile();
    42     virtual ~CJavaFile();
    42     virtual ~CJavaFile();
    43 
    43 
    44     virtual TInt Open(RFs& aFs,const TDesC& aFileName, TUint aFileMode);
    44     virtual TInt Open(RFs& aFs,const TDesC& aFileName, TUint aFileMode);
    45     virtual void Close();
    45     virtual void Close();
    46     virtual TInt Create(RFs& aFs,const TDesC& aName,TUint aFileMode);
    46     virtual TInt Create(RFs& aFs,const TDesC& aName,TUint aFileMode);
    56     virtual TInt Seek(TSeek aMode,TInt& aPos) const;
    56     virtual TInt Seek(TSeek aMode,TInt& aPos) const;
    57     virtual TInt Flush();
    57     virtual TInt Flush();
    58     virtual TInt Size(TInt& aSize) const;
    58     virtual TInt Size(TInt& aSize) const;
    59     virtual TInt SetSize(TInt aSize);
    59     virtual TInt SetSize(TInt aSize);
    60 
    60 
    61 protected:
       
    62     CJavaFile();
       
    63 
       
    64 private:
    61 private:
    65     enum TJavaFileMode
    62     enum TJavaFileMode
    66     {
    63     {
    67         EJavaFileClosed,
    64         EJavaFileClosed,
    68         EJavaFileOpenForCaf,
    65         EJavaFileOpenForCaf,
    73 private:
    70 private:
    74     void ConstructL();
    71     void ConstructL();
    75     void OpenCafL(const TDesC& aFileName);
    72     void OpenCafL(const TDesC& aFileName);
    76 
    73 
    77 private:
    74 private:
    78     ContentAccess::CContent*    iCafContent; //Owns
    75     ContentAccess::CContent*    iCafContent; // Owns
    79     ContentAccess::CData*       iCafData; //Owns
    76     ContentAccess::CData*       iCafData;    // Owns
    80     TJavaFileMode               iJavaFileMode;
    77     TJavaFileMode               iJavaFileMode;
    81     RFile                       iNormalFile;
    78     RFile                       iNormalFile;
    82     std::wstring                mFileName;
    79     std::wstring                mFileName;
    83 };
    80 };
    84 
    81 
    85 } // end of namespace javaruntime
    82 } // end of namespace javaruntime
    86 
    83 
    87 IMPORT_C void Dummy1(); //These are keeping the ordinals in J9 understandable order. TODO remove these at some point
       
    88 IMPORT_C void Dummy2();
       
    89 IMPORT_C void Dummy3();
       
    90 IMPORT_C void Dummy4();
       
    91 IMPORT_C void Dummy5();
       
    92 IMPORT_C void Dummy6();
       
    93 IMPORT_C void Dummy7();
       
    94 IMPORT_C void Dummy8();
       
    95 IMPORT_C void Dummy9();
       
    96 #endif // JAVAFILE_H
    84 #endif // JAVAFILE_H
    97 
    85