Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

XSocket.h

00001 /*
00002  * synergy -- mouse and keyboard sharing utility
00003  * Copyright (C) 2002 Chris Schoeneman
00004  * 
00005  * This package is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * found in the file COPYING that should have accompanied this file.
00008  * 
00009  * This package is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  */
00014 
00015 #ifndef XSOCKET_H
00016 #define XSOCKET_H
00017 
00018 #include "XIO.h"
00019 #include "XBase.h"
00020 #include "CString.h"
00021 #include "BasicTypes.h"
00022 
00024 XBASE_SUBCLASS(XSocket, XBase);
00025 
00027 
00030 class XSocketAddress : public XSocket {
00031 public:
00033     enum EError {
00034         kUnknown,       
00035         kNotFound,      
00036         kNoAddress,     
00037         kUnsupported,   
00038         kBadPort        
00039     };
00040 
00041     XSocketAddress(EError, const CString& hostname, int port) throw();
00042 
00044 
00045 
00047     EError              getError() const throw();
00049     CString             getHostname() const throw();
00051     int                 getPort() const throw();
00052 
00054 
00055 protected:
00056     // XBase overrides
00057     virtual CString     getWhat() const throw();
00058 
00059 private:
00060     EError              m_error;
00061     CString             m_hostname;
00062     int                 m_port;
00063 };
00064 
00066 
00069 XBASE_SUBCLASS_FORMAT(XSocketIOClose, XIOClose);
00070 
00072 
00075 XBASE_SUBCLASS_FORMAT(XSocketBind, XSocket);
00076 
00078 
00082 XBASE_SUBCLASS(XSocketAddressInUse, XSocketBind);
00083 
00085 
00088 XBASE_SUBCLASS_FORMAT(XSocketConnect, XSocket);
00089 
00091 
00094 XBASE_SUBCLASS_FORMAT(XSocketCreate, XSocket);
00095 
00096 #endif

Generated on Fri Nov 6 00:21:15 2009 for synergy-plus by  doxygen 1.3.9.1