00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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
00046 bool error(const QString &msg);
00047
00048 bool success();
00049
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