Kodi Development  20.0
for Binary and Script based Add-Ons

Detailed Description

VFS add-on URL data
This class is used to inform the addon of the desired wanted connection.

Used on mostly all addon functions to identify related target.


The following table contains values that can be set with class VFSUrl :

Name Type Get call
URL std::string GetURL
Domain name std::string GetDomain
Hostname std::string GetHostname
Filename std::string GetFilename
Network port unsigned int GetPort
Special options std::string GetOptions
Username std::string GetUsername
Password std::string GetPassword
Get URL with user and password hidden std::string GetRedacted
Sharename std::string GetSharename
Network protocol std::string GetProtocol

Modules

 Value Help
 

Function Documentation

◆ GetURL()

std::string GetURL ( ) const
inline

Desired URL of the file system to be edited.

This includes all available parts of the access and is structured as follows:

  • <PROTOCOL>://<USERNAME>:<PASSWORD>@<HOSTNAME>:<PORT>/<FILENAME>?<OPTIONS>

◆ GetDomain()

std::string GetDomain ( ) const
inline

The associated domain name, which is optional and not available in all cases.

◆ GetHostname()

std::string GetHostname ( ) const
inline

This includes the network address (e.g. 192.168.0.123) or if the addon refers to file packages the path to it (e.g. /home/by_me/MyPacket.rar).

◆ GetFilename()

std::string GetFilename ( ) const
inline

With this variable the desired path to a folder or file within the hostname is given (e.g. storage/videos/00001.ts).

◆ GetPort()

unsigned int GetPort ( ) const
inline

Networking port to use for protocol.

◆ GetOptions()

std::string GetOptions ( ) const
inline

Special options on opened URL, this can e.g. on RAR packages ?flags=8&nextvalue=123 to inform about to not cache a read.

Available options from Kodi:

Value: Description:
flags=8 Used on RAR packages so that no data is cached from the requested source.
cache=no Used on ZIP packages so that no data from the requested source is stored in the cache. However, this is currently not available from addons!

In addition, other addons can use the URLs given by them to give options that fit the respective VFS addon and allow special operations.

Note
This procedure is not yet standardized and is currently not exactly available which are handed over.

◆ GetUsername()

std::string GetUsername ( ) const
inline

Desired username.

◆ GetPassword()

std::string GetPassword ( ) const
inline

Desired password.

◆ GetRedacted()

std::string GetRedacted ( ) const
inline

The complete URL is passed on here, but the user name and password are not shown and only appear to there as USERNAME:PASSWORD.

As example sftp://USERNAME:PASSWORD@192.168.178.123/storage/videos/00001.ts.

◆ GetSharename()

std::string GetSharename ( ) const
inline

The name which is taken as the basis by source and would be first in folder view.

As example on sftp://dudu:isprivate@192.168.178.123/storage/videos/00001.ts becomes then storage used here.

◆ GetProtocol()

std::string GetProtocol ( ) const
inline

Protocol name used on this stream, e.g. sftp.