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

Callback functions on GetDirectory() More...


bool kodi::addon::CInstanceVFS::CVFSCallbacks::GetKeyboardInput (const std::string &heading, std::string &input, bool hiddenInput=false)
 Require keyboard input.
void kodi::addon::CInstanceVFS::CVFSCallbacks::SetErrorDialog (const std::string &heading, const std::string &line1, const std::string &line2="", const std::string &line3="")
 Display an error dialog.
void kodi::addon::CInstanceVFS::CVFSCallbacks::RequireAuthentication (const std::string &url)
 Prompt the user for authentication of a URL.

Detailed Description

Callback functions on GetDirectory()

This functions becomes available during call of GetDirectory() from Kodi.

If GetDirectory() returns false becomes the parts from here used on next call of the function.


bool CMyVFS::GetDirectory(const kodi::addon::VFSUrl& url,
std::vector<kodi::vfs::CDirEntry>& items,
CVFSCallbacks callbacks)
std::string neededString;
callbacks.GetKeyboardInput("Test", neededString, true);
if (neededString.empty())
return false;
// Do the work
return true;
Definition addon-instance/vfs.h:51

Function Documentation

◆ GetKeyboardInput()

bool kodi::addon::CInstanceVFS::CVFSCallbacks::GetKeyboardInput ( const std::string & heading,
std::string & input,
bool hiddenInput = false )

Require keyboard input.

Becomes called if GetDirectory() returns false and GetDirectory() becomes after entry called again.

[in]headingThe heading of the keyboard dialog
[out]inputThe resulting string. Returns string after second call!
[in]hiddenInputTo show input only as "*" on dialog
True if input was received, false otherwise

◆ RequireAuthentication()

void kodi::addon::CInstanceVFS::CVFSCallbacks::RequireAuthentication ( const std::string & url)

Prompt the user for authentication of a URL.

[in]urlThe URL

◆ SetErrorDialog()

void kodi::addon::CInstanceVFS::CVFSCallbacks::SetErrorDialog ( const std::string & heading,
const std::string & line1,
const std::string & line2 = "",
const std::string & line3 = "" )

Display an error dialog.

[in]headingThe heading of the error dialog
[in]line1The first line of the error dialog
[in]line2[opt] The second line of the error dialog
[in]line3[opt] The third line of the error dialog