Main Page   Class Hierarchy   Compound List   File List   Compound Members  

registryimpl.h

00001 /*
00002  *  Interface to register SLP services - Implementation
00003  *  Copyright (C) 2002-2003 Tim Jansen <tim@tjansen.de>
00004  *
00005  *  This library is free software; you can redistribute it and/or
00006  *  modify it under the terms of the GNU Library General Public
00007  *  License as published by the Free Software Foundation; either
00008  *  version 2 of the License, or (at your option) any later version.
00009  *
00010  *  This library 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 GNU
00013  *  Library General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU Library General Public License
00016  *  along with this library; see the file COPYING.LIB.  If not, write to
00017  *  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018  *  Boston, MA 02111-1307, USA.
00019  */
00020 
00021 #ifndef KDE_SLP_REGISTRYIMPL_H
00022 #define KDE_SLP_REGISTRYIMPL_H
00023 
00024 #include <kde/slp/registry.h>
00025 #include <qobject.h>
00026 
00027 
00028 namespace KDE {
00029 namespace SLP {
00030 
00031 
00039 class RegistryImpl : public QObject {
00040         Q_OBJECT
00041 private:
00042         QString m_lastError;
00043 public:
00044         virtual ~RegistryImpl();
00045         // reports error, always returns false!
00046         bool error(const QString &msg);
00047         // clears error, always returns true!
00048         bool success();
00049         // returns last error, or null if success
00050         QString lastError() const;
00051 
00052         virtual bool available() const = 0;
00053         virtual bool supportsAutoAddress() const = 0;
00054         virtual bool registerService(const KDE::SLP::Service &service,
00055                       bool autoAddress,
00056                       bool autoDeregister,
00057                       const QStringList &scopes,
00058                       unsigned short lifetime,
00059                       bool autoLifetimeExtension,
00060                       const QString &language) = 0;
00061         virtual bool deregister(const QString &serviceURL) = 0;
00062         virtual bool deregister(const KDE::SLP::Service &service) = 0;
00063         virtual bool findServiceTypes(const QString &token,
00064                               const QString &namingAuthority,
00065                               const QStringList &scopeList,
00066                               const QString &language,
00067                               bool allowAnyLanguage) = 0;
00068         virtual bool findServiceTypesAsync(const QString &token,
00069                               const QString &namingAuthority,
00070                               const QStringList &scopeList,
00071                               const QString &language,
00072                               bool allowAnyLanguage) = 0;
00073         virtual bool findServices(const QString &token,
00074                           const QString &srvtype,
00075                           bool fetchAttributes,
00076                           const KDE::SLP::Filter::List &filters,
00077                           const QString &scopelist,
00078                           const QString &language,
00079                           bool allowAnyLanguage) = 0;
00080         virtual bool findServicesAsync(const QString &token,
00081                                const QString &srvtype,
00082                                bool fetchAttributes,
00083                                const KDE::SLP::Filter::List &filters,
00084                                const QString &scopelist,
00085                                const QString &language,
00086                                bool allowAnyLanguage) = 0;
00087         virtual bool findAttributes(const QString &token,
00088                             const QString &serviceUrl,
00089                             const QStringList &attributeIds,
00090                             const QString &language,
00091                             bool allowAnyLanguage) = 0;
00092         virtual bool findAttributesAsync(const QString &token,
00093                                  const QString &serviceUrl,
00094                                  const QStringList &attributeIds,
00095                                  const QString &language,
00096                                  bool allowAnyLanguage) = 0;
00097         virtual bool findScopes(const QString &token,
00098                         const QString &language,
00099                         bool allowAnyLanguage) = 0;
00100         virtual bool findScopesAsync(const QString &token,
00101                             const QString &language,
00102                             bool allowAnyLanguage) = 0;
00103 
00104  signals:
00105         void foundServiceTypes(QString token, QStringList serviceTypes);
00106         void foundService(QString token,
00107                           KDE::SLP::Service service,
00108                           int lifetime);
00109         void foundAttributes(QString token,
00110                              KDE::SLP::Service service);
00111         void foundScopes(QString token,
00112                          QStringList scopeList);
00113         void operationFinished(QString token, bool success, QString msg);
00114 };
00115 
00116 }
00117 }
00118 
00119 #endif

Generated on Tue Jun 24 20:14:35 2003 for KDE::SLP by doxygen1.2.18