Skip to content

Commit

Permalink
merged 1.4 r1007:1008 into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Bolton committed May 21, 2011
1 parent bebf8c2 commit 5a31532
Show file tree
Hide file tree
Showing 39 changed files with 803 additions and 2,849 deletions.
2,327 changes: 0 additions & 2,327 deletions .cproject

This file was deleted.

110 changes: 0 additions & 110 deletions .project

This file was deleted.

13 changes: 6 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,15 @@ endif()
project(synergy C CXX)

# put binaries in a different dir to make them easier to find.
if (WIN32)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
elseif (UNIX)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

# for unix, put debug files in a separate bin "debug" dir.
# release bin files should stay in the root of the bin dir.
if (UNIX)
if (CMAKE_BUILD_TYPE STREQUAL Debug)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/debug)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib/debug)
elseif (CMAKE_BUILD_TYPE STREQUAL Release)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/release)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib/release)
endif()
endif()

Expand Down
2 changes: 2 additions & 0 deletions configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .

21 changes: 9 additions & 12 deletions hm.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,17 @@
requiredMinor = 3

# options used by all commands
global_options = 'g:v'
global_options_long = ['no-prompts', 'generator=', 'verbose', 'make-gui']

# options used by build related commands
build_options = 'dr'
build_options_long = ['debug', 'release']
globalOptions = 'v'
globalOptionsLong = ['no-prompts', 'generator=', 'verbose', 'make-gui']

# list of valid commands as keys. the values are optarg strings, but most
# are None for now (this is mainly for extensibility)
cmd_opt_dict = {
'about' : ['', []],
'setup' : ['', []],
'configure' : [build_options, build_options_long],
'build' : [build_options, build_options_long],
'clean' : [build_options, build_options_long],
'setup' : ['g:', []],
'configure' : ['g:dr', ['debug', 'release']],
'build' : ['dr', ['debug', 'release']],
'clean' : ['dr', ['debug', 'release']],
'update' : ['', []],
'install' : ['', []],
'doxygen' : ['', []],
Expand Down Expand Up @@ -170,10 +166,10 @@ def run_cmd(cmd, argv = []):
try:
options_pair = cmd_opt_dict[cmd]

options = global_options + options_pair[0]
options = globalOptions + options_pair[0]

options_long = []
options_long.extend(global_options_long)
options_long.extend(globalOptionsLong)
options_long.extend(options_pair[1])

opts, args = gnu_getopt(argv, options, options_long)
Expand Down Expand Up @@ -214,3 +210,4 @@ def main(argv):

# Start the program.
main(sys.argv)

18 changes: 0 additions & 18 deletions src/lib/base/CEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,6 @@ CEvent::getFlags() const
return m_flags;
}

CEvent::Type
CEvent::registerType(const char* name)
{
return EVENTQUEUE->registerType(name);
}

CEvent::Type
CEvent::registerTypeOnce(Type& type, const char* name)
{
return EVENTQUEUE->registerTypeOnce(type, name);
}

const char*
CEvent::getTypeName(Type type)
{
return EVENTQUEUE->getTypeName(type);
}

