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
explicit ProtectionSpace(NSURLProtectionSpace *);
static bool platformCompare(const ProtectionSpace& a, const ProtectionSpace& b);
#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
bool encodingRequiresPlatformData() const { return m_nsSpace && encodingRequiresPlatformData(m_nsSpace.get()); }
#endif
#if USE(CFNETWORK)
CFURLProtectionSpaceRef cfSpace() const;
#endif
NSURLProtectionSpace *nsSpace() const;
private:
#if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
static bool encodingRequiresPlatformData(NSURLProtectionSpace *);
#endif
mutable RetainPtr<NSURLProtectionSpace> m_nsSpace;
};
}
#endif // ProtectionSpaceCocoa_h