Used to determine Picture
file type and create appropriate PicHandler
.
More...
#include <libnebular-plugin.hpp>
Inherited by libnebular::MgrForPicHandler< CurrPictureHandler >.
Public Member Functions | |
virtual | ~PicHandlerMgr () |
virtual boost::shared_ptr < PictureHandler > | createPictureHandler () const =0 |
isHandleable | |
virtual bool | isHandleableByFileExt (Picture &pictureFile) const =0 |
By check of file extension. | |
virtual bool | isHandleableByContentMagic (Picture &pictureFile) const =0 |
By check of file content magic. | |
virtual bool | isWriteable (Picture &picture) const =0 |
Whether we can write such file (actually there will be check of "opt/file/mimetype" field). | |
Protected Member Functions | |
PicHandlerMgr () | |
Static Protected Member Functions | |
static void | determineFileExt (Picture &) |
Determine URL extension from "opt/file/url" property. | |
static bool | haveContentMagic (Picture &pictureFile, const Blob &magicData, Integer magicFileOffset) |
Whether file with "opt/file/url" from pictureFile contains binary data magicData at file offset magicFileOffset . |
Used to determine Picture
file type and create appropriate PicHandler
.
Definition at line 129 of file libnebular-plugin.hpp.
libnebular::PicHandlerMgr::PicHandlerMgr | ( | ) | [protected] |
Definition at line 375 of file libnebular.cpp.
libnebular::PicHandlerMgr::~PicHandlerMgr | ( | ) | [virtual] |
Definition at line 376 of file libnebular.cpp.
virtual boost::shared_ptr<PictureHandler> libnebular::PicHandlerMgr::createPictureHandler | ( | ) | const [pure virtual] |
Implemented in libnebular::MgrForPicHandler< CurrPictureHandler >.
void libnebular::PicHandlerMgr::determineFileExt | ( | Picture & | pic | ) | [static, protected] |
Determine URL extension from "opt/file/url" property.
Result will be stored as "opt/file/url-extension"
Definition at line 348 of file libnebular.cpp.
bool libnebular::PicHandlerMgr::haveContentMagic | ( | Picture & | pictureFile, | |
const Blob & | magicData, | |||
Integer | magicFileOffset | |||
) | [static, protected] |
Whether file with "opt/file/url" from pictureFile
contains binary data magicData
at file offset magicFileOffset
.
Definition at line 362 of file libnebular.cpp.
virtual bool libnebular::PicHandlerMgr::isHandleableByContentMagic | ( | Picture & | pictureFile | ) | const [pure virtual] |
By check of file content magic.
Put file URL to "opt/file/url" property.
Implemented in libnebular::MgrForPicHandler< CurrPictureHandler >.
virtual bool libnebular::PicHandlerMgr::isHandleableByFileExt | ( | Picture & | pictureFile | ) | const [pure virtual] |
By check of file extension.
Put file URL to "opt/file/url" property.
Implemented in libnebular::MgrForPicHandler< CurrPictureHandler >.
virtual bool libnebular::PicHandlerMgr::isWriteable | ( | Picture & | picture | ) | const [pure virtual] |
Whether we can write such file (actually there will be check of "opt/file/mimetype" field).
Put desired output "mimetype" to "opt/file/mimetype" property.
Implemented in libnebular::MgrForPicHandler< CurrPictureHandler >.