diff options
Diffstat (limited to 'xbmc/addons/AddonCallbacks.h')
| -rw-r--r-- | xbmc/addons/AddonCallbacks.h | 466 |
1 files changed, 466 insertions, 0 deletions
diff --git a/xbmc/addons/AddonCallbacks.h b/xbmc/addons/AddonCallbacks.h new file mode 100644 index 0000000..f0902e4 --- /dev/null +++ b/xbmc/addons/AddonCallbacks.h | |||
| @@ -0,0 +1,466 @@ | |||
| 1 | #pragma once | ||
| 2 | /* | ||
| 3 | * Copyright (C) 2012-2013 Team XBMC | ||
| 4 | * http://xbmc.org | ||
| 5 | * | ||
| 6 | * This Program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License as published by | ||
| 8 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 9 | * any later version. | ||
| 10 | * | ||
| 11 | * This Program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with XBMC; see the file COPYING. If not, see | ||
| 18 | * <http://www.gnu.org/licenses/>. | ||
| 19 | * | ||
| 20 | */ | ||
| 21 | |||
| 22 | #include <stdint.h> | ||
| 23 | #include "cores/dvdplayer/DVDDemuxers/DVDDemuxUtils.h" | ||
| 24 | #include "addons/include/xbmc_pvr_types.h" | ||
| 25 | #include "addons/include/xbmc_codec_types.h" | ||
| 26 | #include "../../addons/library.xbmc.gui/libXBMC_gui.h" | ||
| 27 | |||
| 28 | #ifdef TARGET_WINDOWS | ||
| 29 | #ifndef _SSIZE_T_DEFINED | ||
| 30 | typedef intptr_t ssize_t; | ||
| 31 | #define _SSIZE_T_DEFINED | ||
| 32 | #endif // !_SSIZE_T_DEFINED | ||
| 33 | #endif // TARGET_WINDOWS | ||
| 34 | |||
| 35 | typedef void (*AddOnLogCallback)(void *addonData, const ADDON::addon_log_t loglevel, const char *msg); | ||
| 36 | typedef void (*AddOnQueueNotification)(void *addonData, const ADDON::queue_msg_t type, const char *msg); | ||
| 37 | typedef bool (*AddOnWakeOnLan)(const char* mac); | ||
| 38 | typedef bool (*AddOnGetSetting)(void *addonData, const char *settingName, void *settingValue); | ||
| 39 | typedef char* (*AddOnUnknownToUTF8)(const char *sourceDest); | ||
| 40 | typedef char* (*AddOnGetLocalizedString)(const void* addonData, long dwCode); | ||
| 41 | typedef char* (*AddOnGetDVDMenuLanguage)(const void* addonData); | ||
| 42 | typedef void (*AddOnFreeString)(const void* addonData, char* str); | ||
| 43 | |||
| 44 | typedef void* (*AddOnOpenFile)(const void* addonData, const char* strFileName, unsigned int flags); | ||
| 45 | typedef void* (*AddOnOpenFileForWrite)(const void* addonData, const char* strFileName, bool bOverWrite); | ||
| 46 | typedef ssize_t (*AddOnReadFile)(const void* addonData, void* file, void* lpBuf, size_t uiBufSize); | ||
| 47 | typedef bool (*AddOnReadFileString)(const void* addonData, void* file, char *szLine, int iLineLength); | ||
| 48 | typedef ssize_t (*AddOnWriteFile)(const void* addonData, void* file, const void* lpBuf, size_t uiBufSize); | ||
| 49 | typedef void (*AddOnFlushFile)(const void* addonData, void* file); | ||
| 50 | typedef int64_t (*AddOnSeekFile)(const void* addonData, void* file, int64_t iFilePosition, int iWhence); | ||
| 51 | typedef int (*AddOnTruncateFile)(const void* addonData, void* file, int64_t iSize); | ||
| 52 | typedef int64_t (*AddOnGetFilePosition)(const void* addonData, void* file); | ||
| 53 | typedef int64_t (*AddOnGetFileLength)(const void* addonData, void* file); | ||
| 54 | typedef void (*AddOnCloseFile)(const void* addonData, void* file); | ||
| 55 | typedef int (*AddOnGetFileChunkSize)(const void* addonData, void* file); | ||
| 56 | typedef bool (*AddOnFileExists)(const void* addonData, const char *strFileName, bool bUseCache); | ||
| 57 | typedef int (*AddOnStatFile)(const void* addonData, const char *strFileName, struct __stat64* buffer); | ||
| 58 | typedef bool (*AddOnDeleteFile)(const void* addonData, const char *strFileName); | ||
| 59 | typedef bool (*AddOnCanOpenDirectory)(const void* addonData, const char* strURL); | ||
| 60 | typedef bool (*AddOnCreateDirectory)(const void* addonData, const char *strPath); | ||
| 61 | typedef bool (*AddOnDirectoryExists)(const void* addonData, const char *strPath); | ||
| 62 | typedef bool (*AddOnRemoveDirectory)(const void* addonData, const char *strPath); | ||
| 63 | |||
| 64 | typedef struct CB_AddOn | ||
| 65 | { | ||
| 66 | AddOnLogCallback Log; | ||
| 67 | AddOnQueueNotification QueueNotification; | ||
| 68 | AddOnWakeOnLan WakeOnLan; | ||
| 69 | AddOnGetSetting GetSetting; | ||
| 70 | AddOnUnknownToUTF8 UnknownToUTF8; | ||
| 71 | AddOnGetLocalizedString GetLocalizedString; | ||
| 72 | AddOnGetDVDMenuLanguage GetDVDMenuLanguage; | ||
| 73 | AddOnFreeString FreeString; | ||
| 74 | |||
| 75 | AddOnOpenFile OpenFile; | ||
| 76 | AddOnOpenFileForWrite OpenFileForWrite; | ||
| 77 | AddOnReadFile ReadFile; | ||
| 78 | AddOnReadFileString ReadFileString; | ||
| 79 | AddOnWriteFile WriteFile; | ||
| 80 | AddOnFlushFile FlushFile; | ||
| 81 | AddOnSeekFile SeekFile; | ||
| 82 | AddOnTruncateFile TruncateFile; | ||
| 83 | AddOnGetFilePosition GetFilePosition; | ||
| 84 | AddOnGetFileLength GetFileLength; | ||
| 85 | AddOnCloseFile CloseFile; | ||
| 86 | AddOnGetFileChunkSize GetFileChunkSize; | ||
| 87 | AddOnFileExists FileExists; | ||
| 88 | AddOnStatFile StatFile; | ||
| 89 | AddOnDeleteFile DeleteFile; | ||
| 90 | AddOnCanOpenDirectory CanOpenDirectory; | ||
| 91 | AddOnCreateDirectory CreateDirectory; | ||
| 92 | AddOnDirectoryExists DirectoryExists; | ||
| 93 | AddOnRemoveDirectory RemoveDirectory; | ||
| 94 | } CB_AddOnLib; | ||
| 95 | |||
| 96 | typedef xbmc_codec_t (*CODECGetCodecByName)(const void* addonData, const char* strCodecName); | ||
| 97 | |||
| 98 | typedef struct CB_CODEC | ||
| 99 | { | ||
| 100 | CODECGetCodecByName GetCodecByName; | ||
| 101 | } CB_CODECLib; | ||
| 102 | |||
| 103 | typedef void (*GUILock)(); | ||
| 104 | typedef void (*GUIUnlock)(); | ||
| 105 | typedef int (*GUIGetScreenHeight)(); | ||
| 106 | typedef int (*GUIGetScreenWidth)(); | ||
| 107 | typedef int (*GUIGetVideoResolution)(); | ||
| 108 | typedef GUIHANDLE (*GUIWindow_New)(void *addonData, const char *xmlFilename, const char *defaultSkin, bool forceFallback, bool asDialog); | ||
| 109 | typedef void (*GUIWindow_Delete)(void *addonData, GUIHANDLE handle); | ||
| 110 | typedef void (*GUIWindow_SetCallbacks)(void *addonData, GUIHANDLE handle, GUIHANDLE clienthandle, bool (*)(GUIHANDLE handle), bool (*)(GUIHANDLE handle, int), bool (*)(GUIHANDLE handle, int), bool (*)(GUIHANDLE handle, int)); | ||
| 111 | typedef bool (*GUIWindow_Show)(void *addonData, GUIHANDLE handle); | ||
| 112 | typedef bool (*GUIWindow_Close)(void *addonData, GUIHANDLE handle); | ||
| 113 | typedef bool (*GUIWindow_DoModal)(void *addonData, GUIHANDLE handle); | ||
| 114 | typedef bool (*GUIWindow_SetFocusId)(void *addonData, GUIHANDLE handle, int iControlId); | ||
| 115 | typedef int (*GUIWindow_GetFocusId)(void *addonData, GUIHANDLE handle); | ||
| 116 | typedef bool (*GUIWindow_SetCoordinateResolution)(void *addonData, GUIHANDLE handle, int res); | ||
| 117 | typedef void (*GUIWindow_SetProperty)(void *addonData, GUIHANDLE handle, const char *key, const char *value); | ||
| 118 | typedef void (*GUIWindow_SetPropertyInt)(void *addonData, GUIHANDLE handle, const char *key, int value); | ||
| 119 | typedef void (*GUIWindow_SetPropertyBool)(void *addonData, GUIHANDLE handle, const char *key, bool value); | ||
| 120 | typedef void (*GUIWindow_SetPropertyDouble)(void *addonData, GUIHANDLE handle, const char *key, double value); | ||
| 121 | typedef const char* (*GUIWindow_GetProperty)(void *addonData, GUIHANDLE handle, const char *key); | ||
| 122 | typedef int (*GUIWindow_GetPropertyInt)(void *addonData, GUIHANDLE handle, const char *key); | ||
| 123 | typedef bool (*GUIWindow_GetPropertyBool)(void *addonData, GUIHANDLE handle, const char *key); | ||
| 124 | typedef double (*GUIWindow_GetPropertyDouble)(void *addonData, GUIHANDLE handle, const char *key); | ||
| 125 | typedef void (*GUIWindow_ClearProperties)(void *addonData, GUIHANDLE handle); | ||
| 126 | typedef int (*GUIWindow_GetListSize)(void *addonData, GUIHANDLE handle); | ||
| 127 | typedef void (*GUIWindow_ClearList)(void *addonData, GUIHANDLE handle); | ||
| 128 | typedef GUIHANDLE (*GUIWindow_AddItem)(void *addonData, GUIHANDLE handle, GUIHANDLE item, int itemPosition); | ||
| 129 | typedef GUIHANDLE (*GUIWindow_AddStringItem)(void *addonData, GUIHANDLE handle, const char *itemName, int itemPosition); | ||
| 130 | typedef void (*GUIWindow_RemoveItem)(void *addonData, GUIHANDLE handle, int itemPosition); | ||
| 131 | typedef GUIHANDLE (*GUIWindow_GetListItem)(void *addonData, GUIHANDLE handle, int listPos); | ||
| 132 | typedef void (*GUIWindow_SetCurrentListPosition)(void *addonData, GUIHANDLE handle, int listPos); | ||
| 133 | typedef int (*GUIWindow_GetCurrentListPosition)(void *addonData, GUIHANDLE handle); | ||
| 134 | typedef GUIHANDLE (*GUIWindow_GetControl_Spin)(void *addonData, GUIHANDLE handle, int controlId); | ||
| 135 | typedef GUIHANDLE (*GUIWindow_GetControl_Button)(void *addonData, GUIHANDLE handle, int controlId); | ||
| 136 | typedef GUIHANDLE (*GUIWindow_GetControl_RadioButton)(void *addonData, GUIHANDLE handle, int controlId); | ||
| 137 | typedef GUIHANDLE (*GUIWindow_GetControl_Edit)(void *addonData, GUIHANDLE handle, int controlId); | ||
| 138 | typedef GUIHANDLE (*GUIWindow_GetControl_Progress)(void *addonData, GUIHANDLE handle, int controlId); | ||
| 139 | typedef GUIHANDLE (*GUIWindow_GetControl_RenderAddon)(void *addonData, GUIHANDLE handle, int controlId); | ||
| 140 | typedef void (*GUIWindow_SetControlLabel)(void *addonData, GUIHANDLE handle, int controlId, const char *label); | ||
| 141 | typedef void (*GUIWindow_MarkDirtyRegion)(void *addonData, GUIHANDLE handle); | ||
| 142 | typedef void (*GUIControl_Spin_SetVisible)(void *addonData, GUIHANDLE spinhandle, bool yesNo); | ||
| 143 | typedef void (*GUIControl_Spin_SetText)(void *addonData, GUIHANDLE spinhandle, const char *label); | ||
| 144 | typedef void (*GUIControl_Spin_Clear)(void *addonData, GUIHANDLE spinhandle); | ||
| 145 | typedef void (*GUIControl_Spin_AddLabel)(void *addonData, GUIHANDLE spinhandle, const char *label, int iValue); | ||
| 146 | typedef int (*GUIControl_Spin_GetValue)(void *addonData, GUIHANDLE spinhandle); | ||
| 147 | typedef void (*GUIControl_Spin_SetValue)(void *addonData, GUIHANDLE spinhandle, int iValue); | ||
| 148 | typedef void (*GUIControl_RadioButton_SetVisible)(void *addonData, GUIHANDLE handle, bool yesNo); | ||
| 149 | typedef void (*GUIControl_RadioButton_SetText)(void *addonData, GUIHANDLE handle, const char *label); | ||
| 150 | typedef void (*GUIControl_RadioButton_SetSelected)(void *addonData, GUIHANDLE handle, bool yesNo); | ||
| 151 | typedef bool (*GUIControl_RadioButton_IsSelected)(void *addonData, GUIHANDLE handle); | ||
| 152 | typedef void (*GUIControl_Progress_SetPercentage)(void *addonData, GUIHANDLE handle, float fPercent); | ||
| 153 | typedef float (*GUIControl_Progress_GetPercentage)(void *addonData, GUIHANDLE handle); | ||
| 154 | typedef void (*GUIControl_Progress_SetInfo)(void *addonData, GUIHANDLE handle, int iInfo); | ||
| 155 | typedef int (*GUIControl_Progress_GetInfo)(void *addonData, GUIHANDLE handle); | ||
| 156 | typedef const char* (*GUIControl_Progress_GetDescription)(void *addonData, GUIHANDLE handle); | ||
| 157 | typedef GUIHANDLE (*GUIWindow_GetControl_Slider)(void *addonData, GUIHANDLE handle, int controlId); | ||
| 158 | typedef void (*GUIControl_Slider_SetVisible)(void *addonData, GUIHANDLE handle, bool yesNo); | ||
| 159 | typedef const char *(*GUIControl_Slider_GetDescription)(void *addonData, GUIHANDLE handle); | ||
| 160 | typedef void (*GUIControl_Slider_SetIntRange)(void *addonData, GUIHANDLE handle, int iStart, int iEnd); | ||
| 161 | typedef void (*GUIControl_Slider_SetIntValue)(void *addonData, GUIHANDLE handle, int iValue); | ||
| 162 | typedef int (*GUIControl_Slider_GetIntValue)(void *addonData, GUIHANDLE handle); | ||
| 163 | typedef void (*GUIControl_Slider_SetIntInterval)(void *addonData, GUIHANDLE handle, int iInterval); | ||
| 164 | typedef void (*GUIControl_Slider_SetPercentage)(void *addonData, GUIHANDLE handle, float fPercent); | ||
| 165 | typedef float (*GUIControl_Slider_GetPercentage)(void *addonData, GUIHANDLE handle); | ||
| 166 | typedef void (*GUIControl_Slider_SetFloatRange)(void *addonData, GUIHANDLE handle, float fStart, float fEnd); | ||
| 167 | typedef void (*GUIControl_Slider_SetFloatValue)(void *addonData, GUIHANDLE handle, float fValue); | ||
| 168 | typedef float (*GUIControl_Slider_GetFloatValue)(void *addonData, GUIHANDLE handle); | ||
| 169 | typedef void (*GUIControl_Slider_SetFloatInterval)(void *addonData, GUIHANDLE handle, float fInterval); | ||
| 170 | typedef GUIHANDLE (*GUIWindow_GetControl_SettingsSlider)(void *addonData, GUIHANDLE handle, int controlId); | ||
| 171 | typedef void (*GUIControl_SettingsSlider_SetVisible)(void *addonData, GUIHANDLE handle, bool yesNo); | ||
| 172 | typedef void (*GUIControl_SettingsSlider_SetText)(void *addonData, GUIHANDLE handle, const char *label); | ||
| 173 | typedef const char *(*GUIControl_SettingsSlider_GetDescription)(void *addonData, GUIHANDLE handle); | ||
| 174 | typedef void (*GUIControl_SettingsSlider_SetIntRange)(void *addonData, GUIHANDLE handle, int iStart, int iEnd); | ||
| 175 | typedef void (*GUIControl_SettingsSlider_SetIntValue)(void *addonData, GUIHANDLE handle, int iValue); | ||
| 176 | typedef int (*GUIControl_SettingsSlider_GetIntValue)(void *addonData, GUIHANDLE handle); | ||
| 177 | typedef void (*GUIControl_SettingsSlider_SetIntInterval)(void *addonData, GUIHANDLE handle, int iInterval); | ||
| 178 | typedef void (*GUIControl_SettingsSlider_SetPercentage)(void *addonData, GUIHANDLE handle, float fPercent); | ||
| 179 | typedef float (*GUIControl_SettingsSlider_GetPercentage)(void *addonData, GUIHANDLE handle); | ||
| 180 | typedef void (*GUIControl_SettingsSlider_SetFloatRange)(void *addonData, GUIHANDLE handle, float fStart, float fEnd); | ||
| 181 | typedef void (*GUIControl_SettingsSlider_SetFloatValue)(void *addonData, GUIHANDLE handle, float fValue); | ||
| 182 | typedef float (*GUIControl_SettingsSlider_GetFloatValue)(void *addonData, GUIHANDLE handle); | ||
| 183 | typedef void (*GUIControl_SettingsSlider_SetFloatInterval)(void *addonData, GUIHANDLE handle, float fInterval); | ||
| 184 | typedef GUIHANDLE (*GUIListItem_Create)(void *addonData, const char *label, const char *label2, const char *iconImage, const char *thumbnailImage, const char *path); | ||
| 185 | typedef const char* (*GUIListItem_GetLabel)(void *addonData, GUIHANDLE handle); | ||
| 186 | typedef void (*GUIListItem_SetLabel)(void *addonData, GUIHANDLE handle, const char *label); | ||
| 187 | typedef const char* (*GUIListItem_GetLabel2)(void *addonData, GUIHANDLE handle); | ||
| 188 | typedef void (*GUIListItem_SetLabel2)(void *addonData, GUIHANDLE handle, const char *label); | ||
| 189 | typedef void (*GUIListItem_SetIconImage)(void *addonData, GUIHANDLE handle, const char *image); | ||
| 190 | typedef void (*GUIListItem_SetThumbnailImage)(void *addonData, GUIHANDLE handle, const char *image); | ||
| 191 | typedef void (*GUIListItem_SetInfo)(void *addonData, GUIHANDLE handle, const char *info); | ||
| 192 | typedef void (*GUIListItem_SetProperty)(void *addonData, GUIHANDLE handle, const char *key, const char *value); | ||
| 193 | typedef const char* (*GUIListItem_GetProperty)(void *addonData, GUIHANDLE handle, const char *key); | ||
| 194 | typedef void (*GUIListItem_SetPath)(void *addonData, GUIHANDLE handle, const char *path); | ||
| 195 | typedef void (*GUIRenderAddon_SetCallbacks)(void *addonData, GUIHANDLE handle, GUIHANDLE clienthandle, bool (*createCB)(GUIHANDLE,int,int,int,int,void*), void (*renderCB)(GUIHANDLE), void (*stopCB)(GUIHANDLE), bool (*dirtyCB)(GUIHANDLE)); | ||
| 196 | typedef void (*GUIRenderAddon_Delete)(void *addonData, GUIHANDLE handle); | ||
| 197 | typedef void (*GUIRenderAddon_MarkDirty)(void *addonData, GUIHANDLE handle); | ||
| 198 | |||
| 199 | typedef bool (*GUIDialog_Keyboard_ShowAndGetInputWithHead)(char &strTextString, unsigned int iMaxStringSize, const char *heading, bool allowEmptyResult, bool hiddenInput, unsigned int autoCloseMs); | ||
| 200 | typedef bool (*GUIDialog_Keyboard_ShowAndGetInput)(char &strTextString, unsigned int iMaxStringSize, bool allowEmptyResult, unsigned int autoCloseMs); | ||
| 201 | typedef bool (*GUIDialog_Keyboard_ShowAndGetNewPasswordWithHead)(char &newPassword, unsigned int iMaxStringSize, const char *strHeading, bool allowEmptyResult, unsigned int autoCloseMs); | ||
| 202 | typedef bool (*GUIDialog_Keyboard_ShowAndGetNewPassword)(char &strNewPassword, unsigned int iMaxStringSize, unsigned int autoCloseMs); | ||
| 203 | typedef bool (*GUIDialog_Keyboard_ShowAndVerifyNewPasswordWithHead)(char &strNewPassword, unsigned int iMaxStringSize, const char *strHeading, bool allowEmpty, unsigned int autoCloseMs); | ||
| 204 | typedef bool (*GUIDialog_Keyboard_ShowAndVerifyNewPassword)(char &strNewPassword, unsigned int iMaxStringSize, unsigned int autoCloseMs); | ||
| 205 | typedef int (*GUIDialog_Keyboard_ShowAndVerifyPassword)(char &strPassword, unsigned int iMaxStringSize, const char *strHeading, int iRetries, unsigned int autoCloseMs); | ||
| 206 | typedef bool (*GUIDialog_Keyboard_ShowAndGetFilter)(char &aTextString, unsigned int iMaxStringSize, bool searching, unsigned int autoCloseMs); | ||
| 207 | typedef bool (*GUIDialog_Keyboard_SendTextToActiveKeyboard)(const char *aTextString, bool closeKeyboard); | ||
| 208 | typedef bool (*GUIDialog_Keyboard_isKeyboardActivated)(); | ||
| 209 | |||
| 210 | typedef bool (*GUIDialog_Numeric_ShowAndVerifyNewPassword)(char &strNewPassword, unsigned int iMaxStringSize); | ||
| 211 | typedef int (*GUIDialog_Numeric_ShowAndVerifyPassword)(char &strPassword, unsigned int iMaxStringSize, const char *strHeading, int iRetries); | ||
| 212 | typedef bool (*GUIDialog_Numeric_ShowAndVerifyInput)(char &strPassword, unsigned int iMaxStringSize, const char *strHeading, bool bGetUserInput); | ||
| 213 | typedef bool (*GUIDialog_Numeric_ShowAndGetTime)(tm &time, const char *strHeading); | ||
| 214 | typedef bool (*GUIDialog_Numeric_ShowAndGetDate)(tm &date, const char *strHeading); | ||
| 215 | typedef bool (*GUIDialog_Numeric_ShowAndGetIPAddress)(char &strIPAddress, unsigned int iMaxStringSize, const char *strHeading); | ||
| 216 | typedef bool (*GUIDialog_Numeric_ShowAndGetNumber)(char &strInput, unsigned int iMaxStringSize, const char *strHeading, unsigned int iAutoCloseTimeoutMs); | ||
| 217 | typedef bool (*GUIDialog_Numeric_ShowAndGetSeconds)(char &timeString, unsigned int iMaxStringSize, const char *strHeading); | ||
| 218 | |||
| 219 | typedef bool (*GUIDialog_FileBrowser_ShowAndGetFile)(const char *directory, const char *mask, const char *heading, char &path, unsigned int iMaxStringSize, bool useThumbs, bool useFileDirectories, bool singleList); | ||
| 220 | |||
| 221 | typedef void (*GUIDialog_OK_ShowAndGetInputSingleText)(const char *heading, const char *text); | ||
| 222 | typedef void (*GUIDialog_OK_ShowAndGetInputLineText)(const char *heading, const char *line0, const char *line1, const char *line2); | ||
| 223 | |||
| 224 | typedef bool (*GUIDialog_YesNo_ShowAndGetInputSingleText)(const char *heading, const char *text, bool& bCanceled, const char *noLabel, const char *yesLabel); | ||
| 225 | typedef bool (*GUIDialog_YesNo_ShowAndGetInputLineText)(const char *heading, const char *line0, const char *line1, const char *line2, const char *noLabel, const char *yesLabel); | ||
| 226 | typedef bool (*GUIDialog_YesNo_ShowAndGetInputLineButtonText)(const char *heading, const char *line0, const char *line1, const char *line2, bool &bCanceled, const char *noLabel, const char *yesLabel); | ||
| 227 | |||
| 228 | typedef void (*GUIDialog_TextViewer)(const char *heading, const char *text); | ||
| 229 | |||
| 230 | typedef int (*GUIDialog_Select)(const char *heading, const char *entries[], unsigned int size, int selected); | ||
| 231 | |||
| 232 | typedef struct CB_GUILib | ||
| 233 | { | ||
| 234 | GUILock Lock; | ||
| 235 | GUIUnlock Unlock; | ||
| 236 | GUIGetScreenHeight GetScreenHeight; | ||
| 237 | GUIGetScreenWidth GetScreenWidth; | ||
| 238 | GUIGetVideoResolution GetVideoResolution; | ||
| 239 | GUIWindow_New Window_New; | ||
| 240 | GUIWindow_Delete Window_Delete; | ||
| 241 | GUIWindow_SetCallbacks Window_SetCallbacks; | ||
| 242 | GUIWindow_Show Window_Show; | ||
| 243 | GUIWindow_Close Window_Close; | ||
| 244 | GUIWindow_DoModal Window_DoModal; | ||
| 245 | GUIWindow_SetFocusId Window_SetFocusId; | ||
| 246 | GUIWindow_GetFocusId Window_GetFocusId; | ||
| 247 | GUIWindow_SetCoordinateResolution Window_SetCoordinateResolution; | ||
| 248 | GUIWindow_SetProperty Window_SetProperty; | ||
| 249 | GUIWindow_SetPropertyInt Window_SetPropertyInt; | ||
| 250 | GUIWindow_SetPropertyBool Window_SetPropertyBool; | ||
| 251 | GUIWindow_SetPropertyDouble Window_SetPropertyDouble; | ||
| 252 | GUIWindow_GetProperty Window_GetProperty; | ||
| 253 | GUIWindow_GetPropertyInt Window_GetPropertyInt; | ||
| 254 | GUIWindow_GetPropertyBool Window_GetPropertyBool; | ||
| 255 | GUIWindow_GetPropertyDouble Window_GetPropertyDouble; | ||
| 256 | GUIWindow_ClearProperties Window_ClearProperties; | ||
| 257 | GUIWindow_GetListSize Window_GetListSize; | ||
| 258 | GUIWindow_ClearList Window_ClearList; | ||
| 259 | GUIWindow_AddItem Window_AddItem; | ||
| 260 | GUIWindow_AddStringItem Window_AddStringItem; | ||
| 261 | GUIWindow_RemoveItem Window_RemoveItem; | ||
| 262 | GUIWindow_GetListItem Window_GetListItem; | ||
| 263 | GUIWindow_SetCurrentListPosition Window_SetCurrentListPosition; | ||
| 264 | GUIWindow_GetCurrentListPosition Window_GetCurrentListPosition; | ||
| 265 | GUIWindow_GetControl_Spin Window_GetControl_Spin; | ||
| 266 | GUIWindow_GetControl_Button Window_GetControl_Button; | ||
| 267 | GUIWindow_GetControl_RadioButton Window_GetControl_RadioButton; | ||
| 268 | GUIWindow_GetControl_Edit Window_GetControl_Edit; | ||
| 269 | GUIWindow_GetControl_Progress Window_GetControl_Progress; | ||
| 270 | GUIWindow_GetControl_RenderAddon Window_GetControl_RenderAddon; | ||
| 271 | GUIWindow_SetControlLabel Window_SetControlLabel; | ||
| 272 | GUIWindow_MarkDirtyRegion Window_MarkDirtyRegion; | ||
| 273 | GUIControl_Spin_SetVisible Control_Spin_SetVisible; | ||
| 274 | GUIControl_Spin_SetText Control_Spin_SetText; | ||
| 275 | GUIControl_Spin_Clear Control_Spin_Clear; | ||
| 276 | GUIControl_Spin_AddLabel Control_Spin_AddLabel; | ||
| 277 | GUIControl_Spin_GetValue Control_Spin_GetValue; | ||
| 278 | GUIControl_Spin_SetValue Control_Spin_SetValue; | ||
| 279 | GUIControl_RadioButton_SetVisible Control_RadioButton_SetVisible; | ||
| 280 | GUIControl_RadioButton_SetText Control_RadioButton_SetText; | ||
| 281 | GUIControl_RadioButton_SetSelected Control_RadioButton_SetSelected; | ||
| 282 | GUIControl_RadioButton_IsSelected Control_RadioButton_IsSelected; | ||
| 283 | GUIControl_Progress_SetPercentage Control_Progress_SetPercentage; | ||
| 284 | GUIControl_Progress_GetPercentage Control_Progress_GetPercentage; | ||
| 285 | GUIControl_Progress_SetInfo Control_Progress_SetInfo; | ||
| 286 | GUIControl_Progress_GetInfo Control_Progress_GetInfo; | ||
| 287 | GUIControl_Progress_GetDescription Control_Progress_GetDescription; | ||
| 288 | GUIListItem_Create ListItem_Create; | ||
| 289 | GUIListItem_GetLabel ListItem_GetLabel; | ||
| 290 | GUIListItem_SetLabel ListItem_SetLabel; | ||
| 291 | GUIListItem_GetLabel2 ListItem_GetLabel2; | ||
| 292 | GUIListItem_SetLabel2 ListItem_SetLabel2; | ||
| 293 | GUIListItem_SetIconImage ListItem_SetIconImage; | ||
| 294 | GUIListItem_SetThumbnailImage ListItem_SetThumbnailImage; | ||
| 295 | GUIListItem_SetInfo ListItem_SetInfo; | ||
| 296 | GUIListItem_SetProperty ListItem_SetProperty; | ||
| 297 | GUIListItem_GetProperty ListItem_GetProperty; | ||
| 298 | GUIListItem_SetPath ListItem_SetPath; | ||
| 299 | GUIRenderAddon_SetCallbacks RenderAddon_SetCallbacks; | ||
| 300 | GUIRenderAddon_Delete RenderAddon_Delete; | ||
| 301 | |||
| 302 | GUIWindow_GetControl_Slider Window_GetControl_Slider; | ||
| 303 | GUIControl_Slider_SetVisible Control_Slider_SetVisible; | ||
| 304 | GUIControl_Slider_GetDescription Control_Slider_GetDescription; | ||
| 305 | GUIControl_Slider_SetIntRange Control_Slider_SetIntRange; | ||
| 306 | GUIControl_Slider_SetIntValue Control_Slider_SetIntValue; | ||
| 307 | GUIControl_Slider_GetIntValue Control_Slider_GetIntValue; | ||
| 308 | GUIControl_Slider_SetIntInterval Control_Slider_SetIntInterval; | ||
| 309 | GUIControl_Slider_SetPercentage Control_Slider_SetPercentage; | ||
| 310 | GUIControl_Slider_GetPercentage Control_Slider_GetPercentage; | ||
| 311 | GUIControl_Slider_SetFloatRange Control_Slider_SetFloatRange; | ||
| 312 | GUIControl_Slider_SetFloatValue Control_Slider_SetFloatValue; | ||
| 313 | GUIControl_Slider_GetFloatValue Control_Slider_GetFloatValue; | ||
| 314 | GUIControl_Slider_SetFloatInterval Control_Slider_SetFloatInterval; | ||
| 315 | |||
| 316 | GUIWindow_GetControl_SettingsSlider Window_GetControl_SettingsSlider; | ||
| 317 | GUIControl_SettingsSlider_SetVisible Control_SettingsSlider_SetVisible; | ||
| 318 | GUIControl_SettingsSlider_SetText Control_SettingsSlider_SetText; | ||
| 319 | GUIControl_SettingsSlider_GetDescription Control_SettingsSlider_GetDescription; | ||
| 320 | GUIControl_SettingsSlider_SetIntRange Control_SettingsSlider_SetIntRange; | ||
| 321 | GUIControl_SettingsSlider_SetIntValue Control_SettingsSlider_SetIntValue; | ||
| 322 | GUIControl_SettingsSlider_GetIntValue Control_SettingsSlider_GetIntValue; | ||
| 323 | GUIControl_SettingsSlider_SetIntInterval Control_SettingsSlider_SetIntInterval; | ||
| 324 | GUIControl_SettingsSlider_SetPercentage Control_SettingsSlider_SetPercentage; | ||
| 325 | GUIControl_SettingsSlider_GetPercentage Control_SettingsSlider_GetPercentage; | ||
| 326 | GUIControl_SettingsSlider_SetFloatRange Control_SettingsSlider_SetFloatRange; | ||
| 327 | GUIControl_SettingsSlider_SetFloatValue Control_SettingsSlider_SetFloatValue; | ||
| 328 | GUIControl_SettingsSlider_GetFloatValue Control_SettingsSlider_GetFloatValue; | ||
| 329 | GUIControl_SettingsSlider_SetFloatInterval Control_SettingsSlider_SetFloatInterval; | ||
| 330 | |||
| 331 | GUIDialog_Keyboard_ShowAndGetInputWithHead Dialog_Keyboard_ShowAndGetInputWithHead; | ||
| 332 | GUIDialog_Keyboard_ShowAndGetInput Dialog_Keyboard_ShowAndGetInput; | ||
| 333 | GUIDialog_Keyboard_ShowAndGetNewPasswordWithHead Dialog_Keyboard_ShowAndGetNewPasswordWithHead; | ||
| 334 | GUIDialog_Keyboard_ShowAndGetNewPassword Dialog_Keyboard_ShowAndGetNewPassword; | ||
| 335 | GUIDialog_Keyboard_ShowAndVerifyNewPasswordWithHead Dialog_Keyboard_ShowAndVerifyNewPasswordWithHead; | ||
| 336 | GUIDialog_Keyboard_ShowAndVerifyNewPassword Dialog_Keyboard_ShowAndVerifyNewPassword; | ||
| 337 | GUIDialog_Keyboard_ShowAndVerifyPassword Dialog_Keyboard_ShowAndVerifyPassword; | ||
| 338 | GUIDialog_Keyboard_ShowAndGetFilter Dialog_Keyboard_ShowAndGetFilter; | ||
| 339 | GUIDialog_Keyboard_SendTextToActiveKeyboard Dialog_Keyboard_SendTextToActiveKeyboard; | ||
| 340 | GUIDialog_Keyboard_isKeyboardActivated Dialog_Keyboard_isKeyboardActivated; | ||
| 341 | |||
| 342 | GUIDialog_Numeric_ShowAndVerifyNewPassword Dialog_Numeric_ShowAndVerifyNewPassword; | ||
| 343 | GUIDialog_Numeric_ShowAndVerifyPassword Dialog_Numeric_ShowAndVerifyPassword; | ||
| 344 | GUIDialog_Numeric_ShowAndVerifyInput Dialog_Numeric_ShowAndVerifyInput; | ||
| 345 | GUIDialog_Numeric_ShowAndGetTime Dialog_Numeric_ShowAndGetTime; | ||
| 346 | GUIDialog_Numeric_ShowAndGetDate Dialog_Numeric_ShowAndGetDate; | ||
| 347 | GUIDialog_Numeric_ShowAndGetIPAddress Dialog_Numeric_ShowAndGetIPAddress; | ||
| 348 | GUIDialog_Numeric_ShowAndGetNumber Dialog_Numeric_ShowAndGetNumber; | ||
| 349 | GUIDialog_Numeric_ShowAndGetSeconds Dialog_Numeric_ShowAndGetSeconds; | ||
| 350 | |||
| 351 | GUIDialog_FileBrowser_ShowAndGetFile Dialog_FileBrowser_ShowAndGetFile; | ||
| 352 | |||
| 353 | GUIDialog_OK_ShowAndGetInputSingleText Dialog_OK_ShowAndGetInputSingleText; | ||
| 354 | GUIDialog_OK_ShowAndGetInputLineText Dialog_OK_ShowAndGetInputLineText; | ||
| 355 | |||
| 356 | GUIDialog_YesNo_ShowAndGetInputSingleText Dialog_YesNo_ShowAndGetInputSingleText; | ||
| 357 | GUIDialog_YesNo_ShowAndGetInputLineText Dialog_YesNo_ShowAndGetInputLineText; | ||
| 358 | GUIDialog_YesNo_ShowAndGetInputLineButtonText Dialog_YesNo_ShowAndGetInputLineButtonText; | ||
| 359 | |||
| 360 | GUIDialog_TextViewer Dialog_TextViewer; | ||
| 361 | GUIDialog_Select Dialog_Select; | ||
| 362 | } CB_GUILib; | ||
| 363 | |||
| 364 | typedef void (*PVRTransferEpgEntry)(void *userData, const ADDON_HANDLE handle, const EPG_TAG *epgentry); | ||
| 365 | typedef void (*PVRTransferChannelEntry)(void *userData, const ADDON_HANDLE handle, const PVR_CHANNEL *chan); | ||
| 366 | typedef void (*PVRTransferTimerEntry)(void *userData, const ADDON_HANDLE handle, const PVR_TIMER *timer); | ||
| 367 | typedef void (*PVRTransferRecordingEntry)(void *userData, const ADDON_HANDLE handle, const PVR_RECORDING *recording); | ||
| 368 | typedef void (*PVRAddMenuHook)(void *addonData, PVR_MENUHOOK *hook); | ||
| 369 | typedef void (*PVRRecording)(void *addonData, const char *Name, const char *FileName, bool On); | ||
| 370 | typedef void (*PVRTriggerChannelUpdate)(void *addonData); | ||
| 371 | typedef void (*PVRTriggerTimerUpdate)(void *addonData); | ||
| 372 | typedef void (*PVRTriggerRecordingUpdate)(void *addonData); | ||
| 373 | typedef void (*PVRTriggerChannelGroupsUpdate)(void *addonData); | ||
| 374 | typedef void (*PVRTriggerEpgUpdate)(void *addonData, unsigned int iChannelUid); | ||
| 375 | |||
| 376 | typedef void (*PVRTransferChannelGroup)(void *addonData, const ADDON_HANDLE handle, const PVR_CHANNEL_GROUP *group); | ||
| 377 | typedef void (*PVRTransferChannelGroupMember)(void *addonData, const ADDON_HANDLE handle, const PVR_CHANNEL_GROUP_MEMBER *member); | ||
| 378 | |||
| 379 | typedef void (*PVRFreeDemuxPacket)(void *addonData, DemuxPacket* pPacket); | ||
| 380 | typedef DemuxPacket* (*PVRAllocateDemuxPacket)(void *addonData, int iDataSize); | ||
| 381 | |||
| 382 | typedef struct CB_PVRLib | ||
| 383 | { | ||
| 384 | PVRTransferEpgEntry TransferEpgEntry; | ||
| 385 | PVRTransferChannelEntry TransferChannelEntry; | ||
| 386 | PVRTransferTimerEntry TransferTimerEntry; | ||
| 387 | PVRTransferRecordingEntry TransferRecordingEntry; | ||
| 388 | PVRAddMenuHook AddMenuHook; | ||
| 389 | PVRRecording Recording; | ||
| 390 | PVRTriggerChannelUpdate TriggerChannelUpdate; | ||
| 391 | PVRTriggerTimerUpdate TriggerTimerUpdate; | ||
| 392 | PVRTriggerRecordingUpdate TriggerRecordingUpdate; | ||
| 393 | PVRTriggerChannelGroupsUpdate TriggerChannelGroupsUpdate; | ||
| 394 | PVRTriggerEpgUpdate TriggerEpgUpdate; | ||
| 395 | PVRFreeDemuxPacket FreeDemuxPacket; | ||
| 396 | PVRAllocateDemuxPacket AllocateDemuxPacket; | ||
| 397 | PVRTransferChannelGroup TransferChannelGroup; | ||
| 398 | PVRTransferChannelGroupMember TransferChannelGroupMember; | ||
| 399 | |||
| 400 | } CB_PVRLib; | ||
| 401 | |||
| 402 | |||
| 403 | typedef CB_AddOnLib* (*XBMCAddOnLib_RegisterMe)(void *addonData); | ||
| 404 | typedef void (*XBMCAddOnLib_UnRegisterMe)(void *addonData, CB_AddOnLib *cbTable); | ||
| 405 | typedef CB_CODECLib* (*XBMCCODECLib_RegisterMe)(void *addonData); | ||
| 406 | typedef void (*XBMCCODECLib_UnRegisterMe)(void *addonData, CB_CODECLib *cbTable); | ||
| 407 | typedef CB_GUILib* (*XBMCGUILib_RegisterMe)(void *addonData); | ||
| 408 | typedef void (*XBMCGUILib_UnRegisterMe)(void *addonData, CB_GUILib *cbTable); | ||
| 409 | typedef CB_PVRLib* (*XBMCPVRLib_RegisterMe)(void *addonData); | ||
| 410 | typedef void (*XBMCPVRLib_UnRegisterMe)(void *addonData, CB_PVRLib *cbTable); | ||
| 411 | |||
| 412 | typedef struct AddonCB | ||
| 413 | { | ||
| 414 | const char *libBasePath; ///> Never, never change this!!! | ||
| 415 | void *addonData; | ||
| 416 | XBMCAddOnLib_RegisterMe AddOnLib_RegisterMe; | ||
| 417 | XBMCAddOnLib_UnRegisterMe AddOnLib_UnRegisterMe; | ||
| 418 | XBMCCODECLib_RegisterMe CODECLib_RegisterMe; | ||
| 419 | XBMCCODECLib_UnRegisterMe CODECLib_UnRegisterMe; | ||
| 420 | XBMCGUILib_RegisterMe GUILib_RegisterMe; | ||
| 421 | XBMCGUILib_UnRegisterMe GUILib_UnRegisterMe; | ||
| 422 | XBMCPVRLib_RegisterMe PVRLib_RegisterMe; | ||
| 423 | XBMCPVRLib_UnRegisterMe PVRLib_UnRegisterMe; | ||
| 424 | } AddonCB; | ||
| 425 | |||
| 426 | |||
| 427 | namespace ADDON | ||
| 428 | { | ||
| 429 | |||
| 430 | class CAddon; | ||
| 431 | class CAddonCallbacksAddon; | ||
| 432 | class CAddonCallbacksCodec; | ||
| 433 | class CAddonCallbacksGUI; | ||
| 434 | class CAddonCallbacksPVR; | ||
| 435 | |||
| 436 | class CAddonCallbacks | ||
| 437 | { | ||
| 438 | public: | ||
| 439 | CAddonCallbacks(CAddon* addon); | ||
| 440 | ~CAddonCallbacks(); | ||
| 441 | AddonCB *GetCallbacks() { return m_callbacks; } | ||
| 442 | |||
| 443 | static CB_AddOnLib* AddOnLib_RegisterMe(void *addonData); | ||
| 444 | static void AddOnLib_UnRegisterMe(void *addonData, CB_AddOnLib *cbTable); | ||
| 445 | static CB_CODECLib* CODECLib_RegisterMe(void *addonData); | ||
| 446 | static void CODECLib_UnRegisterMe(void *addonData, CB_CODECLib *cbTable); | ||
| 447 | static CB_GUILib* GUILib_RegisterMe(void *addonData); | ||
| 448 | static void GUILib_UnRegisterMe(void *addonData, CB_GUILib *cbTable); | ||
| 449 | static CB_PVRLib* PVRLib_RegisterMe(void *addonData); | ||
| 450 | static void PVRLib_UnRegisterMe(void *addonData, CB_PVRLib *cbTable); | ||
| 451 | |||
| 452 | CAddonCallbacksAddon *GetHelperAddon() { return m_helperAddon; } | ||
| 453 | CAddonCallbacksCodec *GetHelperCodec() { return m_helperCODEC; } | ||
| 454 | CAddonCallbacksGUI *GetHelperGUI() { return m_helperGUI; } | ||
| 455 | CAddonCallbacksPVR *GetHelperPVR() { return m_helperPVR; } | ||
| 456 | |||
| 457 | private: | ||
| 458 | AddonCB *m_callbacks; | ||
| 459 | CAddon *m_addon; | ||
| 460 | CAddonCallbacksAddon *m_helperAddon; | ||
| 461 | CAddonCallbacksCodec *m_helperCODEC; | ||
| 462 | CAddonCallbacksGUI *m_helperGUI; | ||
| 463 | CAddonCallbacksPVR *m_helperPVR; | ||
| 464 | }; | ||
| 465 | |||
| 466 | }; /* namespace ADDON */ | ||
