AuthenticationChallengeBase.h [plain text]
#ifndef AuthenticationChallengeBase_h
#define AuthenticationChallengeBase_h
#include "Credential.h"
#include "ProtectionSpace.h"
#include "ResourceResponse.h"
#include "ResourceError.h"
namespace WebCore {
class AuthenticationChallenge;
class AuthenticationChallengeBase {
public:
WEBCORE_EXPORT AuthenticationChallengeBase();
WEBCORE_EXPORT AuthenticationChallengeBase(const ProtectionSpace& protectionSpace, const Credential& proposedCredential, unsigned previousFailureCount, const ResourceResponse& response, const ResourceError& error);
WEBCORE_EXPORT unsigned previousFailureCount() const;
WEBCORE_EXPORT const Credential& proposedCredential() const;
WEBCORE_EXPORT const ProtectionSpace& protectionSpace() const;
WEBCORE_EXPORT const ResourceResponse& failureResponse() const;
WEBCORE_EXPORT const ResourceError& error() const;
WEBCORE_EXPORT bool isNull() const;
WEBCORE_EXPORT void nullify();
WEBCORE_EXPORT static bool compare(const AuthenticationChallenge& a, const AuthenticationChallenge& b);
protected:
static bool platformCompare(const AuthenticationChallengeBase&, const AuthenticationChallengeBase&) { return true; }
bool m_isNull;
ProtectionSpace m_protectionSpace;
Credential m_proposedCredential;
unsigned m_previousFailureCount;
ResourceResponse m_failureResponse;
ResourceError m_error;
};
inline bool operator==(const AuthenticationChallenge& a, const AuthenticationChallenge& b) { return AuthenticationChallengeBase::compare(a, b); }
inline bool operator!=(const AuthenticationChallenge& a, const AuthenticationChallenge& b) { return !(a == b); }
}
#endif