18 #ifndef _VDIR_H_X_INCLUDED_ 19 #define _VDIR_H_X_INCLUDED_ 25 #define _FILE_OFFSET_BITS 64 28 #include <sys/types.h> 62 bool addFile(
const std::string& path,
const std::string& name,
63 const std::string& content,
const std::string& mimetype);
68 : file_length(0), last_modified(0), is_directory(
false),
81 std::function<int (const std::string&, FileInfo*)> getinfo;
82 std::function<void *(const std::string&)> open;
83 std::function<int (void *hdl, char* buf, size_t cnt)> read;
84 std::function<off_t (void *hdl, off_t offs, int whence)> seek;
85 std::function<void (void *hdl)> close;
static VirtualDir * getVirtualDir()
Get hold of the global object.
Definition: vdir.cxx:270
bool addFile(const std::string &path, const std::string &name, const std::string &content, const std::string &mimetype)
Add file entry, to be served internally.
Definition: vdir.cxx:100
Virtual directory handler to satisfy libupnp miniserver GETs.
Definition: device.cxx:49
bool addVDir(const std::string &path, FileOps fops)
Add virtual directory entry.
Definition: vdir.cxx:124