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

akonadi

Akonadi::ProtocolHelper

Akonadi::ProtocolHelper Class Reference

#include <protocolhelper.h>

List of all members.


Public Types

enum  PartNamespace { PartGlobal, PartPayload, PartAttribute }

Static Public Member Functions

static QByteArray attributesToByteArray (const Entity &entity, bool ns=false)
static QByteArray cachePolicyToByteArray (const CachePolicy &policy)
static QByteArray decodePartIdentifier (const QByteArray &data, PartNamespace &ns)
static QByteArray encodePartIdentifier (PartNamespace ns, const QByteArray &label, int version=0)
static int parseCachePolicy (const QByteArray &data, CachePolicy &policy, int start=0)
static int parseCollection (const QByteArray &data, Collection &collection, int start=0)

Detailed Description

For internal use only.

Helper methods for converting between libakonadi objects and their protocol representation.

Todo:
Add unit tests for this.
Todo:
Use exceptions for a useful error handling

Definition at line 36 of file protocolhelper.h.


Member Enumeration Documentation

enum Akonadi::ProtocolHelper::PartNamespace

Part namespaces.

Definition at line 40 of file protocolhelper.h.


Member Function Documentation

QByteArray ProtocolHelper::attributesToByteArray ( const Entity &  entity,
bool  ns = false 
) [static]

Convert attributes to their protocol representation.

Definition at line 134 of file protocolhelper.cpp.

QByteArray ProtocolHelper::cachePolicyToByteArray ( const CachePolicy &  policy  )  [static]

Convert a cache policy object into its protocol representation.

Definition at line 59 of file protocolhelper.cpp.

QByteArray ProtocolHelper::decodePartIdentifier ( const QByteArray &  data,
PartNamespace &  ns 
) [static]

Decode part label and namespace.

Definition at line 160 of file protocolhelper.cpp.

QByteArray ProtocolHelper::encodePartIdentifier ( PartNamespace  ns,
const QByteArray &  label,
int  version = 0 
) [static]

Encodes part label and namespace.

Definition at line 144 of file protocolhelper.cpp.

int ProtocolHelper::parseCachePolicy ( const QByteArray &  data,
CachePolicy &  policy,
int  start = 0 
) [static]

Parse a cache policy definition.

Parameters:
data The input data.
policy The parsed cache policy.
start Start of the data, ie. postion after the label.
Returns:
Position in data after the cache policy description.

Definition at line 31 of file protocolhelper.cpp.

int ProtocolHelper::parseCollection ( const QByteArray &  data,
Collection &  collection,
int  start = 0 
) [static]

Parse a collection description.

Parameters:
data The input data.
collection The parsed collection.
start Start of the data.
Returns:
Position in data after the collection description.

Definition at line 75 of file protocolhelper.cpp.


The documentation for this class was generated from the following files:
  • protocolhelper.h
  • protocolhelper.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
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.7
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