Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches

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

Topics

 Value Help
 

Classes

class  kodi::addon::VFSUrl
 

Functions

std::string kodi::addon::VFSUrl::GetURL () const
 Desired URL of the file system to be edited.
 
std::string kodi::addon::VFSUrl::GetDomain () const
 The associated domain name, which is optional and not available in all cases.
 
std::string kodi::addon::VFSUrl::GetHostname () const
 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).
 
std::string kodi::addon::VFSUrl::GetFilename () const
 With this variable the desired path to a folder or file within the hostname is given (e.g. storage/videos/00001.ts).
 
unsigned int kodi::addon::VFSUrl::GetPort () const
 Networking port to use for protocol.
 
std::string kodi::addon::VFSUrl::GetOptions () const
 Special options on opened URL, this can e.g. on RAR packages ?flags=8&nextvalue=123 to inform about to not cache a read.
 
std::string kodi::addon::VFSUrl::GetUsername () const
 Desired username.
 
std::string kodi::addon::VFSUrl::GetPassword () const
 Desired password.
 
std::string kodi::addon::VFSUrl::GetRedacted () const
 The complete URL is passed on here, but the user name and password are not shown and only appear to there as USERNAME:PASSWORD.
 
std::string kodi::addon::VFSUrl::GetSharename () const
 The name which is taken as the basis by source and would be first in folder view.
 
std::string kodi::addon::VFSUrl::GetProtocol () const
 Protocol name used on this stream, e.g. sftp.
 

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

Function Documentation

◆ GetDomain()

std::string kodi::addon::VFSUrl::GetDomain ( ) const
inline

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

◆ GetFilename()

std::string kodi::addon::VFSUrl::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).

◆ GetHostname()

std::string kodi::addon::VFSUrl::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).

◆ GetOptions()

std::string kodi::addon::VFSUrl::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.

◆ GetPassword()

std::string kodi::addon::VFSUrl::GetPassword ( ) const
inline

Desired password.

◆ GetPort()

unsigned int kodi::addon::VFSUrl::GetPort ( ) const
inline

Networking port to use for protocol.

◆ GetProtocol()

std::string kodi::addon::VFSUrl::GetProtocol ( ) const
inline

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

◆ GetRedacted()

std::string kodi::addon::VFSUrl::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 kodi::addon::VFSUrl::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.

◆ GetURL()

std::string kodi::addon::VFSUrl::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>

◆ GetUsername()

std::string kodi::addon::VFSUrl::GetUsername ( ) const
inline

Desired username.