• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • Akonadi
  • CollectionFetchScope
Public Types | Public Member Functions | List of all members
Akonadi::CollectionFetchScope Class Reference

#include <collectionfetchscope.h>

Public Types

enum  AncestorRetrieval { None, Parent, All }
 

Public Member Functions

 CollectionFetchScope ()
 
 CollectionFetchScope (const CollectionFetchScope &other)
 
 ~CollectionFetchScope ()
 
AncestorRetrieval ancestorRetrieval () const
 
QStringList contentMimeTypes () const
 
bool includeStatistics () const
 
bool includeUnsubscribed () const
 
AKONADI_DEPRECATED bool includeUnubscribed () const
 
bool isEmpty () const
 
CollectionFetchScope & operator= (const CollectionFetchScope &other)
 
QString resource () const
 
void setAncestorRetrieval (AncestorRetrieval ancestorDepth)
 
void setContentMimeTypes (const QStringList &mimeTypes)
 
void setIncludeStatistics (bool include)
 
void setIncludeUnsubscribed (bool include)
 
void setResource (const QString &resource)
 

Detailed Description

Specifies which parts of a collection should be fetched from the Akonadi storage.

When collections are fetched from the server either by using CollectionFetchJob explicitly or when it is being used internally by other classes, e.g. Akonadi::Monitor, the scope of the fetch operation can be tailored to the application's current needs.

Note that CollectionFetchScope always includes fetching collection attributes.

There are two supported ways of changing the currently active CollectionFetchScope of classes:

  • in-place: modify the CollectionFetchScope object the other class holds as a member
  • replace: replace the other class' member with a new scope object

Example: modifying a CollectionFetchJob's scope in-place

Akonadi::CollectionFetchJob *job = new Akonadi::CollectionFetchJob( collection );
job->fetchScope().setIncludeUnsubscribed( true );

Example: replacing a CollectionFetchJob's scope

Akonadi::CollectionFetchScope scope;
scope.setIncludeUnsubscribed( true );
Akonadi::CollectionFetchJob *job = new Akonadi::CollectionFetchJob( collection );
job->setFetchScope( scope );

This class is implicitly shared.

Author
Volker Krause vkrau.nosp@m.se@k.nosp@m.de.or.nosp@m.g
Since
4.4

Definition at line 68 of file collectionfetchscope.h.

Member Enumeration Documentation

enum Akonadi::CollectionFetchScope::AncestorRetrieval

Describes the ancestor retrieval depth.

Enumerator
None 

No ancestor retrieval at all (the default)

Parent 

Only retrieve the immediate parent collection.

All 

Retrieve all ancestors, up to Collection::root()

Definition at line 74 of file collectionfetchscope.h.

Constructor & Destructor Documentation

Akonadi::CollectionFetchScope::CollectionFetchScope ( )

Creates an empty collection fetch scope.

Using an empty scope will only fetch the very basic meta data of collections, e.g. local id, remote id and content mimetypes.

Definition at line 56 of file collectionfetchscope.cpp.

Akonadi::CollectionFetchScope::CollectionFetchScope ( const CollectionFetchScope &  other)

Creates a new collection fetch scope from an other.

Definition at line 61 of file collectionfetchscope.cpp.

Akonadi::CollectionFetchScope::~CollectionFetchScope ( )

Destroys the collection fetch scope.

Definition at line 66 of file collectionfetchscope.cpp.

Member Function Documentation

CollectionFetchScope::AncestorRetrieval Akonadi::CollectionFetchScope::ancestorRetrieval ( ) const

Returns the ancestor retrieval depth.

See also
setAncestorRetrieval()

Definition at line 129 of file collectionfetchscope.cpp.

QStringList Akonadi::CollectionFetchScope::contentMimeTypes ( ) const

Returns the content mimetypes filter.

See also
setContentMimeTypes()

Definition at line 119 of file collectionfetchscope.cpp.

bool Akonadi::CollectionFetchScope::includeStatistics ( ) const

Returns whether collection statistics should be included in the retrieved results.

See also
setIncludeStatistics()

Definition at line 99 of file collectionfetchscope.cpp.

bool Akonadi::CollectionFetchScope::includeUnsubscribed ( ) const

Returns whether unsubscribed collection should be included.

See also
setIncludeUnsubscribed()
Since
4.5

Definition at line 89 of file collectionfetchscope.cpp.

bool Akonadi::CollectionFetchScope::includeUnubscribed ( ) const

Returns whether unsubscribed collection should be included.

Deprecated:
Use includeUnsubscribed()

Definition at line 84 of file collectionfetchscope.cpp.

bool Akonadi::CollectionFetchScope::isEmpty ( ) const

Returns true if there is nothing to fetch.

Definition at line 79 of file collectionfetchscope.cpp.

CollectionFetchScope & Akonadi::CollectionFetchScope::operator= ( const CollectionFetchScope &  other)

Assigns the other to this scope and returns a reference to this scope.

Definition at line 70 of file collectionfetchscope.cpp.

QString Akonadi::CollectionFetchScope::resource ( ) const

Returns the resource identifier that is used as filter.

See also
setResource()

Definition at line 109 of file collectionfetchscope.cpp.

void Akonadi::CollectionFetchScope::setAncestorRetrieval ( AncestorRetrieval  ancestorDepth)

Sets how many levels of ancestor collections should be included in the retrieval.

Only the ID and the remote ID of the ancestor collections are fetched. If you want more information about the ancestor collections, like their name, you will need to do an additional CollectionFetchJob for them.

Parameters
ancestorDepthThe desired ancestor retrieval depth.

Definition at line 134 of file collectionfetchscope.cpp.

void Akonadi::CollectionFetchScope::setContentMimeTypes ( const QStringList &  mimeTypes)

Sets a content mimetypes filter, that is only collections that contain at least one of the given mimetypes (or their parents) are retrieved.

Parameters
mimeTypesA list of mime types

Definition at line 124 of file collectionfetchscope.cpp.

void Akonadi::CollectionFetchScope::setIncludeStatistics ( bool  include)

Sets whether collection statistics should be included in the retrieved results.

Parameters
includetrue to include collction statistics, false otherwise (the default).

Definition at line 104 of file collectionfetchscope.cpp.

void Akonadi::CollectionFetchScope::setIncludeUnsubscribed ( bool  include)

Sets whether unsubscribed collections should be included in the collection listing.

Parameters
includetrue to include unsubscribed collections, false otherwise (the default).

Definition at line 94 of file collectionfetchscope.cpp.

void Akonadi::CollectionFetchScope::setResource ( const QString &  resource)

Sets a resource filter, that is only collections owned by the specified resource are retrieved.

Parameters
resourceThe resource identifier.

Definition at line 114 of file collectionfetchscope.cpp.


The documentation for this class was generated from the following files:
  • collectionfetchscope.h
  • collectionfetchscope.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

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

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal