Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
No Matches
kodi::addon::CInstanceVFS Class Reference

#include <VFS.h>

Inheritance diagram for kodi::addon::CInstanceVFS:


class  CVFSCallbacks

Public Member Functions

 CInstanceVFS (const IInstanceInfo &instance)
 VFS class constructor used to support multiple instance types.
 ~CInstanceVFS () override=default
virtual kodi::addon::VFSFileHandle Open (const kodi::addon::VFSUrl &url)
 Open a file for input.
virtual kodi::addon::VFSFileHandle OpenForWrite (const kodi::addon::VFSUrl &url, bool overWrite)
 Open a file for output.
virtual bool Close (kodi::addon::VFSFileHandle context)
 Close a file.
virtual ssize_t Read (kodi::addon::VFSFileHandle context, uint8_t *buffer, size_t uiBufSize)
 Read from a file.
virtual ssize_t Write (kodi::addon::VFSFileHandle context, const uint8_t *buffer, size_t uiBufSize)
 Write to a file.
virtual int64_t Seek (kodi::addon::VFSFileHandle context, int64_t position, int whence)
 Seek in a file.
virtual int Truncate (kodi::addon::VFSFileHandle context, int64_t size)
 Truncate a file.
virtual int64_t GetLength (kodi::addon::VFSFileHandle context)
 Get total size of a file.
virtual int64_t GetPosition (kodi::addon::VFSFileHandle context)
 Get current position in a file.
virtual int GetChunkSize (kodi::addon::VFSFileHandle context)
 Get chunk size of a file.
virtual bool IoControlGetSeekPossible (kodi::addon::VFSFileHandle context)
 To check seek possible on current stream by file.
virtual bool IoControlGetCacheStatus (kodi::addon::VFSFileHandle context, kodi::vfs::CacheStatus &status)
 To check a running stream on file for state of his cache.
virtual bool IoControlSetCacheRate (kodi::addon::VFSFileHandle context, uint32_t rate)
 Unsigned int with speed limit for caching in bytes per second.
virtual bool IoControlSetRetry (kodi::addon::VFSFileHandle context, bool retry)
 Enable/disable retry within the protocol handler (if supported).
virtual int Stat (const kodi::addon::VFSUrl &url, kodi::vfs::FileStatus &buffer)
 Stat a file.
virtual bool Exists (const kodi::addon::VFSUrl &url)
 Check for file existence.
virtual void ClearOutIdle ()
 Clear out any idle connections.
virtual void DisconnectAll ()
 Disconnect all connections.
virtual bool Delete (const kodi::addon::VFSUrl &url)
 Delete a file.
virtual bool Rename (const kodi::addon::VFSUrl &url, const kodi::addon::VFSUrl &url2)
 Rename a file.
virtual bool DirectoryExists (const kodi::addon::VFSUrl &url)
 Check for directory existence.
virtual bool RemoveDirectory (const kodi::addon::VFSUrl &url)
 Remove a directory.
virtual bool CreateDirectory (const kodi::addon::VFSUrl &url)
 Create a directory.
virtual bool GetDirectory (const kodi::addon::VFSUrl &url, std::vector< kodi::vfs::CDirEntry > &entries, CVFSCallbacks callbacks)
 List a directory.
virtual bool ContainsFiles (const kodi::addon::VFSUrl &url, std::vector< kodi::vfs::CDirEntry > &entries, std::string &rootPath)
 Check if file should be presented as a directory (multiple streams)
- Public Member Functions inherited from kodi::addon::IAddonInstance
 IAddonInstance (const kodi::addon::IInstanceInfo &instance)
virtual ~IAddonInstance ()=default
virtual ADDON_STATUS CreateInstance (const kodi::addon::IInstanceInfo &instance, KODI_ADDON_INSTANCE_HDL &hdl)
std::string GetInstanceAPIVersion () const
virtual ADDON_STATUS SetInstanceSetting (const std::string &settingName, const kodi::addon::CSettingValue &settingValue)
bool IsInstanceSettingUsingDefault (const std::string &settingName)
std::string GetInstanceUserPath (const std::string &append="")
bool CheckInstanceSettingString (const std::string &settingName, std::string &settingValue)
std::string GetInstanceSettingString (const std::string &settingName, const std::string &defaultValue="")
void SetInstanceSettingString (const std::string &settingName, const std::string &settingValue)
bool CheckInstanceSettingInt (const std::string &settingName, int &settingValue)
int GetInstanceSettingInt (const std::string &settingName, int defaultValue=0)
void SetInstanceSettingInt (const std::string &settingName, int settingValue)
bool CheckInstanceSettingBoolean (const std::string &settingName, bool &settingValue)
bool GetInstanceSettingBoolean (const std::string &settingName, bool defaultValue=false)
void SetInstanceSettingBoolean (const std::string &settingName, bool settingValue)
bool CheckInstanceSettingFloat (const std::string &settingName, float &settingValue)
float GetInstanceSettingFloat (const std::string &settingName, float defaultValue=0.0f)
void SetInstanceSettingFloat (const std::string &settingName, float settingValue)
template<typename enumType >
bool CheckInstanceSettingEnum (const std::string &settingName, enumType &settingValue)
template<typename enumType >
enumType GetInstanceSettingEnum (const std::string &settingName, enumType defaultValue=static_cast< enumType >(0))
template<typename enumType >
void SetInstanceSettingEnum (const std::string &settingName, enumType settingValue)

The documentation for this class was generated from the following file: