javamanager/javacaptain/inc/rtcruntimeinterface.h
branchRCL_3
changeset 19 04becd199f91
equal deleted inserted replaced
16:f5050f1da672 19:04becd199f91
       
     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:  RtcRuntimeInterface
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef RTCRUNTIMEINTERFACE_H
       
    19 #define RTCRUNTIMEINTERFACE_H
       
    20 
       
    21 #include "rtcinterface.h"
       
    22 #include "processmanagementeventsinterface.h"
       
    23 #include "commslistener.h"
       
    24 #include "javauid.h"
       
    25 
       
    26 namespace java
       
    27 {
       
    28 namespace captain
       
    29 {
       
    30 
       
    31 using java::comms::CommsListener;
       
    32 using java::comms::CommsMessage;
       
    33 
       
    34 class RtcRuntimeInterface : public ProcessManagementEventsInterface,
       
    35         public CommsListener
       
    36 {
       
    37 public:
       
    38     virtual ~RtcRuntimeInterface() {}
       
    39 
       
    40     // returns true on success, false on launch failure
       
    41     virtual bool launch(const rtcLaunchInfo& aLaunchInfo) = 0;
       
    42     virtual Uid uid() const = 0;
       
    43     virtual int pid() const = 0;
       
    44     virtual bool isRunning() const = 0;
       
    45     virtual int runtimeAddress() const = 0;
       
    46 
       
    47     // returns true if already terminated, false of termination is just started
       
    48     virtual bool terminate(const rtcTerminateInfo& aTerminateInfo) = 0;
       
    49 
       
    50     virtual void runningInd(const int& aRuntimeAddress, const int& aStatus) = 0;
       
    51     virtual void terminatedInd(const int& aStatus) = 0;
       
    52 
       
    53     // ProcessManagementEventsInterface
       
    54     virtual void pmcTerminated(const int& pid, const int& exitCode) = 0;
       
    55 
       
    56     // CommsListener
       
    57     virtual void processMessage(CommsMessage& aMessage) = 0;
       
    58 };
       
    59 
       
    60 } // namespace captain
       
    61 } // namespace java
       
    62 
       
    63 #endif // RTCRUNTIMEINTERFACE_H
       
    64