javacommons/jvms/nativeportlayer/inc.s60/jvmnativeportlayer.h
author hgs
Mon, 04 Oct 2010 11:29:25 +0300
changeset 78 71ad690e91f5
parent 21 2a9601315dfc
child 80 d6dafc5d983f
permissions -rw-r--r--
v2.2.17_1

/*
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  CJvmNativePortLayer
*
*/

#ifndef JVMNATIVEPORTLAYER_H
#define JVMNATIVEPORTLAYER_H

#include "javaosheaders.h"
#include "javaredirector.h"
using java::util::Redirector;

namespace javaruntime
{

OS_NONSHARABLE_CLASS(CJvmNativePortLayer): public CBase, public MJvmNativePortLayer
{
public:
    static MJvmNativePortLayer* NewL();
    IMPORT_C static void SetPointerToCafMethod(TBool(*aUseCafForFileOpen)(const TDesC&));
public:

    virtual ~CJvmNativePortLayer();

    virtual MJavaFile* GetJavaFileL();
    virtual void WriteToStdoutL(const TDesC8& aData);
    virtual void WriteToStderrL(const TDesC8& aData);

private:

    CJvmNativePortLayer();

    void ConstructL();

private:
//        static  TBool (*iUseCafForFileOpen)(const TDesC&);
    TBool   iLogging;
    HBufC*  iStdOut;
    HBufC*  iStdErr;
    Redirector iRedirector;
};
} // end of namespace javaruntime

#endif // JVMNATIVEPORTLAYER_H