LegacyWebArchive.h [plain text]
#ifndef LegacyWebArchive_h
#define LegacyWebArchive_h
#include "Archive.h"
#include <functional>
namespace WebCore {
class Frame;
class Node;
class Range;
class LegacyWebArchive : public Archive {
public:
WEBCORE_EXPORT static PassRefPtr<LegacyWebArchive> create();
WEBCORE_EXPORT static PassRefPtr<LegacyWebArchive> create(SharedBuffer*);
WEBCORE_EXPORT static PassRefPtr<LegacyWebArchive> create(const URL&, SharedBuffer*);
WEBCORE_EXPORT static PassRefPtr<LegacyWebArchive> create(PassRefPtr<ArchiveResource> mainResource, Vector<RefPtr<ArchiveResource>> subresources, Vector<RefPtr<LegacyWebArchive>> subframeArchives);
WEBCORE_EXPORT static PassRefPtr<LegacyWebArchive> create(Node*, std::function<bool(Frame&)> frameFilter = nullptr);
WEBCORE_EXPORT static PassRefPtr<LegacyWebArchive> create(Frame*);
WEBCORE_EXPORT static PassRefPtr<LegacyWebArchive> createFromSelection(Frame*);
WEBCORE_EXPORT static PassRefPtr<LegacyWebArchive> create(Range*);
virtual Type type() const override;
WEBCORE_EXPORT RetainPtr<CFDataRef> rawDataRepresentation();
private:
LegacyWebArchive() { }
enum MainResourceStatus { Subresource, MainResource };
static PassRefPtr<LegacyWebArchive> create(const String& markupString, Frame*, const Vector<Node*>& nodes, std::function<bool (Frame&)> frameFilter);
static PassRefPtr<ArchiveResource> createResource(CFDictionaryRef);
static ResourceResponse createResourceResponseFromMacArchivedData(CFDataRef);
static ResourceResponse createResourceResponseFromPropertyListData(CFDataRef, CFStringRef responseDataType);
static RetainPtr<CFDataRef> createPropertyListRepresentation(const ResourceResponse&);
static RetainPtr<CFDictionaryRef> createPropertyListRepresentation(Archive*);
static RetainPtr<CFDictionaryRef> createPropertyListRepresentation(ArchiveResource*, MainResourceStatus);
bool extract(CFDictionaryRef);
};
}
#endif // Archive