New rxSimpleTest example
[anna.git] / example / diameter / rxSimpleTest / rxSimpleTest.hpp
diff --git a/example/diameter/rxSimpleTest/rxSimpleTest.hpp b/example/diameter/rxSimpleTest/rxSimpleTest.hpp
new file mode 100755 (executable)
index 0000000..7e90033
--- /dev/null
@@ -0,0 +1,74 @@
+// ANNA - Anna is Not Nothingness Anymore                                                         //
+//                                                                                                //
+// (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
+//                                                                                                //
+// See project site at http://redmine.teslayout.com/projects/anna-suite                           //
+// See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
+
+
+#ifndef example_diameter_rxSimpleTest_hpp
+#define example_diameter_rxSimpleTest_hpp
+
+// Standard
+#include <fstream>
+#include <string>
+#include <map>
+
+// Project
+#include <anna/core/core.hpp>
+#include <anna/comm/comm.hpp>
+#include <anna/time/Date.hpp>
+#include <anna/diameter/codec/Message.hpp>
+
+// Process
+#include <MyCommunicator.hpp>
+
+
+namespace anna {
+  namespace timex {
+    class Engine;
+  }
+  namespace diameter {
+    namespace codec {
+      class Engine;
+    }
+    namespace comm {
+      class OriginHost;
+    }
+  }
+}
+
+class MyDiameterEntity;
+class MyLocalServer;
+class MyDiameterEngine;
+
+class RxSimpleTest : public anna::comm::Application {
+
+  // Start time:
+  anna::time::Date a_start_time;
+
+  // Core engines:
+  MyCommunicator *a_communicator;
+  anna::timex::Engine* a_timeEngine;
+  anna::Millisecond a_admlMinResolution;
+  anna::diameter::comm::OriginHost *a_workingNode;
+  std::string a_initialWorkingDirectory;
+
+
+  void initialize() throw(anna::RuntimeException); // HTTP
+  void run() throw(anna::RuntimeException);
+
+public:
+  RxSimpleTest();
+
+  MyDiameterEntity *getEntity() const throw(anna::RuntimeException);
+  MyLocalServer *getServer() const throw(anna::RuntimeException);
+  MyDiameterEngine *getEngine() const throw(anna::RuntimeException);
+  MyCommunicator *getCommunicator() throw() { return a_communicator; }
+  void startService() throw(anna::RuntimeException);
+  anna::diameter::comm::OriginHost *getOriginHost(const std::string &name) const throw(anna::RuntimeException);
+
+  anna::xml::Node* asXML(anna::xml::Node* parent) const throw();
+};
+
+#endif