• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

akonadi

Akonadi::CollectionQuotaAttribute

Akonadi::CollectionQuotaAttribute Class Reference

Attribute that provides quota information for a collection. More...

#include <collectionquotaattribute.h>

Inheritance diagram for Akonadi::CollectionQuotaAttribute:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CollectionQuotaAttribute (qint64 currentValue, qint64 maxValue)
 CollectionQuotaAttribute ()
 ~CollectionQuotaAttribute ()
virtual Attribute * clone () const
qint64 currentValue () const
virtual void deserialize (const QByteArray &data)
qint64 maximumValue () const
virtual QByteArray serialized () const
void setCurrentValue (qint64 value)
void setMaximumValue (qint64 value)
virtual QByteArray type () const

Detailed Description

Attribute that provides quota information for a collection.

This attribute class provides quota information (e.g. current fill value and maximum fill value) for an Akonadi collection.

Example:

 using namespace Akonadi;

 const Collection collection = collectionFetchJob->collections().first();
 if ( collection.hasAttribute<CollectionQuotaAttribute>() ) {
   const CollectionQuotaAttribute *attribute = collection.attribute<CollectionQuotaAttribute>();
   qDebug() << "current value" << attribute->currentValue();
 }
Author:
Kevin Ottens <ervin@kde.org>
Since:
4.4

Definition at line 50 of file collectionquotaattribute.h.


Constructor & Destructor Documentation

CollectionQuotaAttribute::CollectionQuotaAttribute (  ) 

Creates a new collection quota attribute.

Definition at line 38 of file collectionquotaattribute.cpp.

CollectionQuotaAttribute::CollectionQuotaAttribute ( qint64  currentValue,
qint64  maxValue 
)

Creates a new collection quota attribute with initial values.

Parameters:
currentValue The current quota value in bytes.
maxValue The maximum quota value in bytes.

Definition at line 43 of file collectionquotaattribute.cpp.

CollectionQuotaAttribute::~CollectionQuotaAttribute (  ) 

Destroys the collection quota attribute.

Definition at line 48 of file collectionquotaattribute.cpp.


Member Function Documentation

Akonadi::Attribute * CollectionQuotaAttribute::clone (  )  const [virtual]

Creates a copy of this attribute.

Implements Akonadi::Attribute.

Definition at line 78 of file collectionquotaattribute.cpp.

qint64 CollectionQuotaAttribute::currentValue (  )  const

Returns the current quota value in bytes.

Definition at line 63 of file collectionquotaattribute.cpp.

void CollectionQuotaAttribute::deserialize ( const QByteArray &  data  )  [virtual]

Sets the data of this attribute, using the same encoding as returned by toByteArray().

Parameters:
data The encoded attribute data.

Implements Akonadi::Attribute.

Definition at line 90 of file collectionquotaattribute.cpp.

qint64 CollectionQuotaAttribute::maximumValue (  )  const

Returns the maximum quota value in bytes.

Definition at line 68 of file collectionquotaattribute.cpp.

QByteArray CollectionQuotaAttribute::serialized (  )  const [virtual]

Returns a QByteArray representation of the attribute which will be storaged.

This can be raw binary data, no encoding needs to be applied.

Implements Akonadi::Attribute.

Definition at line 83 of file collectionquotaattribute.cpp.

void CollectionQuotaAttribute::setCurrentValue ( qint64  value  ) 

Sets the current quota value for the collection.

Parameters:
value The current quota value in bytes.

Definition at line 53 of file collectionquotaattribute.cpp.

void CollectionQuotaAttribute::setMaximumValue ( qint64  value  ) 

Sets the maximum quota value for the collection.

Parameters:
value The maximum quota value in bytes.

Definition at line 58 of file collectionquotaattribute.cpp.

QByteArray CollectionQuotaAttribute::type (  )  const [virtual]

Returns the type of the attribute.

Implements Akonadi::Attribute.

Definition at line 73 of file collectionquotaattribute.cpp.


The documentation for this class was generated from the following files:
  • collectionquotaattribute.h
  • collectionquotaattribute.cpp

akonadi

Skip menu "akonadi"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.6.2-20100208
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal