javamanager/debugapi/src.s60/diagnosticimpl.h
branchRCL_3
changeset 19 04becd199f91
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2009 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: DiagnosticImpl provides implementation for JavaDiagnostic
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef DIAGNOSTICIMPL_H
       
    20 #define DIAGNOSTICIMPL_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include "javadiagnostic.h"
       
    24 #include "javaosheaders.h"
       
    25 
       
    26 namespace java
       
    27 {
       
    28 namespace debug
       
    29 {
       
    30 
       
    31 OS_NONSHARABLE_CLASS(DiagnosticImpl) : public CActive,
       
    32         public JavaDiagnostic,
       
    33         public DiagnosticListener
       
    34 {
       
    35 public:
       
    36     DiagnosticImpl();
       
    37     virtual ~DiagnosticImpl();
       
    38 
       
    39     // JavaDiagnostic methods
       
    40     virtual TInt setDiagnosticListener(DiagnosticListener& aListener);
       
    41     virtual void removeDiagnosticListener();
       
    42 
       
    43 protected:
       
    44     // CActive methods
       
    45     virtual void RunL();
       
    46     virtual void DoCancel();
       
    47     virtual TInt RunError(TInt aError);
       
    48 
       
    49     //DiagnosticListener methods
       
    50     virtual void systemOut(const TDesC8& aData);
       
    51     virtual void systemErr(const TDesC8& aData);
       
    52     virtual void log(const TDesC8& aData);
       
    53 
       
    54     virtual TInt start();
       
    55     virtual void stop();
       
    56     static void messageLoop(TAny* aArgs);
       
    57     void runServerL();
       
    58 
       
    59     DiagnosticListener* mListener;
       
    60     RThread mThread;
       
    61 };
       
    62 
       
    63 } // end namespace debug
       
    64 } // end namespace java
       
    65 
       
    66 
       
    67 #endif // DIAGNOSTICIMPL_H