diff options
| author | manuel <manuel@mausz.at> | 2018-01-01 13:40:09 +0100 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2018-01-01 13:40:09 +0100 |
| commit | 4830f27a40323fe859dc166337a2b861877b7121 (patch) | |
| tree | 39e9f712a5415ec0026c3914f4bf600b2f679287 /xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h | |
| parent | 0afb1d4d51973cf52973617c92236d851a039d31 (diff) | |
| download | kodi-pvr-build-4830f27a40323fe859dc166337a2b861877b7121.tar.gz kodi-pvr-build-4830f27a40323fe859dc166337a2b861877b7121.tar.bz2 kodi-pvr-build-4830f27a40323fe859dc166337a2b861877b7121.zip | |
sync with upstream
Diffstat (limited to 'xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h')
| -rw-r--r-- | xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h index c264578..5ef6bdc 100644 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h +++ b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libXBMC_addon.h | |||
| @@ -139,6 +139,7 @@ typedef struct CB_AddOn | |||
| 139 | char* (*GetLocalizedString)(const void* addonData, long dwCode); | 139 | char* (*GetLocalizedString)(const void* addonData, long dwCode); |
| 140 | char* (*GetDVDMenuLanguage)(const void* addonData); | 140 | char* (*GetDVDMenuLanguage)(const void* addonData); |
| 141 | void (*FreeString)(const void* addonData, char* str); | 141 | void (*FreeString)(const void* addonData, char* str); |
| 142 | void (*FreeStringArray)(const void* addonData, char** arr, int numElements); | ||
| 142 | 143 | ||
| 143 | void* (*OpenFile)(const void* addonData, const char* strFileName, unsigned int flags); | 144 | void* (*OpenFile)(const void* addonData, const char* strFileName, unsigned int flags); |
| 144 | void* (*OpenFileForWrite)(const void* addonData, const char* strFileName, bool bOverWrite); | 145 | void* (*OpenFileForWrite)(const void* addonData, const char* strFileName, bool bOverWrite); |
| @@ -155,7 +156,8 @@ typedef struct CB_AddOn | |||
| 155 | int (*GetFileChunkSize)(const void* addonData, void* file); | 156 | int (*GetFileChunkSize)(const void* addonData, void* file); |
| 156 | bool (*FileExists)(const void* addonData, const char *strFileName, bool bUseCache); | 157 | bool (*FileExists)(const void* addonData, const char *strFileName, bool bUseCache); |
| 157 | int (*StatFile)(const void* addonData, const char *strFileName, struct __stat64* buffer); | 158 | int (*StatFile)(const void* addonData, const char *strFileName, struct __stat64* buffer); |
| 158 | char *(*GetFileProperty)(const void* addonData, void* file, XFILE::FileProperty type, const char *name); | 159 | char *(*GetFilePropertyValue)(const void* addonData, void* file, XFILE::FileProperty type, const char *name); |
| 160 | char **(*GetFilePropertyValues)(const void* addonData, void* file, XFILE::FileProperty type, const char *name, int *numPorperties); | ||
| 159 | bool (*DeleteFile)(const void* addonData, const char *strFileName); | 161 | bool (*DeleteFile)(const void* addonData, const char *strFileName); |
| 160 | bool (*CanOpenDirectory)(const void* addonData, const char* strURL); | 162 | bool (*CanOpenDirectory)(const void* addonData, const char* strURL); |
| 161 | bool (*CreateDirectory)(const void* addonData, const char *strPath); | 163 | bool (*CreateDirectory)(const void* addonData, const char *strPath); |
| @@ -299,6 +301,16 @@ namespace ADDON | |||
| 299 | { | 301 | { |
| 300 | m_Callbacks->FreeString(m_Handle->addonData, str); | 302 | m_Callbacks->FreeString(m_Handle->addonData, str); |
| 301 | } | 303 | } |
| 304 | |||
| 305 | /*! | ||
| 306 | * @brief Free the memory used by arr including its elements | ||
| 307 | * @param arr The string array to free | ||
| 308 | * @param numElements The length of the array | ||
| 309 | */ | ||
| 310 | void FreeStringArray(char** arr, int numElements) | ||
| 311 | { | ||
| 312 | m_Callbacks->FreeStringArray(m_Handle->addonData, arr, numElements); | ||
| 313 | } | ||
| 302 | 314 | ||
| 303 | /*! | 315 | /*! |
| 304 | * @brief Open the file with filename via XBMC's CFile. Needs to be closed by calling CloseFile() when done. | 316 | * @brief Open the file with filename via XBMC's CFile. Needs to be closed by calling CloseFile() when done. |
| @@ -468,13 +480,26 @@ namespace ADDON | |||
| 468 | /*! | 480 | /*! |
| 469 | * @brief Get a property from an open file. | 481 | * @brief Get a property from an open file. |
| 470 | * @param file The file to get an property for | 482 | * @param file The file to get an property for |
| 471 | * @param type type of the requested property. | 483 | * @param type Type of the requested property. |
| 472 | * @param name of the requested property / can be null. | 484 | * @param name Name of the requested property / can be null. |
| 473 | * @return The value of the requested property, must be FreeString'ed. | 485 | * @return The value of the requested property, must be FreeString'ed. |
| 474 | */ | 486 | */ |
| 475 | char *GetFileProperty(void* file, XFILE::FileProperty type, const char *name) | 487 | char *GetFilePropertyValue(void* file, XFILE::FileProperty type, const char *name) |
| 488 | { | ||
| 489 | return m_Callbacks->GetFilePropertyValue(m_Handle->addonData, file, type, name); | ||
| 490 | } | ||
| 491 | |||
| 492 | /*! | ||
| 493 | * @brief Get multiple property values from an open file. | ||
| 494 | * @param file The file to get the property values for | ||
| 495 | * @param type Type of the requested property. | ||
| 496 | * @param name Name of the requested property / can be null. | ||
| 497 | * @param numValues Number of property values returned. | ||
| 498 | * @return List of values of the requested property, must be FreeStringArray'ed. | ||
| 499 | */ | ||
| 500 | char **GetFilePropertyValues(void* file, XFILE::FileProperty type, const char *name, int *numValues) | ||
| 476 | { | 501 | { |
| 477 | return m_Callbacks->GetFileProperty(m_Handle->addonData, file, type, name); | 502 | return m_Callbacks->GetFilePropertyValues(m_Handle->addonData, file, type, name, numValues); |
| 478 | } | 503 | } |
| 479 | 504 | ||
| 480 | /*! | 505 | /*! |
