Permalink
Browse files

Added logic for process exposure.

  Relating to issue #6, this implements a class that can manipulate the
  running process via the Procedure::Module system.
  • Loading branch information...
1 parent 292d67d commit 91703e4a72ac7639dea290713c9be9b2941d1d92 @jalcine committed Aug 18, 2013
View
22 src/Wintermute/Procedure/ProcessModule
@@ -0,0 +1,22 @@
+/**
+ * vim: ft=qt.cpp
+ * Copyright (C) 2013 Jacky Alcine <me@jalcine.me>
+ *
+ * This file is part of Wintermute, the extensible AI platform.
+ *
+ *
+ * Wintermute is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Wintermute is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Wintermute. If not, see <http://www.gnu.org/licenses/>.
+**/
+
+#include "Wintermute/Procedure/process_module.hpp"
View
17 src/Wintermute/Procedure/process_module.cpp
@@ -0,0 +1,17 @@
+#include "Procedure/process_module.hpp"
+
+using Wintermute::Procedure::ProcessModule;
+
+ProcessModule::ProcessModule() : Module(Wintermute::Application()) {
+ // TODO: Add 'listModules' method via lambda.
+ // TODO: Add 'reboot' method via lambda.
+}
+
+QString
+ProcessModule::domain() const { return "me.jalcine.wintermute"; }
+
+QString
+ProcessModule::package() const { return "process"; }
+
+ProcessModule::~ProcessModule() {
+}
View
46 src/Wintermute/Procedure/process_module.hpp
@@ -0,0 +1,46 @@
+/**
+ * vim: ft=qt.cpp
+ * Copyright (C) 2013 Jacky Alcine <me@jalcine.me>
+ *
+ * This file is part of Wintermute, the extensible AI platform.
+ *
+ *
+ * Wintermute is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Wintermute is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Wintermute. If not, see <http://www.gnu.org/licenses/>.
+**/
+
+#ifndef WINTERMUTE_CORE_PROCEDURE_PROCESS_MODULE_HPP
+#define WINTERMUTE_CORE_PROCEDURE_PROCESS_MODULE_HPP
+
+#include <Wintermute/Application>
+#include <Wintermute/Procedure/Module>
+
+namespace Wintermute {
+ namespace Procedure {
+ /**
+ * @class ProcessModule
+ *
+ * ProcessModule serves as a means of exposing this current process over
+ * the network. Typically the first module created by a running process,
+ * it connects it to the other processes quickly.
+ */
+ class ProcessModule : public Module {
+ friend class Wintermute::Application;
+ explicit ProcessModule();
+ public:
+ virtual ~ProcessModule();
+ };
+ }
+}
+
+#endif

0 comments on commit 91703e4

Please sign in to comment.