summaryrefslogtreecommitdiff
path: root/pluginRoutingInterfaceTCP/RoutingSend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pluginRoutingInterfaceTCP/RoutingSend.cpp')
-rw-r--r--pluginRoutingInterfaceTCP/RoutingSend.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/pluginRoutingInterfaceTCP/RoutingSend.cpp b/pluginRoutingInterfaceTCP/RoutingSend.cpp
new file mode 100644
index 0000000..71829ac
--- /dev/null
+++ b/pluginRoutingInterfaceTCP/RoutingSend.cpp
@@ -0,0 +1,46 @@
+/*
+ * Bus_Interface.cpp
+ *
+ * Created on: Jan 19, 2011
+ * Author: demo
+ */
+#include <iostream>
+
+
+#include "RoutingSend.h"
+#include "routinginterface.h"
+#include "tcpMessages.h"
+
+
+using namespace std;
+
+
+void RoutingSendTcp::startup_interface(RoutingReceiveInterface* audioman){
+ audiomanager=audioman;
+ m_server=new TcpServer(AUDIOMAN_PORT);
+ m_client=new tcpClient(BEAGLE_IP,BEAGLE_PORT);
+ m_server->registerAudioManager(audiomanager);
+ cout<<"server started"<<endl;
+}
+
+void RoutingSendTcp::return_BusName(char* BusName) {
+ strcpy(BusName,BUS_NAME);
+}
+
+int RoutingSendTcp::Connect(int source, int sink){
+ return m_client->connect(source,sink);
+}
+
+void RoutingSendTcp::system_ready() {
+
+ m_client->system_ready();
+ cout<<"Tcp ready"<<endl;
+
+}
+
+
+RoutingSendInterface* SampleRoutingInterfaceTcpFactory::returnInstance(){
+ return new RoutingSendTcp();
+}
+
+Q_EXPORT_PLUGIN2(RoutingTcpPlugin, SampleRoutingInterfaceTcpFactory);