#include <mw/wac/wacstorage.h>
class WAC::Storage : public QObject, public QObject |
Protected Attributes | |
---|---|
QString | m_storageName |
Public Member Enumerations | |
---|---|
enum | protection { prot_signed, prot_encrypted } |
enum | visibility { vis_shared, vis_private } |
Public Member Functions | |
---|---|
virtual | ~Storage() |
pure virtual void | add(const QFile &) |
pure virtual void | add(const QString &, const QBuffer &) |
pure virtual qint32 | count() |
Storage * | createInstance(const QString &, WAC::Storage::visibility, WAC::Storage::protection, QObject *) |
pure virtual QIODevice * | getFile(const QString &) |
pure virtual QStringList | getFileList() |
pure virtual void | remove(const QFile &) |
virtual QString | storageName() |
pure virtual bool | verify(const QFile &) |
Protected Member Functions | |
---|---|
Storage(const QString &, QObject *) |
Inherited Attributes | |
---|---|
QObject::d_ptr | |
QObject::objectName | |
QObject::staticQtMetaObject |
Inherited Functions | |
---|---|
QObject::QObject(QObjectPrivate &,QObject *) | |
QObject::blockSignals(bool) | |
QObject::childEvent(QChildEvent *) | |
QObject::children()const | |
QObject::connect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &,Qt::ConnectionType) | |
QObject::connect(const QObject *,const char *,const QObject *,const char *,Qt::ConnectionType) | |
QObject::connect(const QObject *,const char *,const char *,Qt::ConnectionType)const | |
QObject::connectNotify(const char *) | |
QObject::customEvent(QEvent *) | |
QObject::deleteLater | |
QObject::destroyed | |
QObject::disconnect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &) | |
QObject::disconnect(const QObject *,const char *) | |
QObject::disconnect(const QObject *,const char *,const QObject *,const char *) | |
QObject::disconnect(const char *,const QObject *,const char *) | |
QObject::disconnectNotify(const char *) | |
QObject::dumpObjectInfo() | |
QObject::dumpObjectTree() | |
QObject::dynamicPropertyNames()const | |
QObject::event(QEvent *) | |
QObject::eventFilter(QObject *,QEvent *) | |
QObject::findChild(const QString &)const | |
QObject::findChildren(const QRegExp &)const | |
QObject::findChildren(const QString &)const | |
QObject::inherits(const char *)const | |
QObject::installEventFilter(QObject *) | |
QObject::isWidgetType()const | |
QObject::killTimer(int) | |
QObject::moveToThread(QThread *) | |
QObject::objectName()const | |
QObject::parent()const | |
QObject::property(const char *)const | |
QObject::receivers(const char *)const | |
QObject::registerUserData() | |
QObject::removeEventFilter(QObject *) | |
QObject::sender()const | |
QObject::senderSignalIndex()const | |
QObject::setObjectName(const QString &) | |
QObject::setParent(QObject *) | |
QObject::setProperty(const char *,const QVariant &) | |
QObject::setUserData(uint,QObjectUserData *) | |
QObject::signalsBlocked()const | |
QObject::startTimer(int) | |
QObject::thread()const | |
QObject::timerEvent(QTimerEvent *) | |
QObject::userData(uint)const | |
QObject::~QObject() |
Storage interface
QString | m_storageName | [protected] |
The protection level of a storage. Defined when a storage is created and cannot be changed afterwards.
Enumerator | Value | Description |
---|---|---|
prot_signed | ||
prot_encrypted |
The visibility of a storage. Defined when a storage is created and cannot be changed afterwards.
Enumerator | Value | Description |
---|---|---|
vis_shared | ||
vis_private |
Storage | ( | const QString & | aStorageName, |
QObject * | aParent = 0 | ||
) | [protected, explicit] |
~Storage | ( | ) | [virtual] |
void | add | ( | const QFile & | aFile | ) | [pure virtual] |
Adds a file to storage. Calculates checksum for the file based on the file name and size. Basic support based on MD5 hash.
Parameters | |
---|---|
aFile | the file to be added to storage, can be in either opened or closed state |
void | add | ( | const QString & | aFilePath, |
const QBuffer & | aData | |||
) | [pure virtual] |
Adds an in memory file to storage. Calculates checksum for the file based on the file name and size. Basic support based on MD5 hash.
Parameters | |
---|---|
aFilePath | the the file path including filename that is to be added to the storage |
Storage * | createInstance | ( | const QString & | aStorageName, |
WAC::Storage::visibility | = vis_shared, | |||
WAC::Storage::protection | = prot_signed, | |||
QObject * | aParent = 0 | |||
) | [static] |
Factory method for creating new instance of WAC::Storage class.
QIODevice * | getFile | ( | const QString & | aPathFile | ) | [pure virtual] |
Returns a file stored in the storage. Caller becomes the owner of the QIODevice. Hence, the caller must delete the QIODevice instance.
QStringList | getFileList | ( | ) | const [pure virtual] |
Returns a list of files stored in the storage
void | remove | ( | const QFile & | aFile | ) | [pure virtual] |
Removes a file from storage
Parameters | |
---|---|
aFile | to be removed from storage, can be in either opened or closed state |
bool | verify | ( | const QFile & | aFile | ) | const [pure virtual] |
Verifies that the checksum of a file matches to the stored file. Checksum is calculated from the file name, size, and last modification date of the file. Basic support based on MD5 hash.
Parameters | |
---|---|
aFile | to be verified, can be in either opened or closed state |