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

akonadi

Akonadi::CachePolicy

Akonadi::CachePolicy Class Reference

Represents the caching policy for a collection. More...

#include <cachepolicy.h>

List of all members.


Public Member Functions

 CachePolicy (const CachePolicy &other)
 CachePolicy ()
int cacheTimeout () const
bool inheritFromParent () const
int intervalCheckTime () const
QStringList localParts () const
CachePolicy & operator= (const CachePolicy &other)
bool operator== (const CachePolicy &other) const
void setCacheTimeout (int timeout)
void setInheritFromParent (bool inherit)
void setIntervalCheckTime (int time)
void setLocalParts (const QStringList &parts)
void setSyncOnDemand (bool enable)
bool syncOnDemand () const
 ~CachePolicy ()

Detailed Description

Represents the caching policy for a collection.

There is one cache policy per collection, it can either define to inherit all properties of the policy of the parent collection (the default) or specify the following values:

  • The item parts that should be permanently kept locally and are downloaded during a collection sync (eg. full mail vs. just the headers).
  • A time up to which non-permantly cached item parts have to be kept at least (0 - infinity).
  • Whether or not a collection sync is triggered on demand, ie. as soon as it is accessed by a client.
  • An optional time interval for regular collection sync (aka interval mail check).

 Akonadi::CachePolicy policy;
 policy.setCacheTimeout( 30 );
 policy.setIntervalCheckTime( 20 );

 Akonadi::Collection collection = ...
 collection.setCachePolicy( policy );

Todo:
Do we also need a size limit for the cache as well?
Todo:
on a POP3 account, is should not be possible to change locally cached parts, find a solution for that
Author:
Volker Krause <vkrause@kde.org>

Definition at line 62 of file cachepolicy.h.


Constructor & Destructor Documentation

CachePolicy::CachePolicy (  ) 

Creates an empty cache policy.

Definition at line 57 of file cachepolicy.cpp.

CachePolicy::CachePolicy ( const CachePolicy &  other  ) 

Creates a cache policy from an other cache policy.

Definition at line 62 of file cachepolicy.cpp.

CachePolicy::~CachePolicy (  ) 

Destroys the cache policy.

Definition at line 67 of file cachepolicy.cpp.


Member Function Documentation

int CachePolicy::cacheTimeout (  )  const

Returns the cache timeout for non-permanently cached parts in minutes, -1 means indefinitely.

Definition at line 108 of file cachepolicy.cpp.

bool CachePolicy::inheritFromParent (  )  const

Returns whether it inherits cache policy from parent collection.

Definition at line 88 of file cachepolicy.cpp.

int CachePolicy::intervalCheckTime (  )  const

Returns the interval check time in minutes, -1 for never.

Definition at line 118 of file cachepolicy.cpp.

QStringList CachePolicy::localParts (  )  const

Returns the parts to permanently cache locally.

Definition at line 98 of file cachepolicy.cpp.

void CachePolicy::setCacheTimeout ( int  timeout  ) 

Sets cache timeout for non-permanently cached parts.

Parameters:
timeout Timeout in minutes, -1 for indefinitely.

Definition at line 113 of file cachepolicy.cpp.

void CachePolicy::setInheritFromParent ( bool  inherit  ) 

Sets whether the cache policy should be inherited from the parent collection.

Definition at line 93 of file cachepolicy.cpp.

void CachePolicy::setIntervalCheckTime ( int  time  ) 

Sets interval check time.

Parameters:
time Check time interval in minutes, -1 for never.

Definition at line 123 of file cachepolicy.cpp.

void CachePolicy::setLocalParts ( const QStringList &  parts  ) 

Specifies the parts to permanently cache locally.

Definition at line 103 of file cachepolicy.cpp.

void CachePolicy::setSyncOnDemand ( bool  enable  ) 

Sets whether the collection shall be synced automatically when necessary.

Parameters:
enable If true the collection is synced.

Definition at line 133 of file cachepolicy.cpp.

bool CachePolicy::syncOnDemand (  )  const

Returns whether the collection shall be synced automatically when necessary.

Definition at line 128 of file cachepolicy.cpp.


The documentation for this class was generated from the following files:
  • cachepolicy.h
  • cachepolicy.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
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.7.1
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