void
CEvent::deleteData(const CEvent& event)
{
Expand Down
21 changes: 0 additions & 21 deletions src/lib/base/CEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,6 @@ class CEvent {
//! @name manipulators
//@{

//! Creates a new event type
/*!
Returns a unique event type id.
*/
static Type registerType(const char* name);

//! Creates a new event type
/*!
If \p type contains \c kUnknown then it is set to a unique event
type id otherwise it is left alone. The final value of \p type
is returned.
*/
static Type registerTypeOnce(Type& type, const char* name);

//! Get name for event
/*!
Returns the name for the event \p type. This is primarily for
debugging.
*/
static const char* getTypeName(Type type);

//! Release event data
/*!
Deletes event data for the given event (using free()).
Expand Down
6 changes: 3 additions & 3 deletions src/lib/client/CClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,21 +187,21 @@ CClient::getServerAddress() const
CEvent::Type
CClient::getConnectedEvent()
{
return CEvent::registerTypeOnce(s_connectedEvent,
return EVENTQUEUE->registerTypeOnce(s_connectedEvent,
"CClient::connected");
}

CEvent::Type
CClient::getConnectionFailedEvent()
{
return CEvent::registerTypeOnce(s_connectionFailedEvent,
return EVENTQUEUE->registerTypeOnce(s_connectionFailedEvent,
"CClient::failed");
}

CEvent::Type
CClient::getDisconnectedEvent()
{
return CEvent::registerTypeOnce(s_disconnectedEvent,
return EVENTQUEUE->registerTypeOnce(s_disconnectedEvent,
"CClient::disconnected");
}

Expand Down
1 change: 1 addition & 0 deletions src/lib/io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ if (WIN32)
endif()

set(inc
../arch
../base
../common
)
Expand Down
11 changes: 6 additions & 5 deletions src/lib/io/IStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

#include "IStream.h"
#include "CEventQueue.h"

//
// IStream
Expand All @@ -30,34 +31,34 @@ CEvent::Type IStream::s_outputShutdownEvent = CEvent::kUnknown;
CEvent::Type
IStream::getInputReadyEvent()
{
return CEvent::registerTypeOnce(s_inputReadyEvent,
return EVENTQUEUE->registerTypeOnce(s_inputReadyEvent,
"IStream::inputReady");
}

CEvent::Type
IStream::getOutputFlushedEvent()
{
return CEvent::registerTypeOnce(s_outputFlushedEvent,
return EVENTQUEUE->registerTypeOnce(s_outputFlushedEvent,
"IStream::outputFlushed");
}

CEvent::Type
IStream::getOutputErrorEvent()
{
return CEvent::registerTypeOnce(s_outputErrorEvent,
return EVENTQUEUE->registerTypeOnce(s_outputErrorEvent,
"IStream::outputError");
}

CEvent::Type
IStream::getInputShutdownEvent()
{
return CEvent::registerTypeOnce(s_inputShutdownEvent,
return EVENTQUEUE->registerTypeOnce(s_inputShutdownEvent,
"IStream::inputShutdown");
}

CEvent::Type
IStream::getOutputShutdownEvent()
{
return CEvent::registerTypeOnce(s_outputShutdownEvent,
return EVENTQUEUE->registerTypeOnce(s_outputShutdownEvent,
"IStream::outputShutdown");
}
5 changes: 3 additions & 2 deletions src/lib/net/IDataSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

#include "IDataSocket.h"
#include "CEventQueue.h"

//
// IDataSocket
Expand All @@ -27,14 +28,14 @@ CEvent::Type IDataSocket::s_failedEvent = CEvent::kUnknown;
CEvent::Type
IDataSocket::getConnectedEvent()
{
return CEvent::registerTypeOnce(s_connectedEvent,
return EVENTQUEUE->registerTypeOnce(s_connectedEvent,
"IDataSocket::connected");
}

CEvent::Type
IDataSocket::getConnectionFailedEvent()
{
return CEvent::registerTypeOnce(s_failedEvent,
return EVENTQUEUE->registerTypeOnce(s_failedEvent,
"IDataSocket::failed");
}

Expand Down
3 changes: 2 additions & 1 deletion src/lib/net/IListenSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

#include "IListenSocket.h"
#include "CEventQueue.h"

//
// IListenSocket
Expand All @@ -26,6 +27,6 @@ CEvent::Type IListenSocket::s_connectingEvent = CEvent::kUnknown;
CEvent::Type
IListenSocket::getConnectingEvent()
{
return CEvent::registerTypeOnce(s_connectingEvent,
return EVENTQUEUE->registerTypeOnce(s_connectingEvent,
"IListenSocket::connecting");
}
3 changes: 2 additions & 1 deletion src/lib/net/ISocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

#include "ISocket.h"
#include "CEventQueue.h"

//
// ISocket
Expand All @@ -26,6 +27,6 @@ CEvent::Type ISocket::s_disconnectedEvent = CEvent::kUnknown;
CEvent::Type
ISocket::getDisconnectedEvent()
{
return CEvent::registerTypeOnce(s_disconnectedEvent,
return EVENTQUEUE->registerTypeOnce(s_disconnectedEvent,
"ISocket::disconnected");
}
2 changes: 1 addition & 1 deletion src/lib/server/CClientListener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ CClientListener::getNextClient()
CEvent::Type
CClientListener::getConnectedEvent()
{
return CEvent::registerTypeOnce(s_connectedEvent,
return EVENTQUEUE->registerTypeOnce(s_connectedEvent,
"CClientListener::connected");
}

Expand Down
Loading

0 comments on commit 5a31532

Please sign in to comment.