• Main Page
  • Classes
  • Files
  • File List

XSocket.h

00001 /*
00002  * synergy -- mouse and keyboard sharing utility
00003  * Copyright (C) 2012 Bolton Software Ltd.
00004  * Copyright (C) 2002 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 #ifndef XSOCKET_H
00020 #define XSOCKET_H
00021 
00022 #include "XIO.h"
00023 #include "XBase.h"
00024 #include "CString.h"
00025 #include "BasicTypes.h"
00026 
00028 XBASE_SUBCLASS(XSocket, XBase);
00029 
00031 
00034 class XSocketAddress : public XSocket {
00035 public:
00037     enum EError {
00038         kUnknown,       
00039         kNotFound,      
00040         kNoAddress,     
00041         kUnsupported,   
00042         kBadPort        
00043     };
00044 
00045     XSocketAddress(EError, const CString& hostname, int port) throw();
00046 
00048 
00049 
00051     EError              getError() const throw();
00053     CString             getHostname() const throw();
00055     int                 getPort() const throw();
00056 
00058 
00059 protected:
00060     // XBase overrides
00061     virtual CString     getWhat() const throw();
00062 
00063 private:
00064     EError              m_error;
00065     CString             m_hostname;
00066     int                 m_port;
00067 };
00068 
00070 
00073 XBASE_SUBCLASS_FORMAT(XSocketIOClose, XIOClose);
00074 
00076 
00079 XBASE_SUBCLASS_FORMAT(XSocketBind, XSocket);
00080 
00082 
00086 XBASE_SUBCLASS(XSocketAddressInUse, XSocketBind);
00087 
00089 
00092 XBASE_SUBCLASS_FORMAT(XSocketConnect, XSocket);
00093 
00095 
00098 XBASE_SUBCLASS_FORMAT(XSocketCreate, XSocket);
00099 
00100 #endif

Generated on Sat May 18 2013 00:00:04 for Synergy by  doxygen 1.7.1