javamanager/javacaptain/inc/pmcinterface.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:  PmcInterface
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef PMCINTERFACE_H
       
    19 #define PMCINTERFACE_H
       
    20 
       
    21 #include <string>
       
    22 #include <vector>
       
    23 
       
    24 namespace java
       
    25 {
       
    26 namespace captain
       
    27 {
       
    28 
       
    29 const int PROC_LAUNCH_OPTIONS_NONE = 0;
       
    30 const int PROC_LAUNCH_OPTIONS_AUTORESTART = 1;
       
    31 
       
    32 typedef std::vector<std::string> cmdLine_t;
       
    33 
       
    34 class PmcInterface
       
    35 {
       
    36 public:
       
    37     virtual ~PmcInterface() {};
       
    38 
       
    39     // returns pid. > 0 if success, <=0 on fail
       
    40     virtual int launch(const cmdLine_t& cmdLine, const int& options) = 0;
       
    41     virtual int terminate(const int& pid) = 0;
       
    42     virtual int kill(const int& pid) = 0;
       
    43 };
       
    44 
       
    45 } // namespace captain
       
    46 } // namespace java
       
    47 
       
    48 #endif // PMCINTERFACE_H
       
    49