15 #ifndef VIRTUALFILEHTTP_H
16 #define VIRTUALFILEHTTP_H
18 #include "pandabase.h"
20 #include "virtualFile.h"
21 #include "httpChannel.h"
26 class VirtualFileMountHTTP;
34 class EXPCL_PANDAEXPRESS VirtualFileHTTP :
public VirtualFile {
36 VirtualFileHTTP(VirtualFileMountHTTP *mount,
38 bool implicit_pz_file,
40 virtual ~VirtualFileHTTP();
43 virtual Filename get_filename()
const;
48 INLINE
bool is_implicit_pz_file()
const;
57 bool fetch_file(ostream *buffer_stream)
const;
58 istream *return_file(istream *buffer_stream,
bool auto_unwrap)
const;
60 VirtualFileMountHTTP *_mount;
62 bool _implicit_pz_file;
65 PT(HTTPChannel) _channel;
69 return get_class_type();
71 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
79 static void init_type() {
80 VirtualFile::init_type();
81 register_type(_type_handle,
"VirtualFileHTTP",
82 VirtualFile::get_class_type());
89 #include "virtualFileHTTP.I"
91 #endif // HAVE_OPENSSL
virtual istream * open_read_file(bool auto_unwrap) const
Opens the file for reading.
A container for a URL, e.g.
A hierarchy of directories and files that appears to be one continuous file system, even though the files may originate from several different sources that may not be related to the actual OS's file system.
The abstract base class for a file or directory within the VirtualFileSystem.
virtual bool is_regular_file() const
Returns true if this file represents a regular file (and read_file() may be called), false otherwise.
virtual bool has_file() const
Returns true if this file exists, false otherwise.
virtual time_t get_timestamp() const
Returns a time_t value that represents the time the file was last modified, to within whatever precis...
The name of a file, such as a texture file or an Egg file.
virtual bool was_read_successful() const
Call this method after a reading the istream returned by open_read_file() to completion.
virtual streamsize get_file_size() const
Returns the current size on disk (or wherever it is) of the file before it has been opened...
TypeHandle is the identifier used to differentiate C++ class types.
virtual bool is_directory() const
Returns true if this file represents a directory (and scan_directory() may be called), false otherwise.