![]() |
Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
A mostly-typed representation of a URL to any image, whether a simple path to an image file, embedded in another file, or generated in some way. More...
#include <ImageFileURL.h>
Public Member Functions | |
CImageFileURL (const std::string &imageFileURL) | |
Create an ImageFileURL from a string representation. | |
void | AddOption (std::string key, std::string value) |
std::string | GetOption (const std::string &key) const |
std::string | ToString () const |
Build a complete string representation of this ImageFileURL. | |
std::string | ToCacheKey () const |
Build a cache key for this ImageFileURL. | |
const std::string & | GetTargetFile () const |
bool | IsSpecialImage () const |
const std::string & | GetSpecialType () const |
Static Public Member Functions | |
static CImageFileURL | FromFile (const std::string &filePath, std::string specialType="") |
Create an ImageFileURL pointing to a specific file. | |
Public Attributes | |
bool | flipped {false} |
A mostly-typed representation of a URL to any image, whether a simple path to an image file, embedded in another file, or generated in some way.
A URL string is good to pass between most classes, store, and transmit, but use this if you need to create or modify a special image path, or are working on the details of such image files.
URL string format is image://[type@]<url_encoded_path>?options
IMAGE_FILES::CImageFileURL::CImageFileURL | ( | const std::string & | imageFileURL | ) |
Create an ImageFileURL from a string representation.
void IMAGE_FILES::CImageFileURL::AddOption | ( | std::string | key, |
std::string | value ) |
|
static |
Create an ImageFileURL pointing to a specific file.
Provide a 'specialType' parameter to specify a special image loader.
specialType | set a special image type - an implementation of ISpecialImageFileLoader |
std::string IMAGE_FILES::CImageFileURL::GetOption | ( | const std::string & | key | ) | const |
|
inline |
|
inline |
|
inline |
std::string IMAGE_FILES::CImageFileURL::ToCacheKey | ( | ) | const |
Build a cache key for this ImageFileURL.
Return base filePath if not special and multiple options are in a stable order, otherwise return a complete string representation.
std::string IMAGE_FILES::CImageFileURL::ToString | ( | ) | const |
Build a complete string representation of this ImageFileURL.
bool IMAGE_FILES::CImageFileURL::flipped {false} |