• Main Page
  • Classes
  • Files
  • File List

IStream.cpp

00001 /*
00002  * synergy -- mouse and keyboard sharing utility
00003  * Copyright (C) 2012 Bolton Software Ltd.
00004  * Copyright (C) 2004 Chris Schoeneman
00005  * 
00006  * This package is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * found in the file COPYING that should have accompanied this file.
00009  * 
00010  * This package is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017  */
00018 
00019 #include "IStream.h"
00020 #include "CEventQueue.h"
00021 
00022 using namespace synergy;
00023 
00024 //
00025 // IStream
00026 //
00027 
00028 CEvent::Type            IStream::s_inputReadyEvent     = CEvent::kUnknown;
00029 CEvent::Type            IStream::s_outputFlushedEvent  = CEvent::kUnknown;
00030 CEvent::Type            IStream::s_outputErrorEvent    = CEvent::kUnknown;
00031 CEvent::Type            IStream::s_inputShutdownEvent  = CEvent::kUnknown;
00032 CEvent::Type            IStream::s_outputShutdownEvent = CEvent::kUnknown;
00033 
00034 CEvent::Type
00035 IStream::getInputReadyEvent()
00036 {
00037     return m_eventQueue->registerTypeOnce(s_inputReadyEvent,
00038                             "IStream::inputReady");
00039 }
00040 
00041 CEvent::Type
00042 IStream::getOutputFlushedEvent()
00043 {
00044     return m_eventQueue->registerTypeOnce(s_outputFlushedEvent,
00045                             "IStream::outputFlushed");
00046 }
00047 
00048 CEvent::Type
00049 IStream::getOutputErrorEvent()
00050 {
00051     return m_eventQueue->registerTypeOnce(s_outputErrorEvent,
00052                             "IStream::outputError");
00053 }
00054 
00055 CEvent::Type
00056 IStream::getInputShutdownEvent()
00057 {
00058     return m_eventQueue->registerTypeOnce(s_inputShutdownEvent,
00059                             "IStream::inputShutdown");
00060 }
00061 
00062 CEvent::Type
00063 IStream::getOutputShutdownEvent()
00064 {
00065     return m_eventQueue->registerTypeOnce(s_outputShutdownEvent,
00066                             "IStream::outputShutdown");
00067 }
00068 
00069 IEventQueue&
00070 IStream::getEventQueue() const
00071 {
00072     assert(m_eventQueue != NULL);
00073     return *m_eventQueue;
00074 }

Generated on Mon May 20 2013 00:00:06 for Synergy by  doxygen 1.7.1