blob: 71829ac8b477857d468a56bd2e2fb4efd1ae3f6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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);
|