WAC::Storage Class Reference

#include <mw/wac/wacstorage.h>

class WAC::Storage : public QObject, public QObject

Inherits from

  • WAC::Storage
    Protected Attributes
    QString m_storageName
    Public Member Enumerations
    enumprotection { prot_signed, prot_encrypted }
    enumvisibility { vis_shared, vis_private }
    Public Member Functions
    virtual ~Storage()
    pure virtual voidadd(const QFile &)
    pure virtual voidadd(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 voidremove(const QFile &)
    virtual QString storageName()
    pure virtual boolverify(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()

    Detailed Description

    Storage interface

    Member Attribute Documentation

    m_storageName

    QString m_storageName[protected]

    Member Enumeration Documentation

    Enum protection

    The protection level of a storage. Defined when a storage is created and cannot be changed afterwards.

    EnumeratorValueDescription
    prot_signed
    prot_encrypted

    Enum visibility

    The visibility of a storage. Defined when a storage is created and cannot be changed afterwards.

    EnumeratorValueDescription
    vis_shared
    vis_private

    Constructor & Destructor Documentation

    Storage ( const QString &, QObject * )

    Storage(const QString &aStorageName,
    QObject *aParent = 0
    )[protected, explicit]

    ~Storage ( )

    ~Storage()[virtual]

    Member Function Documentation

    add ( const QFile & )

    voidadd(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
    aFilethe file to be added to storage, can be in either opened or closed state

    add ( const QString &, const QBuffer & )

    voidadd(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
    aFilePaththe the file path including filename that is to be added to the storage

    count ( )

    qint32 count()const [pure virtual]

    Returns the number of files stored in the the storage.

    createInstance ( const QString &, WAC::Storage::visibility, WAC::Storage::protection, QObject * )

    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.

    getFile ( const QString & )

    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.

    Return Value
    a QIODevice instance when file exists in storage, null is returned otherwise. The returned QIODevice is not opened

    getFileList ( )

    QStringList getFileList()const [pure virtual]

    Returns a list of files stored in the storage

    Return Value
    a list of file name stored in the storage.

    remove ( const QFile & )

    voidremove(const QFile &aFile)[pure virtual]

    Removes a file from storage

    Parameters
    aFileto be removed from storage, can be in either opened or closed state

    storageName ( )

    QString storageName()const [virtual]

    Returns the storage name

    verify ( const QFile & )

    boolverify(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
    aFileto be verified, can be in either opened or closed state