diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bcb704366cb5e333a626c18c308c7e0448a8e69f (patch) | |
tree | f0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kopete/libkopete/kopeteutils.h | |
download | tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/libkopete/kopeteutils.h')
-rw-r--r-- | kopete/libkopete/kopeteutils.h | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/kopete/libkopete/kopeteutils.h b/kopete/libkopete/kopeteutils.h new file mode 100644 index 00000000..1cbcb4c3 --- /dev/null +++ b/kopete/libkopete/kopeteutils.h @@ -0,0 +1,114 @@ +/* + Kopete Utils. + + Copyright (c) 2005 Duncan Mac-Vicar Prett <duncan@kde.org> + + Kopete (c) 2002-2003 by the Kopete developers <kopete-devel@kde.org> + + ************************************************************************* + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + ************************************************************************* +*/ + +#ifndef KOPETE_UTILS_H +#define KOPETE_UTILS_H + +#include "qobject.h" +#include "qstring.h" +#include "qpixmap.h" +#include "kopete_export.h" + +class KNotification; + +namespace Kopete +{ + +class Account; + +namespace Utils +{ + +/** + * Checks if host is accesible. Useful for plugins to check for disconnected events. + * + * @param host The host to be cheked + */ +bool isHostReachable( const QString &host ); + +/** + * Notifies the user connection has been lost without coupling plugins with GUI code. + * + * @param account The account that lost the connection and wants to notify the user. + * @param caption A brief subject line, used where possible if the presentation allows it. + * @param message A short description of the error. + * @param explanation A long description on how the error occured and what the user can do about it. + * @param debugInfo Debug info that can be sent to the developers or to the network service owners. + * + * You can not provide debugInfo without an user explanation. If you don't provide a caption, message, or + * explanation, Kopete will use a default explanation. + */ +void KOPETE_EXPORT notifyConnectionLost( const Account *account, + const QString &caption = QString::null, + const QString &message = QString::null, + const QString &explanation = QString::null, + const QString &debugInfo = QString::null ); + + +/** + * Notifies the user the server is not reachable without coupling plugins with GUI code. + * + * @param account The account that cannot establish a connection and want to notify the user about that. + * @param explanation A long description on how the error occured and what the user can do about it. + * @param debugInfo Debug info that can be sent to the developers or to the network service owners. + * + * You can not provide debugInfo without an user explanation. If you don't provide a caption, message, or + * explanation, Kopete will use a default explanation. + */ +void KOPETE_EXPORT notifyCannotConnect( const Account *account, + const QString &explanation = QString::null, + const QString &debugInfo = QString::null); + +/** + * Notifies the user that an error on a connection occcured without coupling plugins with GUI code. + * + * @param account The account where the connection error occured and wants to notify the user. + * @param caption A brief subject line, used where possible if the presentation allows it. + * @param message A short description of the error. + * @param explanation A long description on how the error occured and what the user can do about it. + * @param debugInfo Debug info that can be sent to the developers or to the network service owners. + * + * You can not provide debugInfo without an user explanation. If you don't provide a caption, message, or + * explanation, Kopete will use a default explanation. + */ +void KOPETE_EXPORT notifyConnectionError( const Account *account, + const QString &caption = QString::null, + const QString &message = QString::null, + const QString &explanation = QString::null, + const QString &debugInfo = QString::null ); + +/** + * Notifies the user that an error on the server occcured without coupling plugins with GUI code. + * + * @param account The account where the server error occured and wants to notify the user. + * @param caption A brief subject line, used where possible if the presentation allows it. + * @param message A short description of the error. + * @param explanation A long description on how the error occured and what the user can do about it. + * @param debugInfo Debug info that can be sent to the developers or to the network service owners. + * + * You can not provide debugInfo without an user explanation. If you don't provide a caption, message, or + * explanation, Kopete will use a default explanation. + */ +void KOPETE_EXPORT notifyServerError( const Account *account, + const QString &caption = QString::null, + const QString &message = QString::null, + const QString &explanation = QString::null, + const QString &debugInfo = QString::null ); +} // end ns Utils +} // end ns Kopete + +#endif |