kitchensync Library API Documentation

stderror.cpp

00001 /*
00002     This file is part of KitchenSync.
00003 
00004     Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to
00018     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00019     Boston, MA 02111-1307, USA.
00020 */
00021 #include <klocale.h>
00022 
00023 #include "stderror.h"
00024 
00025 using namespace KSync;
00026 
00027 Error StdError::connectionLost()
00028 {
00029     return Error( Error::ConnectionLost,  i18n("The connections was lost.") );
00030 }
00031 
00032 Error StdError::wrongPassword()
00033 {
00034     return Error( Error::WrongPassword,  i18n("The password was wrong.") );
00035 }
00036 
00037 Error StdError::authenticationError()
00038 {
00039     return Error( Error::Authentication, i18n("Could not authenticate.") );
00040 }
00041 
00042 Error StdError::wrongUser( const QString& user )
00043 {
00044     return Error( Error::WrongUser,  i18n("The username '%1' was wrong").arg(user) );
00045 }
00046 
00047 Error StdError::wrongIP()
00048 {
00049     return Error( Error::WrongIP, i18n("The entered IP address was wrong.") );
00050 }
00051 
00052 Error StdError::couldNotConnect()
00053 {
00054     return Error( Error::CouldNotConnect, i18n("Could not connect.") );
00055 }
00056 
00057 Error StdError::downloadError(const QString& file)
00058 {
00059     return Error( Error::DownloadError, i18n("Could not download '%1'").arg(file) );
00060 }
00061 
00062 Error StdError::uploadError(const QString& file)
00063 {
00064     return Error( Error::UploadError, i18n("Could not upload '%1'").arg(file) );
00065 }
00066 
00067 Error StdError::konnectorDoesNotExist()
00068 {
00069     return Error( Error::KonnectorNotExist, i18n("The Konnector does not exist") );
00070 }
00071 
00072 Error StdError::backupNotSupported()
00073 {
00074     return Error( Error::BackupNotSupported, i18n("Backing up is currently not supported.") );
00075 }
00076 
00077 Error StdError::restoreNotSupported()
00078 {
00079     return Error( Error::RestoreNotSupported, i18n("Restoring is currently not supported.") );
00080 }
00081 
00082 Error StdError::downloadNotSupported()
00083 {
00084     return Error( Error::DownloadNotSupported, i18n("Downloading custom resources is currently not supported.") );
00085 }
KDE Logo
This file is part of the documentation for kitchensync Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Dec 21 14:23:41 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003