Kodi Development  20.0
for Binary and Script based Add-Ons

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.

Example:

#include <kodi/addon-instance/VFS.h>
...
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: VFS.h:51
bool ATTRIBUTE_HIDDEN GetDirectory(const std::string &path, const std::string &mask, std::vector< kodi::vfs::CDirEntry > &items)
Lists a directory.
Definition: Filesystem.h:888

Function Documentation

◆ GetKeyboardInput()

bool GetKeyboardInput ( const std::string &  heading,
std::string &  input,
bool  hiddenInput = false 
)
inline

Require keyboard input.

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

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

◆ SetErrorDialog()

void SetErrorDialog ( const std::string &  heading,
const std::string &  line1,
const std::string &  line2 = "",
const std::string &  line3 = "" 
)
inline

Display an error dialog.

Parameters
[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

◆ RequireAuthentication()

void RequireAuthentication ( const std::string &  url)
inline

Prompt the user for authentication of a URL.

Parameters
[in]urlThe URL