Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches
CInstanceVFS

Inherits IAddonInstance.

Classes

class  CVFSCallbacks
 

Public Member Functions

 CInstanceVFS (const IInstanceInfo &instance)
 VFS class constructor used to support multiple instance types.
 
virtual void ClearOutIdle ()
 Clear out any idle connections.
 
virtual bool Close (kodi::addon::VFSFileHandle context)
 Close a file.
 
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)
 
virtual bool CreateDirectory (const kodi::addon::VFSUrl &url)
 Create a directory.
 
virtual bool Delete (const kodi::addon::VFSUrl &url)
 Delete a file.
 
virtual bool DirectoryExists (const kodi::addon::VFSUrl &url)
 Check for directory existence.
 
virtual void DisconnectAll ()
 Disconnect all connections.
 
virtual bool Exists (const kodi::addon::VFSUrl &url)
 Check for file existence.
 
virtual int GetChunkSize (kodi::addon::VFSFileHandle context)
 Get chunk size of a file.
 
virtual bool GetDirectory (const kodi::addon::VFSUrl &url, std::vector< kodi::vfs::CDirEntry > &entries, CVFSCallbacks callbacks)
 List a directory.
 
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 bool IoControlGetCacheStatus (kodi::addon::VFSFileHandle context, kodi::vfs::CacheStatus &status)
 To check a running stream on file for state of his cache.
 
virtual bool IoControlGetSeekPossible (kodi::addon::VFSFileHandle context)
 To check seek possible on current stream by file.
 
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 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 ssize_t Read (kodi::addon::VFSFileHandle context, uint8_t *buffer, size_t uiBufSize)
 Read from a file.
 
virtual bool RemoveDirectory (const kodi::addon::VFSUrl &url)
 Remove a directory.
 
virtual bool Rename (const kodi::addon::VFSUrl &url, const kodi::addon::VFSUrl &url2)
 Rename a file.
 
virtual int64_t Seek (kodi::addon::VFSFileHandle context, int64_t position, int whence)
 Seek in a file.
 
virtual int Stat (const kodi::addon::VFSUrl &url, kodi::vfs::FileStatus &buffer)
 Stat a file.
 
virtual int Truncate (kodi::addon::VFSFileHandle context, int64_t size)
 Truncate a file.
 
virtual ssize_t Write (kodi::addon::VFSFileHandle context, const uint8_t *buffer, size_t uiBufSize)
 Write to a file.
 
 ~CInstanceVFS () override=default
 Destructor.
 
- Public Member Functions inherited from IAddonInstance
bool CheckInstanceSettingBoolean (const std::string &settingName, bool &settingValue)
 
template<typename enumType >
bool CheckInstanceSettingEnum (const std::string &settingName, enumType &settingValue)
 
bool CheckInstanceSettingFloat (const std::string &settingName, float &settingValue)
 
bool CheckInstanceSettingInt (const std::string &settingName, int &settingValue)
 
bool CheckInstanceSettingString (const std::string &settingName, std::string &settingValue)
 
virtual ADDON_STATUS CreateInstance (const kodi::addon::IInstanceInfo &instance, KODI_ADDON_INSTANCE_HDL &hdl)
 
std::string GetInstanceAPIVersion () const
 
bool GetInstanceSettingBoolean (const std::string &settingName, bool defaultValue=false)
 
template<typename enumType >
enumType GetInstanceSettingEnum (const std::string &settingName, enumType defaultValue=static_cast< enumType >(0))
 
float GetInstanceSettingFloat (const std::string &settingName, float defaultValue=0.0f)
 
int GetInstanceSettingInt (const std::string &settingName, int defaultValue=0)
 
std::string GetInstanceSettingString (const std::string &settingName, const std::string &defaultValue="")
 
std::string GetInstanceUserPath (const std::string &append="")
 
 IAddonInstance (const kodi::addon::IInstanceInfo &instance)
 
bool IsInstanceSettingUsingDefault (const std::string &settingName)
 
virtual ADDON_STATUS SetInstanceSetting (const std::string &settingName, const kodi::addon::CSettingValue &settingValue)
 
void SetInstanceSettingBoolean (const std::string &settingName, bool settingValue)
 
template<typename enumType >
void SetInstanceSettingEnum (const std::string &settingName, enumType settingValue)
 
void SetInstanceSettingFloat (const std::string &settingName, float settingValue)
 
void SetInstanceSettingInt (const std::string &settingName, int settingValue)
 
void SetInstanceSettingString (const std::string &settingName, const std::string &settingValue)
 

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