Namespace:  kodi::gui::dialogs::Numeric 
  Numeric dialogs
The functions listed below have to be permitted by the user for the representation of a numeric keyboard around an input.  
More...
 | 
| bool ATTR_DLL_LOCAL  | kodi::gui::dialogs::Numeric::ShowAndVerifyNewPassword (std::string &newPassword) | 
|   | Use dialog to get numeric new password.  
  | 
|   | 
| int ATTR_DLL_LOCAL  | kodi::gui::dialogs::Numeric::ShowAndVerifyPassword (const std::string &password, const std::string &heading, int retries) | 
|   | Use dialog to verify numeric password.  
  | 
|   | 
| bool ATTR_DLL_LOCAL  | kodi::gui::dialogs::Numeric::ShowAndVerifyInput (std::string &toVerify, const std::string &heading, bool verifyInput) | 
|   | Use dialog to verify numeric password.  
  | 
|   | 
| bool ATTR_DLL_LOCAL  | kodi::gui::dialogs::Numeric::ShowAndGetTime (tm &time, const std::string &heading) | 
|   | Use dialog to get time value.  
  | 
|   | 
| bool ATTR_DLL_LOCAL  | kodi::gui::dialogs::Numeric::ShowAndGetDate (tm &date, const std::string &heading) | 
|   | Use dialog to get date value.  
  | 
|   | 
| bool ATTR_DLL_LOCAL  | kodi::gui::dialogs::Numeric::ShowAndGetIPAddress (std::string &ipAddress, const std::string &heading) | 
|   | Use dialog to get a IP.  
  | 
|   | 
| bool ATTR_DLL_LOCAL  | kodi::gui::dialogs::Numeric::ShowAndGetNumber (std::string &input, const std::string &heading, unsigned int autoCloseTimeoutMs=0) | 
|   | Use dialog to get normal number.  
  | 
|   | 
| bool ATTR_DLL_LOCAL  | kodi::gui::dialogs::Numeric::ShowAndGetSeconds (std::string &time, const std::string &heading) | 
|   | Show numeric keypad to get seconds.  
  | 
|   | 
 
Namespace:  kodi::gui::dialogs::Numeric 
  Numeric dialogs
The functions listed below have to be permitted by the user for the representation of a numeric keyboard around an input. 
The class supports several kinds, from an easy number choice up to the passport Word production and their confirmation for add-on.
It has the header #include <kodi/gui/dialogs/Numeric.h> be included to enjoy it. 
◆ ShowAndGetDate()
  
  
      
        
          | bool ATTR_DLL_LOCAL kodi::gui::dialogs::Numeric::ShowAndGetDate  | 
          ( | 
          tm & |           date,  | 
         
        
           | 
           | 
          const std::string & |           heading ) | 
         
       
   | 
  
inline   | 
  
 
Use dialog to get date value. 
- Parameters
 - 
  
    | [in,out] | date | Overwritten with user input if return=true and date inserted.  | 
    | [in] | heading | Heading to display  | 
  
   
- Returns
 - true if successful display and user input. false if unsuccessful display, no user input, or canceled editing.
 
Example: 
#include <stdio.h>      
 
time_t rawtime;
struct tm * timeinfo;
 
timeinfo = localtime(&rawtime);
printf(
"Selected date it's %s and was on Dialog %s\n", 
buffer, bRet ? 
"OK" : 
"Canceled");
 
int64_t time
Definition addons/kodi-dev-kit/include/kodi/c-api/addon-instance/AudioDecoder.h:118
 
uint8_t * buffer
Definition addons/kodi-dev-kit/include/kodi/c-api/addon-instance/AudioDecoder.h:116
 
bool ATTR_DLL_LOCAL ShowAndGetDate(tm &date, const std::string &heading)
Use dialog to get date value.
Definition kodi-dev-kit/include/kodi/gui/dialogs/Numeric.h:233
 
  
 
 
◆ ShowAndGetIPAddress()
  
  
      
        
          | bool ATTR_DLL_LOCAL kodi::gui::dialogs::Numeric::ShowAndGetIPAddress  | 
          ( | 
          std::string & |           ipAddress,  | 
         
        
           | 
           | 
          const std::string & |           heading ) | 
         
       
   | 
  
inline   | 
  
 
Use dialog to get a IP. 
- Parameters
 - 
  
    | [in,out] | ipAddress | Overwritten with user input if return=true and IP address inserted.  | 
    | [in] | heading | Heading to display.  | 
  
   
- Returns
 - true if successful display and user input. false if unsuccessful display, no user input, or canceled editing. 
 
 
 
◆ ShowAndGetNumber()
  
  
      
        
          | bool ATTR_DLL_LOCAL kodi::gui::dialogs::Numeric::ShowAndGetNumber  | 
          ( | 
          std::string & |           input,  | 
         
        
           | 
           | 
          const std::string & |           heading,  | 
         
        
           | 
           | 
          unsigned int |           autoCloseTimeoutMs = 0 ) | 
         
       
   | 
  
inline   | 
  
 
Use dialog to get normal number. 
- Parameters
 - 
  
    | [in,out] | input | Overwritten with user input if return=true and time in seconds inserted  | 
    | [in] | heading | Heading to display  | 
    | [in] | autoCloseTimeoutMs | [opt] To close the dialog after a specified time, in milliseconds, default is 0 which keeps the dialog open indefinitely.  | 
  
   
- Returns
 - true if successful display and user input. false if unsuccessful display, no user input, or canceled editing.
 
Example: 
#include <stdio.h>      
#include <stdlib.h>     
 
