|
MythTV master
|
The image manager to be used by the Backend. More...
#include <libmythmetadata/imagemanager.h>
Static Public Member Functions | |
| static ImageManagerBe * | getInstance () |
| Get Backend Gallery. More... | |
Protected Member Functions | |
| ImageManagerBe () | |
Protected Member Functions inherited from ImageHandler< ImageDbSg > | |
| ImageHandler () | |
| ~ImageHandler () override | |
| void | RemoveFiles (ImageList &images) const |
| Deletes images and dirs from the filesystem. More... | |
Protected Member Functions inherited from ImageDbSg | |
| ImageDbSg () | |
| SG database constructor. More... | |
Protected Member Functions inherited from ImageDb< ImageAdapterSg > | |
| ImageDb (QString table) | |
| ImageItem * | CreateImage (const MSqlQuery &query) const |
| Create image from Db query data. More... | |
| int | ReadImages (ImageList &dirs, ImageList &files, const QString &selector) const |
| Read selected database images/dirs. More... | |
| int | GetImages (const QString &ids, ImageList &files, ImageList &dirs, const QString &refine="") const |
| Read database images/dirs by id. More... | |
| bool | GetDescendants (const QString &ids, ImageList &files, ImageList &dirs) const |
| Return images and all of their descendants. More... | |
| int | InsertDbImage (ImageItemK &im, bool checkForDuplicate=false) const |
| Adds new image to database, optionally checking for existing filepath. More... | |
| bool | UpdateDbImage (ImageItemK &im) const |
| Updates or creates database image or dir. More... | |
| QStringList | RemoveFromDB (const ImageList &imList) const |
| Remove images/dirs from database. More... | |
| bool | SetHidden (bool hide, const QString &ids) const |
| Sets hidden status of an image/dir in database. More... | |
| bool | SetCover (int dir, int id) const |
| Set the thumbnail(s) to be used for a dir. More... | |
| bool | SetOrientation (int id, int orientation) const |
| Sets image orientation in Db. More... | |
| bool | ReadAllImages (ImageHash &files, ImageHash &dirs) const |
| Read all database images and dirs as map. No filters or ordering applied. More... | |
| void | ClearDb (int devId, const QString &action) |
| Clear Db for device & remove device. More... | |
| int | GetChildren (const QString &ids, ImageList &files, ImageList &dirs, const QString &refine="") const |
| Read immediate children of a dir. More... | |
| bool | GetImageTree (int id, ImageList &files, const QString &refine) const |
| Returns all files in the sub-tree of a dir. More... | |
| int | GetDirectory (int id, ImagePtr &parent, ImageList &files, ImageList &dirs, const QString &refine) const |
| Read a dir and its immediate children from Db. More... | |
| void | GetDescendantCount (int id, bool all, int &dirs, int &pics, int &videos, int &sizeKb) const |
| Return counts of dirs, pics, videos and size in the subtree of a dir. More... | |
Protected Member Functions inherited from ImageAdapterSg | |
| ImageAdapterSg () | |
| ImageItem * | CreateItem (const QFileInfo &fi, int parentId, int devId, const QString &base) const |
| Construct a remote image from a file. More... | |
| StringMap | GetScanDirs () const |
| Returns SG dirs. More... | |
| QString | GetAbsFilePath (const ImagePtrK &im) const |
| Get absolute filepath for a remote image. More... | |
| QString | MakeFileUrl (const QString &path) const |
| Construct URL of a remote image. More... | |
| QString | MakeThumbUrl (const QString &devPath, const QString &path="") const |
| Construct URL of the thumbnail of a remote image. More... | |
Protected Member Functions inherited from ImageAdapterBase | |
| ImageAdapterBase () | |
| Constructor. More... | |
| virtual | ~ImageAdapterBase ()=default |
| QDir | GetImageFilters () const |
| Get filters for detecting recognised images/videos. More... | |
| ImageNodeType | GetImageType (const QString &ext) const |
| Determine file type from its extension. More... | |
Protected Member Functions inherited from DeviceManager | |
| int | OpenDevice (const QString &name, const QString &mount, MythMediaDevice *media=nullptr, QTemporaryDir *dir=nullptr) |
| Define a new device and assign it a unique id. If the device is already known, its existing id is returned. More... | |
| int | LocateMount (const QString &mount) const |
| Find the id of a device. More... | |
| StringMap | GetDeviceDirs () const |
| Get all known devices. More... | |
| QList< int > | GetAbsentees () |
| Get list of mountpoints for non-import devices. More... | |
| DeviceManager ()=default | |
| ~DeviceManager () | |
| QStringList | CloseDevices (int devId, const QString &action) |
| Remove a device (or all devices) More... | |
| QString | DeviceMount (int devId) const |
| Get path at which the device is mounted. More... | |
| QString | DeviceName (int devId) const |
| Get model name of the device. More... | |
| int | DeviceCount () const |
| QString | ThumbDir (int fs) const |
Static Protected Attributes | |
| static ImageManagerBe * | s_instance = nullptr |
| BE Gallery instance. More... | |
Additional Inherited Members | |
Public Member Functions inherited from ImageHandler< ImageDbSg > | |
| QStringList | HandleRename (const QString &id, const QString &newBase) const |
| Change name of an image/dir. More... | |
| QStringList | HandleDelete (const QString &ids) const |
| Deletes images/dirs. More... | |
| QStringList | HandleDbCreate (QStringList defs) const |
| Creates images for files created by a copy operation. More... | |
| QStringList | HandleDbMove (const QString &ids, const QString &srcPath, QString destPath) const |
| Updates images that have been renamed. More... | |
| QStringList | HandleHide (bool hide, const QString &ids) const |
| Hides/unhides images/dirs. More... | |
| QStringList | HandleTransform (int transform, const QString &ids) const |
| Change orientation of pictures by applying a transformation. More... | |
| QStringList | HandleDirs (const QString &destId, bool rescan, const QStringList &relPaths) const |
| Creates new image directories. More... | |
| QStringList | HandleCover (int dir, int cover) const |
| Updates/resets cover thumbnail for an image dir. More... | |
| QStringList | HandleIgnore (const QString &exclusions) const |
| Updates exclusion list for images. More... | |
| QStringList | HandleScanRequest (const QString &command, int devId=DEVICE_INVALID) const |
| Process scan requests. More... | |
| QStringList | HandleCreateThumbnails (const QStringList &message) const |
| Creates thumbnails on-demand. More... | |
| QStringList | HandleGetMetadata (const QString &id) const |
| Read meta data for an image. More... | |
Static Protected Member Functions inherited from ImageAdapterSg | |
| static int | ImageId (int id) |
| static QString | ImageId (const QString &id) |
| static int | DbId (int id) |
| static QString | DbIds (const QString &ids) |
| static void | Notify (const QString &mesg, const QStringList &extra) |
| Send message to all clients about remote ids. More... | |
Static Protected Member Functions inherited from ImageAdapterBase | |
| static QStringList | SupportedImages () |
| Return recognised pictures. More... | |
| static QStringList | SupportedVideos () |
| Return recognised video extensions. More... | |
| static QString | ConstructPath (const QString &path, const QString &name) |
| Assembles a canonical file path without corrupting its absolute/relative nature. More... | |
| static QString | BaseNameOf (const QString &path) |
| Extracts file name (incl extension) from a filepath. More... | |
| static QString | PathOf (const QString &path) |
| Extracts path from a filepath. More... | |
| static QString | FormatSize (int sizeKib) |
| static QString | GetAbsThumbPath (const QString &devPath, const QString &path) |
| Get absolute filepath for thumbnail of an image. More... | |
| static QString | ThumbPath (const ImageItem &im) |
| Thumbnails of videos are a JPEG snapshot with jpg suffix appended. More... | |
Protected Attributes inherited from ImageHandler< ImageDbSg > | |
| ImageThumb< ImageDbSg > * | m_thumbGen |
| Thumbnail generator. More... | |
| ImageScanThread< ImageDbSg > * | m_scanner |
| File scanner. More... | |
Protected Attributes inherited from ImageDb< ImageAdapterSg > | |
| QString | m_table |
| Db table name. More... | |
The image manager to be used by the Backend.
A singleton created on first use and deleted when BE exits. Manages all storage group (remote) images
Definition at line 377 of file imagemanager.h.
|
inlineprotected |
Definition at line 383 of file imagemanager.h.
Referenced by getInstance().
|
static |
Get Backend Gallery.
Definition at line 1963 of file imagemanager.cpp.
Referenced by MainServer::customEvent(), and MainServer::ProcessRequestWork().
|
staticprotected |
BE Gallery instance.
Backend Gallery instance.
Definition at line 390 of file imagemanager.h.
Referenced by getInstance().