Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

minor modifications to make the projects compile with the new directo…

…ry layout and to use the latest oscpack version.

git-svn-id: https://osctools.svn.sourceforge.net/svnroot/osctools/trunk@2 8d86b230-aa17-0410-9ab0-97cb6adfeffd
  • Loading branch information...
commit b51cee0e770b10ce2861c5f8a39c014321c597b5 1 parent 0c574eb
remymuller authored
View
41 OSCCommandLine/OSCCommandLine.cpp
@@ -51,7 +51,7 @@ using std::streamsize;
using std::istringstream;
#include "NetworkingUtils.h"
-#include "UdpTransmitPort.h"
+#include "UdpSocket.h"
#include "OscOutboundPacketStream.h"
#include "OscUdpZeroConfService.h"
#include "OscUdpZeroConfBrowser.h"
@@ -121,14 +121,13 @@ bool IsFloat(const string& S)
}
-
-class App
+class App : public OSCRegisterListener
{
typedef void (App::*command)(void);
map<string,command> commands;
bool quit;
- UdpTransmitPort *transmitPort;
+ UdpTransmitSocket *transmitSocket;
OscUdpZeroConfService *service;
@@ -185,8 +184,8 @@ class App
p << osc::EndMessage;
- if(transmitPort)
- transmitPort->Send( p.Data(), p.Size() );
+ if(transmitSocket)
+ transmitSocket->Send( p.Data(), p.Size() );
else
cout << "Not Connected to an OSC server" << endl;
}
@@ -204,20 +203,20 @@ class App
return;
}
- if(transmitPort)
- delete transmitPort;
- transmitPort = NULL;
+ if(transmitSocket)
+ delete transmitSocket;
+ transmitSocket = NULL;
- transmitPort = new UdpTransmitPort(GetHostByName(host.c_str()), port);
+ transmitSocket = new UdpTransmitSocket( IpEndpointName(host.c_str(),port) );
cin.clear();
cin.ignore(numeric_limits<streamsize>::max(),'\n');
}
void DisConnect()
{
- if(transmitPort)
- delete transmitPort;
- transmitPort = NULL;
+ if(transmitSocket)
+ delete transmitSocket;
+ transmitSocket = NULL;
cin.clear();
cin.ignore(numeric_limits<streamsize>::max(),'\n');
@@ -238,7 +237,7 @@ class App
if(service)
delete service;
- service = new OscUdpZeroConfService(name.c_str(),port);
+ service = new OscUdpZeroConfService(name.c_str(),port,this);
}
void Help()
{
@@ -250,7 +249,7 @@ class App
}
public:
App()
- :transmitPort(NULL)
+ :transmitSocket(NULL)
,service(NULL)
,quit(false)
{
@@ -264,15 +263,15 @@ class App
}
~App()
{
- if(transmitPort)
- delete transmitPort;
+ if(transmitSocket)
+ delete transmitSocket;
if(service)
delete service;
}
int Run()
{
- InitializeNetworking();
+ //InitializeNetworking();
while(!quit)
{
@@ -301,10 +300,14 @@ class App
//const char *destip = "localhost";
//delete transmitPort;
- TerminateNetworking();
+ //TerminateNetworking();
return 0;
}
+ virtual void OnRegisterService(const char *name)
+ {
+
+ }
};
int main(int argc, char* argv[])
View
20 OSCCommandLine/OSCCommandLine.vcproj
@@ -19,7 +19,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="..\oscpack\ip;..\oscpack\osc;..\zeroconf"
+ AdditionalIncludeDirectories="..\oscpack;..\oscpack\ip\;..\oscpack\osc;..\zeroconf"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE; OSC_HOST_LITTLE_ENDIAN"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
@@ -32,7 +32,7 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="dnssd.lib ws2_32.lib"
+ AdditionalDependencies="dnssd.lib ws2_32.lib winmm.lib"
OutputFile="$(OutDir)/OSCSend.exe"
LinkIncremental="2"
GenerateDebugInformation="TRUE"
@@ -68,7 +68,7 @@
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\oscpack\ip;..\oscpack\osc;..\zeroconf"
+ AdditionalIncludeDirectories="..\oscpack;..\oscpack\ip\;..\oscpack\osc;..\zeroconf"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE; OSC_HOST_LITTLE_ENDIAN"
RuntimeLibrary="4"
UsePrecompiledHeader="0"
@@ -79,7 +79,7 @@
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="dsnsd.lib ws2_32.lib"
+ AdditionalDependencies="dnssd.lib ws2_32.lib winmm.lib"
OutputFile="$(OutDir)/OSCSend.exe"
LinkIncremental="1"
GenerateDebugInformation="TRUE"
@@ -134,6 +134,9 @@
Name="support"
Filter="">
<File
+ RelativePath="..\oscpack\ip\IpEndpointName.cpp">
+ </File>
+ <File
RelativePath="..\oscpack\ip\win32\NetworkingUtils.cpp">
</File>
<File
@@ -188,16 +191,13 @@
RelativePath="..\zeroconf\OscUdpZeroConfService.h">
</File>
<File
- RelativePath="..\oscpack\ip\win32\UdpPacketListenerPort.cpp">
- </File>
- <File
- RelativePath="..\oscpack\ip\UdpPacketListenerPort.h">
+ RelativePath="..\oscpack\ip\TimerListener.h">
</File>
<File
- RelativePath="..\oscpack\ip\win32\UdpTransmitPort.cpp">
+ RelativePath="..\oscpack\ip\win32\UdpSocket.cpp">
</File>
<File
- RelativePath="..\oscpack\ip\UdpTransmitPort.h">
+ RelativePath="..\oscpack\ip\UdpSocket.h">
</File>
<File
RelativePath="..\zeroconf\win32\ZeroConf.cpp">
Please sign in to comment.
Something went wrong with that request. Please try again.