![]() |
Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
Get access to shares and it's directories. More...
#include <AddonsDirectory.h>
Public Member Functions | |
CAddonsDirectory (void) | |
~CAddonsDirectory (void) override | |
bool | GetDirectory (const CURL &url, CFileItemList &items) override |
Get the items of the directory strPath. | |
bool | Create (const CURL &url) override |
Create the directory. | |
bool | Exists (const CURL &url) override |
Check for directory existence. | |
bool | AllowAll () const override |
Whether to allow all files/folders to be listed. | |
![]() | |
IDirectory () | |
virtual | ~IDirectory (void) |
virtual float | GetProgress () const |
Retrieve the progress of the current directory fetch (if possible). | |
virtual void | CancelDirectory () |
Cancel the current directory fetch (if possible). | |
virtual bool | Remove (const CURL &url) |
Removes the directory. | |
virtual bool | RemoveRecursive (const CURL &url) |
Recursively removes the directory. | |
virtual bool | IsAllowed (const CURL &url) const |
Whether this file should be listed. | |
virtual CacheType | GetCacheType (const CURL &url) const |
How this directory should be cached. | |
void | SetMask (const std::string &strMask) |
Set a mask of extensions for the files in the directory. | |
void | SetFlags (int flags) |
Set the flags for this directory handler. | |
bool | ProcessRequirements () |
Process additional requirements before the directory fetch is performed. Some directory fetches may require authentication, keyboard input etc. The IDirectory subclass should call GetKeyboardInput, SetErrorDialog or RequireAuthentication and then return false from the GetDirectory method. CDirectory will then prompt for input from the user, before re-calling the GetDirectory method. | |
virtual bool | Resolve (CFileItem &item) const |
Resolves a given item to a playable item. | |
Static Public Member Functions | |
static bool | GetScriptsAndPlugins (const std::string &content, ADDON::VECADDONS &addons) |
Fetch script and plugin addons of a given content type. | |
static bool | GetScriptsAndPlugins (const std::string &content, CFileItemList &items) |
Fetch scripts and plugins of a given content type. | |
static void | GenerateAddonListing (const CURL &path, const ADDON::VECADDONS &addons, CFileItemList &items, const std::string &label) |
static CFileItemPtr | FileItemFromAddon (const std::shared_ptr< ADDON::IAddon > &addon, const std::string &path, bool folder=false) |
static bool | IsRepoDirectory (const CURL &path) |
Returns true if path is a path or subpath of the repository directory, otherwise false. | |
![]() | |
static void | RegisterProfileManager (const CProfileManager &profileManager) |
static void | UnregisterProfileManager () |
Additional Inherited Members | |
![]() | |
bool | GetKeyboardInput (const CVariant &heading, std::string &input, bool hiddenInput=false) |
Prompt the user for some keyboard input Call this method from the GetDirectory method to retrieve additional input from the user. If this function returns false then no input has been received, and the GetDirectory call should return false. | |
void | SetErrorDialog (const CVariant &heading, const CVariant &line1, const CVariant &line2=0, const CVariant &line3=0) |
Show an error dialog on failure of GetDirectory call Call this method from the GetDirectory method to set an error message to be shown to the user. | |
void | RequireAuthentication (const CURL &url) |
Prompt the user for authentication of a URL. Call this method from the GetDirectory method when authentication is required from the user, before returning false from the GetDirectory call. The user will be prompted for authentication, and GetDirectory will be re-called. | |
![]() | |
std::string | m_strFileMask |
Holds the file mask specified by SetMask() | |
int | m_flags |
Directory flags - see DIR_FLAG. | |
CVariant | m_requirements |
![]() | |
static const CProfileManager * | m_profileManager = nullptr |
Get access to shares and it's directories.
|
default |
|
overridedefault |
|
inlineoverridevirtual |
Whether to allow all files/folders to be listed.
Reimplemented from XFILE::IDirectory.
Create the directory.
url | Directory to create. |
Reimplemented from XFILE::IDirectory.
Check for directory existence.
url | Directory to check. |
Reimplemented from XFILE::IDirectory.
|
static |
|
static |
|
overridevirtual |
Get the items of the directory strPath.
url | Directory to read. |
items | Retrieves the directory entries. |
Implements XFILE::IDirectory.
|
static |
Fetch script and plugin addons of a given content type.
content | the content type to fetch |
addons | the list of addons to fill with scripts and plugin content |
|
static |
Fetch scripts and plugins of a given content type.
content | the content type to fetch |
items | the list to fill with scripts and content |
Returns true if path
is a path or subpath of the repository directory, otherwise false.