XSynergy.cpp

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 #include "XSynergy.h"
00016 #include "CStringUtil.h"
00017 
00018 //
00019 // XBadClient
00020 //
00021 
00022 CString
00023 XBadClient::getWhat() const throw()
00024 {
00025     return "XBadClient";
00026 }
00027 
00028 
00029 //
00030 // XIncompatibleClient
00031 //
00032 
00033 XIncompatibleClient::XIncompatibleClient(int major, int minor) :
00034     m_major(major),
00035     m_minor(minor)
00036 {
00037     // do nothing
00038 }
00039 
00040 int
00041 XIncompatibleClient::getMajor() const throw()
00042 {
00043     return m_major;
00044 }
00045 
00046 int
00047 XIncompatibleClient::getMinor() const throw()
00048 {
00049     return m_minor;
00050 }
00051 
00052 CString
00053 XIncompatibleClient::getWhat() const throw()
00054 {
00055     return format("XIncompatibleClient", "incompatible client %{1}.%{2}",
00056                                 CStringUtil::print("%d", m_major).c_str(),
00057                                 CStringUtil::print("%d", m_minor).c_str());
00058 }
00059 
00060 
00061 //
00062 // XDuplicateClient
00063 //
00064 
00065 XDuplicateClient::XDuplicateClient(const CString& name) :
00066     m_name(name)
00067 {
00068     // do nothing
00069 }
00070 
00071 const CString&
00072 XDuplicateClient::getName() const throw()
00073 {
00074     return m_name;
00075 }
00076 
00077 CString
00078 XDuplicateClient::getWhat() const throw()
00079 {
00080     return format("XDuplicateClient", "duplicate client %{1}", m_name.c_str());
00081 }
00082 
00083 
00084 //
00085 // XUnknownClient
00086 //
00087 
00088 XUnknownClient::XUnknownClient(const CString& name) :
00089     m_name(name)
00090 {
00091     // do nothing
00092 }
00093 
00094 const CString&
00095 XUnknownClient::getName() const throw()
00096 {
00097     return m_name;
00098 }
00099 
00100 CString
00101 XUnknownClient::getWhat() const throw()
00102 {
00103     return format("XUnknownClient", "unknown client %{1}", m_name.c_str());
00104 }

Generated on Fri Nov 6 00:18:46 2009 for synergy-plus by  doxygen 1.4.7