11#include "../../AddonBase.h"
12#include "../../c-api/gui/dialogs/extended_progress.h"
69 using namespace ::kodi::addon;
71 CPrivateBase::m_interface->toKodi->kodi_gui->dialogExtendedProgress->new_dialog(
72 CPrivateBase::m_interface->toKodi->kodiBase, title.c_str());
75 "kodi::gui::CDialogExtendedProgress can't create window class from Kodi !!!");
85 using namespace ::kodi::addon;
87 CPrivateBase::m_interface->toKodi->kodi_gui->dialogExtendedProgress->delete_dialog(
88 CPrivateBase::m_interface->toKodi->kodiBase, m_DialogHandle);
100 using namespace ::kodi::addon;
102 char* strMsg = CPrivateBase::m_interface->toKodi->kodi_gui->dialogExtendedProgress->get_title(
103 CPrivateBase::m_interface->toKodi->kodiBase, m_DialogHandle);
104 if (strMsg !=
nullptr)
106 if (std::strlen(strMsg))
108 CPrivateBase::m_interface->toKodi->free_string(CPrivateBase::m_interface->toKodi->kodiBase,
123 using namespace ::kodi::addon;
124 CPrivateBase::m_interface->toKodi->kodi_gui->dialogExtendedProgress->set_title(
125 CPrivateBase::m_interface->toKodi->kodiBase, m_DialogHandle, title.c_str());
137 using namespace ::kodi::addon;
139 char* strMsg = CPrivateBase::m_interface->toKodi->kodi_gui->dialogExtendedProgress->get_text(
140 CPrivateBase::m_interface->toKodi->kodiBase, m_DialogHandle);
141 if (strMsg !=
nullptr)
143 if (std::strlen(strMsg))
145 CPrivateBase::m_interface->toKodi->free_string(CPrivateBase::m_interface->toKodi->kodiBase,
160 using namespace ::kodi::addon;
161 CPrivateBase::m_interface->toKodi->kodi_gui->dialogExtendedProgress->set_text(
162 CPrivateBase::m_interface->toKodi->kodiBase, m_DialogHandle, text.c_str());
174 using namespace ::kodi::addon;
175 return CPrivateBase::m_interface->toKodi->kodi_gui->dialogExtendedProgress->is_finished(
176 CPrivateBase::m_interface->toKodi->kodiBase, m_DialogHandle);
186 using namespace ::kodi::addon;
187 CPrivateBase::m_interface->toKodi->kodi_gui->dialogExtendedProgress->mark_finished(
188 CPrivateBase::m_interface->toKodi->kodiBase, m_DialogHandle);
200 using namespace ::kodi::addon;
201 return CPrivateBase::m_interface->toKodi->kodi_gui->dialogExtendedProgress->get_percentage(
202 CPrivateBase::m_interface->toKodi->kodiBase, m_DialogHandle);
214 using namespace ::kodi::addon;
215 CPrivateBase::m_interface->toKodi->kodi_gui->dialogExtendedProgress->set_percentage(
216 CPrivateBase::m_interface->toKodi->kodiBase, m_DialogHandle, percentage);
229 using namespace ::kodi::addon;
230 CPrivateBase::m_interface->toKodi->kodi_gui->dialogExtendedProgress->set_progress(
231 CPrivateBase::m_interface->toKodi->kodiBase, m_DialogHandle, currentItem, itemCount);
236 KODI_GUI_HANDLE m_DialogHandle;
Definition ExtendedProgress.h:59
@ ADDON_LOG_FATAL
4 : To notify fatal unrecoverable errors, which can may also indicate upcoming crashes.
Definition addon_base.h:197
CExtendedProgress(const std::string &title="")
Definition ExtendedProgress.h:67
void MarkFinished()
Mark progress finished.
Definition ExtendedProgress.h:184
void SetTitle(const std::string &title)
To set the title of dialog.
Definition ExtendedProgress.h:121
void SetPercentage(float percentage)
To set the current progress position as percent.
Definition ExtendedProgress.h:212
std::string Title() const
Get the used title.
Definition ExtendedProgress.h:98
void SetText(const std::string &text)
To set the used text information string.
Definition ExtendedProgress.h:158
std::string Text() const
Get the used text information string.
Definition ExtendedProgress.h:135
~CExtendedProgress()
Definition ExtendedProgress.h:83
void SetProgress(int currentItem, int itemCount)
To set progress position with predefined places.
Definition ExtendedProgress.h:227
float Percentage() const
Get the current progress position as percent.
Definition ExtendedProgress.h:198
bool IsFinished() const
To ask dialog is finished.
Definition ExtendedProgress.h:172
void ATTR_DLL_LOCAL Log(const ADDON_LOG loglevel, const char *format,...)
Add a message to Kodi's log.
Definition AddonBase.h:1938