std::string number;
printf("Written number input is : %llu and was %s\n",
               strtoull(number.c_str(), 
nullptr, 0), bRet ? 
"OK" : 
"Canceled");
 
#define strtoull(str, endptr, base)
Definition Variant.cpp:29
 
bool ATTR_DLL_LOCAL ShowAndGetNumber(std::string &input, const std::string &heading, unsigned int autoCloseTimeoutMs=0)
Use dialog to get normal number.
Definition kodi-dev-kit/include/kodi/gui/dialogs/Numeric.h:296
 
  
 
 
◆ ShowAndGetSeconds()
  
  
      
        
          | bool ATTR_DLL_LOCAL kodi::gui::dialogs::Numeric::ShowAndGetSeconds  | 
          ( | 
          std::string & |           time,  | 
         
        
           | 
           | 
          const std::string & |           heading ) | 
         
       
   | 
  
inline   | 
  
 
Show numeric keypad to get seconds. 
- Parameters
 - 
  
    | [in,out] | time | Overwritten with user input if return=true and time in seconds inserted.  | 
    | [in] | heading | Heading to display  | 
  
   
- Returns
 - true if successful display and user input. false if unsuccessful display, no user input, or canceled editing. 
 
 
 
◆ ShowAndGetTime()
  
  
      
        
          | bool ATTR_DLL_LOCAL kodi::gui::dialogs::Numeric::ShowAndGetTime  | 
          ( | 
          tm & |           time,  | 
         
        
           | 
           | 
          const std::string & |           heading ) | 
         
       
   | 
  
inline   | 
  
 
Use dialog to get time value. 
- Parameters
 - 
  
    | [out] | time | Overwritten with user input if return=true and time inserted.  | 
    | [in] | heading | Heading to display.  | 
  
   
- Returns
 - true if successful display and user input. false if unsuccessful display, no user input, or canceled editing.
 
Example: 
#include <stdio.h>      
 
time_t rawtime;
struct tm * timeinfo;
 
timeinfo = localtime(&rawtime);
printf(
"Selected time it's %s and was on Dialog %s\n", 
buffer, bRet ? 
"OK" : 
"Canceled");
 
bool ATTR_DLL_LOCAL ShowAndGetTime(tm &time, const std::string &heading)
Use dialog to get time value.
Definition kodi-dev-kit/include/kodi/gui/dialogs/Numeric.h:195
 
  
 
 
◆ ShowAndVerifyInput()
  
  
      
        
          | bool ATTR_DLL_LOCAL kodi::gui::dialogs::Numeric::ShowAndVerifyInput  | 
          ( | 
          std::string & |           toVerify,  | 
         
        
           | 
           | 
          const std::string & |           heading,  | 
         
        
           | 
           | 
          bool |           verifyInput ) | 
         
       
   | 
  
inline   | 
  
 
Use dialog to verify numeric password. 
- Parameters
 - 
  
    | [in,out] | toVerify | Value to compare against user input.  | 
    | [in] | heading | Heading to display  | 
    | [in] | verifyInput | If set as true we verify the users input versus toVerify.  | 
  
   
- Returns
 - true if successful display and user input. false if unsuccessful display, no user input, or canceled editing. 
 
 
 
◆ ShowAndVerifyNewPassword()
  
  
      
        
          | bool ATTR_DLL_LOCAL kodi::gui::dialogs::Numeric::ShowAndVerifyNewPassword  | 
          ( | 
          std::string & |           newPassword | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Use dialog to get numeric new password. 
- Parameters
 - 
  
    | [out] | newPassword | String to preload into the keyboard accumulator. Overwritten with user input if return=true. Returned in MD5 format.  | 
  
   
- Returns
 - true if successful display and user input entry/re-entry. false if unsuccessful display, no user input, or canceled editing. 
 
 
 
◆ ShowAndVerifyPassword()
  
  
      
        
          | int ATTR_DLL_LOCAL kodi::gui::dialogs::Numeric::ShowAndVerifyPassword  | 
          ( | 
          const std::string & |           password,  | 
         
        
           | 
           | 
          const std::string & |           heading,  | 
         
        
           | 
           | 
          int |           retries ) | 
         
       
   | 
  
inline   | 
  
 
Use dialog to verify numeric password. 
- Parameters
 - 
  
    | [in] | password | Password to compare with user input, need in MD5 format.  | 
    | [in] | heading | Heading to display  | 
    | [in] | retries | If greater than 0, shows "Incorrect
                                    password, %d retries left" on dialog line 2, else line 2 is blank.  | 
  
   
- Returns
 - Possible values:
- 0 if successful display and user input.
 
- 1 if unsuccessful input.
 
- -1 if no user input or canceled editing.
 
 
Example: 
#include <stdio.h>      
 
 
int maxretries = 3;
 
 
int ret;
for (unsigned int i = 0; i < maxretries; i++)
{
  
  if (ret == 0)
  {
    fprintf(stderr, "Numeric password successfully confirmed after '%i' tries\n", i+1);
    break;
  }
  else if (ret < 0)
  {
    fprintf(stderr, "Canceled editing on try '%i'\n", i+1);
    break;
  }
  else 
  {
    fprintf(stderr, "Wrong numeric password entered on try '%i'\n", i+1);
  }
}
int ATTR_DLL_LOCAL ShowAndVerifyPassword(const std::string &password, const std::string &heading, int retries)
Use dialog to verify numeric password.
Definition kodi-dev-kit/include/kodi/gui/dialogs/Numeric.h:125
 
std::string ATTR_DLL_LOCAL GetMD5(const std::string &text)
Get the MD5 digest of the given text.
Definition kodi-dev-kit/include/kodi/General.h:295