javamanager/javacaptain/inc/pmcinterface.h
branchRCL_3
changeset 19 04becd199f91
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javacaptain/inc/pmcinterface.h	Tue Apr 27 16:30:29 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* 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:  PmcInterface
+*
+*/
+
+#ifndef PMCINTERFACE_H
+#define PMCINTERFACE_H
+
+#include <string>
+#include <vector>
+
+namespace java
+{
+namespace captain
+{
+
+const int PROC_LAUNCH_OPTIONS_NONE = 0;
+const int PROC_LAUNCH_OPTIONS_AUTORESTART = 1;
+
+typedef std::vector<std::string> cmdLine_t;
+
+class PmcInterface
+{
+public:
+    virtual ~PmcInterface() {};
+
+    // returns pid. > 0 if success, <=0 on fail
+    virtual int launch(const cmdLine_t& cmdLine, const int& options) = 0;
+    virtual int terminate(const int& pid) = 0;
+    virtual int kill(const int& pid) = 0;
+};
+
+} // namespace captain
+} // namespace java
+
+#endif // PMCINTERFACE_H
+