summaryrefslogtreecommitdiff
path: root/orkbasecxx/messages
diff options
context:
space:
mode:
Diffstat (limited to 'orkbasecxx/messages')
-rw-r--r--orkbasecxx/messages/InitMsg.cpp66
-rw-r--r--orkbasecxx/messages/InitMsg.h60
-rw-r--r--orkbasecxx/messages/Makefile.am2
3 files changed, 127 insertions, 1 deletions
diff --git a/orkbasecxx/messages/InitMsg.cpp b/orkbasecxx/messages/InitMsg.cpp
new file mode 100644
index 0000000..35a03be
--- /dev/null
+++ b/orkbasecxx/messages/InitMsg.cpp
@@ -0,0 +1,66 @@
+/*
+ * Oreka -- A media capture and retrieval platform
+ *
+ * Copyright (C) 2005, orecx LLC
+ *
+ * http://www.orecx.com
+ *
+ */
+#pragma warning( disable: 4786 ) // disables truncated symbols in browse-info warning
+
+#define _WINSOCKAPI_ // prevents the inclusion of winsock.h
+
+#include "InitMsg.h"
+#include "ConfigManager.h"
+
+InitMsg::InitMsg()
+{
+ m_tcpPort = 59140;
+ m_fileServePort = 8080;
+ m_streamingPort = 59120;
+ m_local = false;
+ m_sshPort = 22;
+}
+
+void InitMsg::Define(Serializer* s)
+{
+ CStdString initMessageName(INIT_MESSAGE_NAME);
+ s->StringValue(OBJECT_TYPE_TAG, initMessageName, true);
+ s->StringValue(NAME_PARAM, m_name, true);
+ s->StringValue(HOSTNAME_PARAM, m_hostname, true);
+ s->StringValue(TYPE_PARAM, m_type, true);
+
+ s->IntValue(TCP_PORT_PARAM, m_tcpPort);
+ s->StringValue(PROTOCOL_PARAM, m_protocol);
+ s->IntValue(FILE_SERVE_PORT_PARAM, m_fileServePort);
+ s->StringValue(CONTEXT_PATH_PARAM, m_contextPath);
+ s->StringValue(SERVE_PATH_PARAM, m_servePath);
+ s->StringValue(ABSOLUTE_PATH_PARAM, m_absolutePath);
+ s->IntValue(STREAMING_PORT_PARAM, m_streamingPort);
+ s->BoolValue(LOCAL_PARAM, m_local);
+ s->StringValue(USERNAME_PARAM, m_username);
+ s->StringValue(PASSWORD_PARAM, m_password);
+ s->IntValue(SSH_PORT_PARAM, m_sshPort);
+
+ DefineMessage(s);
+}
+
+void InitMsg::Validate()
+{
+}
+
+CStdString InitMsg::GetClassName()
+{
+ return CStdString(INIT_MESSAGE_NAME);
+}
+
+ObjectRef InitMsg::NewInstance()
+{
+ return ObjectRef(new InitMsg);
+}
+
+ObjectRef InitMsg::Process()
+{
+ return ObjectRef();
+}
+
diff --git a/orkbasecxx/messages/InitMsg.h b/orkbasecxx/messages/InitMsg.h
new file mode 100644
index 0000000..f0e1584
--- /dev/null
+++ b/orkbasecxx/messages/InitMsg.h
@@ -0,0 +1,60 @@
+/*
+ * RfbRecorder -- A Simple RFB recording program
+ *
+ * Copyright (C) 2007, orecx LLC
+ *
+ * http://www.orecx.com/
+ *
+ */
+#ifndef __INITMSG_H__
+#define __INITMSG_H__ 1
+
+#include "messages/SyncMessage.h"
+#include "messages/AsyncMessage.h"
+
+#define INIT_MESSAGE_NAME "init"
+#define NAME_PARAM "name"
+#define HOSTNAME_PARAM "hostname"
+#define TYPE_PARAM "type"
+#define TCP_PORT_PARAM "tcpport"
+#define PROTOCOL_PARAM "protocol"
+#define FILE_SERVE_PORT_PARAM "fileserveport"
+#define CONTEXT_PATH_PARAM "contextpath"
+#define SERVE_PATH_PARAM "servepath"
+#define ABSOLUTE_PATH_PARAM "absolutepath"
+#define STREAMING_PORT_PARAM "streamingport"
+#define LOCAL_PARAM "local"
+#define USERNAME_PARAM "username"
+#define PASSWORD_PARAM "password"
+#define SSH_PORT_PARAM "sshport"
+
+class DLL_IMPORT_EXPORT_ORKBASE InitMsg : public SyncMessage
+{
+public:
+ InitMsg();
+
+ void Define(Serializer* s);
+ void Validate();
+
+ CStdString GetClassName();
+ ObjectRef NewInstance();
+ ObjectRef Process();
+
+ CStdString m_name;
+ CStdString m_hostname;
+ CStdString m_type;
+ int m_tcpPort;
+ CStdString m_protocol;
+ int m_fileServePort;
+ CStdString m_contextPath;
+ CStdString m_servePath;
+ CStdString m_absolutePath;
+ int m_streamingPort;
+ bool m_local;
+ CStdString m_username;
+ CStdString m_password;
+ int m_sshPort;
+};
+typedef boost::shared_ptr<InitMsg> InitMsgRef;
+
+#endif
diff --git a/orkbasecxx/messages/Makefile.am b/orkbasecxx/messages/Makefile.am
index 8c56f9e..7504a1c 100644
--- a/orkbasecxx/messages/Makefile.am
+++ b/orkbasecxx/messages/Makefile.am
@@ -2,7 +2,7 @@ METASOURCES = AUTO
noinst_LTLIBRARIES = libmessages.la
libmessages_la_SOURCES = AsyncMessage.cpp Message.cpp \
SyncMessage.cpp CaptureMsg.cpp DeleteTapeMsg.cpp \
- PingMsg.cpp TapeMsg.cpp RecordMsg.cpp
+ PingMsg.cpp TapeMsg.cpp RecordMsg.cpp InitMsg.cpp
#libmessages_la_LIBADD = -L/projects/ext/xmlrpc++/xmlrpc++0.7/ -lXmlRpc
INCLUDES = -I@top_srcdir@ -I../../orkaudio