File indexing completed on 2024-06-23 04:03:41

0001 /*
0002  * Copyright (C) 2006  Maciek Niedzielski
0003  *
0004  * This library is free software; you can redistribute it and/or
0005  * modify it under the terms of the GNU Lesser General Public
0006  * License as published by the Free Software Foundation; either
0007  * either version 2
0008    of the License, or (at your option) any later version.1 of the License, or (at your option) any later version.
0009  *
0010  * This library is distributed in the hope that it will be useful,
0011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0013  * Lesser General Public License for more details.
0014  *
0015  * You should have received a copy of the GNU Lesser General Public
0016  * License along with this library; if not, write to the Free Software
0017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
0018  *
0019  */
0020 
0021 #ifndef XMPP_AUTHREQUEST_H
0022 #define XMPP_AUTHREQUEST_H
0023 
0024 #include <QString>
0025 
0026 class QDomElement;
0027 class QDomDocument;
0028 
0029 namespace XMPP
0030 {
0031     class HttpAuthRequest
0032     {
0033     public:
0034         HttpAuthRequest(const QString &m, const QString &u, const QString &i);
0035         HttpAuthRequest(const QString &m = "", const QString &u = "");
0036         HttpAuthRequest(const QDomElement &);
0037 
0038         bool isEmpty() const;
0039 
0040         void setMethod(const QString&);
0041         void setUrl(const QString&);
0042         void setId(const QString&);
0043         QString method() const;
0044         QString url() const;
0045         QString id() const;
0046         bool hasId() const;
0047 
0048         QDomElement toXml(QDomDocument &) const;
0049         bool fromXml(const QDomElement &);
0050 
0051         static Stanza::Error denyError;
0052     private:
0053         QString method_, url_, id_;
0054         bool hasId_;
0055     };
0056 }
0057 
0058 #endif