54 void setId(
const QString &aId );
60 const QString&
getId()
const;
78 void setType(
const QString& aType );
104 virtual bool write( qint64 aOffset,
const QByteArray& aData ) = 0;
113 virtual bool read( qint64 aOffset, qint64 aLength, QByteArray& aData )
const = 0;
120 virtual bool resize( qint64 aLen ) = 0;
126 virtual qint64
getSize()
const = 0;
const QString & getParentId() const
Returns the id of the parent of this item.
Definition: StorageItem.cpp:50
virtual bool resize(qint64 aLen)=0
Sets the length of the item data.
void setId(const QString &aId)
Sets the id of the item.
Definition: StorageItem.cpp:35
const QString & getId() const
Returns the id of the item.
Definition: StorageItem.cpp:40
virtual bool read(qint64 aOffset, qint64 aLength, QByteArray &aData) const =0
Read (part of) the item data.
Definition: AccountsHelper.h:31
void setVersion(const QString &aVersion)
Sets the version of this item.
Definition: StorageItem.cpp:65
Class to describe a storable item.
Definition: StorageItem.h:36
void setType(const QString &aType)
Sets the type of this item.
Definition: StorageItem.cpp:55
virtual qint64 getSize() const =0
Get the size of the item data.
virtual ~StorageItem()
Destructor.
Definition: StorageItem.cpp:31
const QString & getVersion() const
Gets the version of this item.
Definition: StorageItem.cpp:70
const QString & getType() const
Gets the type of this item.
Definition: StorageItem.cpp:60
virtual bool write(qint64 aOffset, const QByteArray &aData)=0
Write (part of) the item data.
StorageItem()
Constructor.
Definition: StorageItem.cpp:27
void setParentId(const QString &aParentId)
Sets the id of the parent of this item.
Definition: StorageItem.cpp:45