14 #ifndef VIRTUALFILEMOUNTHTTP_H 15 #define VIRTUALFILEMOUNTHTTP_H 31 class EXPCL_PANDA_DOWNLOADER VirtualFileMountHTTP :
public VirtualFileMount {
33 explicit VirtualFileMountHTTP(
const URLSpec &root, HTTPClient *http = HTTPClient::get_global_ptr());
34 virtual ~VirtualFileMountHTTP();
36 INLINE HTTPClient *get_http_client()
const;
37 INLINE
const URLSpec &get_root()
const;
39 static void reload_vfs_mount_url();
44 bool implicit_pz_file,
47 virtual bool has_file(
const Filename &file)
const;
48 virtual bool is_directory(
const Filename &file)
const;
49 virtual bool is_regular_file(
const Filename &file)
const;
51 virtual std::istream *open_read_file(
const Filename &file)
const;
52 virtual std::streamsize get_file_size(
const Filename &file, std::istream *stream)
const;
53 virtual std::streamsize get_file_size(
const Filename &file)
const;
54 virtual time_t get_timestamp(
const Filename &file)
const;
56 virtual bool scan_directory(vector_string &contents,
59 virtual void output(std::ostream &out)
const;
61 PT(HTTPChannel) get_channel();
62 void recycle_channel(HTTPChannel *channel);
69 typedef pvector< PT(HTTPChannel) > Channels;
74 return get_class_type();
76 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
80 static void init_type() {
81 VirtualFileMount::init_type();
83 VirtualFileMount::get_class_type());
92 #endif // HAVE_OPENSSL A container for a URL, e.g.
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(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The abstract base class for a file or directory within the VirtualFileSystem.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is our own Panda specialization on the default STL vector.
The name of a file, such as a texture file or an Egg file.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The abstract base class for a mount definition used within a VirtualFileSystem.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A fake mutex implementation for single-threaded applications that don't need any synchronization cont...
TypeHandle is the identifier used to differentiate C++ class types.
virtual PointerTo< VirtualFile > make_virtual_file(const Filename &local_filename, const Filename &original_filename, bool implicit_pz_file, int open_flags)
Constructs and returns a new VirtualFile instance that corresponds to the indicated filename within t...