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;
...
return true;
}
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
◆ 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] | heading | The heading of the keyboard dialog |
[out] | input | The resulting string. Returns string after second call! |
[in] | hiddenInput | To 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] | heading | The heading of the error dialog |
[in] | line1 | The 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
-