ProtectionSpaceCocoa.h [plain text]
#ifndef ProtectionSpaceCocoa_h
#define ProtectionSpaceCocoa_h
#include "ProtectionSpaceBase.h"
#include <wtf/RetainPtr.h>
#if USE(CFNETWORK)
typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
#endif
OBJC_CLASS NSURLProtectionSpace;
namespace WebCore {
class ProtectionSpace : public ProtectionSpaceBase {
public:
ProtectionSpace() : ProtectionSpaceBase() { }
ProtectionSpace(const String& host, int port, ProtectionSpaceServerType serverType, const String& realm, ProtectionSpaceAuthenticationScheme authenticationScheme)
: ProtectionSpaceBase(host, port, serverType, realm, authenticationScheme)
{
}
ProtectionSpace(WTF::HashTableDeletedValueType deletedValue) : ProtectionSpaceBase(deletedValue) { }
#if USE(CFNETWORK)
explicit ProtectionSpace(CFURLProtectionSpaceRef);
#endif
WEBCORE_EXPORT explicit ProtectionSpace(NSURLProtectionSpace *);
static bool platformCompare(const ProtectionSpace& a, const ProtectionSpace& b);
bool encodingRequiresPlatformData() const { return m_nsSpace && encodingRequiresPlatformData(m_nsSpace.get()); }
WEBCORE_EXPORT bool receivesCredentialSecurely() const;
#if USE(CFNETWORK)
CFURLProtectionSpaceRef cfSpace() const;
#endif
WEBCORE_EXPORT NSURLProtectionSpace *nsSpace() const;
private:
WEBCORE_EXPORT static bool encodingRequiresPlatformData(NSURLProtectionSpace *);
mutable RetainPtr<NSURLProtectionSpace> m_nsSpace;
};
}
#endif // ProtectionSpaceCocoa_h