Go to the documentation of this file.
14 #ifndef VIRTUALFILEHTTP_H
15 #define VIRTUALFILEHTTP_H
25 class VirtualFileMountHTTP;
32 class EXPCL_PANDA_DOWNLOADER VirtualFileHTTP :
public VirtualFile {
34 VirtualFileHTTP(VirtualFileMountHTTP *mount,
36 bool implicit_pz_file,
38 virtual ~VirtualFileHTTP();
41 virtual Filename get_filename()
const;
46 INLINE
bool is_implicit_pz_file()
const;
50 virtual std::streamsize
get_file_size(std::istream *stream)
const;
55 bool fetch_file(std::ostream *buffer_stream)
const;
56 std::istream *return_file(std::istream *buffer_stream,
bool auto_unwrap)
const;
58 VirtualFileMountHTTP *_mount;
60 bool _implicit_pz_file;
63 PT(HTTPChannel) _channel;
67 return get_class_type();
69 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
77 static void init_type() {
78 VirtualFile::init_type();
80 VirtualFile::get_class_type());
89 #endif // HAVE_OPENSSL
A container for a URL, e.g.
virtual std::streamsize get_file_size() const
Returns the current size on disk (or wherever it is) of the file before it has been opened.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual bool is_directory() const
Returns true if this file represents a directory (and scan_directory() may be called),...
virtual time_t get_timestamp() const
Returns a time_t value that represents the time the file was last modified, to within whatever precis...
A hierarchy of directories and files that appears to be one continuous file system,...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual bool was_read_successful() const
Call this method after a reading the istream returned by open_read_file() to completion.
virtual bool has_file() const
Returns true if this file exists, false otherwise.
virtual std::istream * open_read_file(bool auto_unwrap) const
Opens the file for reading.
virtual bool is_regular_file() const
Returns true if this file represents a regular file (and read_file() may be called),...
The abstract base class for a file or directory within the VirtualFileSystem.
The name of a file, such as a texture file or an Egg file.