• Main Page
  • Classes
  • Files
  • File List

XSynergy.cpp

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 #include "XSynergy.h"
00020 #include "CStringUtil.h"
00021 
00022 //
00023 // XBadClient
00024 //
00025 
00026 CString
00027 XBadClient::getWhat() const throw()
00028 {
00029     return "XBadClient";
00030 }
00031 
00032 
00033 //
00034 // XIncompatibleClient
00035 //
00036 
00037 XIncompatibleClient::XIncompatibleClient(int major, int minor) :
00038     m_major(major),
00039     m_minor(minor)
00040 {
00041     // do nothing
00042 }
00043 
00044 int
00045 XIncompatibleClient::getMajor() const throw()
00046 {
00047     return m_major;
00048 }
00049 
00050 int
00051 XIncompatibleClient::getMinor() const throw()
00052 {
00053     return m_minor;
00054 }
00055 
00056 CString
00057 XIncompatibleClient::getWhat() const throw()
00058 {
00059     return format("XIncompatibleClient", "incompatible client %{1}.%{2}",
00060                                 CStringUtil::print("%d", m_major).c_str(),
00061                                 CStringUtil::print("%d", m_minor).c_str());
00062 }
00063 
00064 
00065 //
00066 // XDuplicateClient
00067 //
00068 
00069 XDuplicateClient::XDuplicateClient(const CString& name) :
00070     m_name(name)
00071 {
00072     // do nothing
00073 }
00074 
00075 const CString&
00076 XDuplicateClient::getName() const throw()
00077 {
00078     return m_name;
00079 }
00080 
00081 CString
00082 XDuplicateClient::getWhat() const throw()
00083 {
00084     return format("XDuplicateClient", "duplicate client %{1}", m_name.c_str());
00085 }
00086 
00087 
00088 //
00089 // XUnknownClient
00090 //
00091 
00092 XUnknownClient::XUnknownClient(const CString& name) :
00093     m_name(name)
00094 {
00095     // do nothing
00096 }
00097 
00098 const CString&
00099 XUnknownClient::getName() const throw()
00100 {
00101     return m_name;
00102 }
00103 
00104 CString
00105 XUnknownClient::getWhat() const throw()
00106 {
00107     return format("XUnknownClient", "unknown client %{1}", m_name.c_str());
00108 }
00109 
00110 
00111 //
00112 // XExitApp
00113 //
00114 
00115 XExitApp::XExitApp(int code) :
00116     m_code(code)
00117 {
00118     // do nothing
00119 }
00120 
00121 int
00122 XExitApp::getCode() const throw()
00123 {
00124     return m_code;
00125 }
00126 
00127 CString
00128 XExitApp::getWhat() const throw()
00129 {
00130     return format(
00131         "XExitApp", "exiting with code %{1}", 
00132         CStringUtil::print("%d", m_code).c_str());
00133 }

Generated on Wed Jun 19 2013 00:00:05 for Synergy by  doxygen 1.7.1