• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

kioslave/imap4

Public Member Functions | Static Public Member Functions | Protected Attributes
imapCommand Class Reference

encapulate a IMAP command More...

#include <imapcommand.h>

List of all members.

Public Member Functions

 imapCommand ()
 imapCommand (const QString &command, const QString &parameter)
const QString & command ()
const QString getStr ()
const QString & id ()
bool isComplete ()
const QString & parameter ()
const QString & result ()
const QString & resultInfo ()
void setCommand (const QString &)
void setComplete ()
void setId (const QString &)
void setParameter (const QString &)
void setResult (const QString &)
void setResultInfo (const QString &)

Static Public Member Functions

static CommandPtr clientAppend (const QString &box, const QString &flags, ulong size)
static CommandPtr clientClose ()
static CommandPtr clientCopy (const QString &box, const QString &sequence, bool nouid=false)
static CommandPtr clientCreate (const QString &path)
static CommandPtr clientCustom (const QString &command, const QString &arguments)
static CommandPtr clientDelete (const QString &path)
static CommandPtr clientDeleteACL (const QString &box, const QString &user)
static CommandPtr clientExpunge ()
static CommandPtr clientFetch (const QString &sequence, const QString &fields, bool nouid=false)
static CommandPtr clientFetch (ulong fromUid, ulong toUid, const QString &fields, bool nouid=false)
static CommandPtr clientFetch (ulong uid, const QString &fields, bool nouid=false)
static CommandPtr clientGetACL (const QString &box)
static CommandPtr clientGetAnnotation (const QString &box, const QString &entry, const QStringList &attributeNames)
static CommandPtr clientGetQuotaroot (const QString &box)
static CommandPtr clientList (const QString &reference, const QString &path, bool lsub=false)
static CommandPtr clientListRights (const QString &box, const QString &user)
static CommandPtr clientLogout ()
static CommandPtr clientMyRights (const QString &box)
static CommandPtr clientNamespace ()
static CommandPtr clientNoop ()
static CommandPtr clientRename (const QString &src, const QString &dest)
static CommandPtr clientSearch (const QString &search, bool nouid=false)
static CommandPtr clientSelect (const QString &path, bool examine=false)
static CommandPtr clientSetACL (const QString &box, const QString &user, const QString &acl)
static CommandPtr clientSetAnnotation (const QString &box, const QString &entry, const QMap< QString, QString > &attributes)
static CommandPtr clientStartTLS ()
static CommandPtr clientStatus (const QString &path, const QString &parameters)
static CommandPtr clientStore (const QString &set, const QString &item, const QString &data, bool nouid=false)
static CommandPtr clientSubscribe (const QString &path)
static CommandPtr clientUnsubscribe (const QString &path)

Protected Attributes

QString aCommand
QString aParameter
bool mComplete
QString mId
QString mResult
QString mResultInfo

Detailed Description

encapulate a IMAP command

Author:
Svenn Carstens
Date:
2000
Todo:
fix the documentation

Definition at line 42 of file imapcommand.h.


Constructor & Destructor Documentation

imapCommand::imapCommand ( )

Constructor.

Definition at line 60 of file imapcommand.cpp.

imapCommand::imapCommand ( const QString &  command,
const QString &  parameter 
)

Constructor.

Parameters:
commandImap command
parameterParameters to the command
Returns:
none

Definition at line 66 of file imapcommand.cpp.


Member Function Documentation

CommandPtr imapCommand::clientAppend ( const QString &  box,
const QString &  flags,
ulong  size 
) [static]

Create a APPEND command.

Parameters:
box
flags
size
Returns:
a APPEND imapCommand

Definition at line 231 of file imapcommand.cpp.

static imapCommand * imapCommand::clientClose ( ) [static]

Create a CLOSE command.

Returns:
a CLOSE imapCommand

Definition at line 217 of file imapcommand.cpp.

CommandPtr imapCommand::clientCopy ( const QString &  box,
const QString &  sequence,
bool  nouid = false 
) [static]

Create a COPY command.

Parameters:
box
sequence
nouidPerform a COPY or UID COPY command
Returns:
a COPY imapCommand

Definition at line 223 of file imapcommand.cpp.

CommandPtr imapCommand::clientCreate ( const QString &  path) [static]

Create a CREATE command.

Parameters:
path
Returns:
a CREATE imapCommand

Definition at line 249 of file imapcommand.cpp.

CommandPtr imapCommand::clientCustom ( const QString &  command,
const QString &  arguments 
) [static]

Create a custom command.

Parameters:
commandThe custom command
argumentsThe custom arguments
Returns:
a custom imapCommand

Definition at line 406 of file imapcommand.cpp.

CommandPtr imapCommand::clientDelete ( const QString &  path) [static]

Create a DELETE command.

Parameters:
path
Returns:
a DELETE imapCommand

Definition at line 256 of file imapcommand.cpp.

CommandPtr imapCommand::clientDeleteACL ( const QString &  box,
const QString &  user 
) [static]

Create a DELETEACL command.

Parameters:
boxmailbox name
userauthentication identifier
Returns:
a DELETEACL imapCommand

Definition at line 325 of file imapcommand.cpp.

CommandPtr imapCommand::clientExpunge ( ) [static]

Create a EXPUNGE command.

Returns:
a EXPUNGE imapCommand

Definition at line 277 of file imapcommand.cpp.

static imapCommand * imapCommand::clientFetch ( const QString &  sequence,
const QString &  fields,
bool  nouid = false 
) [static]

Create a FETCH command.

Parameters:
sequencea IMAP FETCH sequence string
fieldsoptions to pass to the server
nouidPerform a FETCH or UID FETCH command
Returns:
a FETCH imapCommand Fetch a range of uids. The other clientFetch functions are just wrappers around this function.

Definition at line 189 of file imapcommand.cpp.

static imapCommand * imapCommand::clientFetch ( ulong  uid,
const QString &  fields,
bool  nouid = false 
) [static]

Create a FETCH command.

Parameters:
uidUid of the message to fetch
fieldsoptions to pass to the server
nouidPerform a FETCH or UID FETCH command
Returns:
a FETCH imapCommand Fetch a single uid

Definition at line 166 of file imapcommand.cpp.

static imapCommand * imapCommand::clientFetch ( ulong  fromUid,
ulong  toUid,
const QString &  fields,
bool  nouid = false 
) [static]

Create a FETCH command.

Parameters:
fromUidstart uid of the messages to fetch
toUidlast uid of the messages to fetch
fieldsoptions to pass to the server
nouidPerform a FETCH or UID FETCH command
Returns:
a FETCH imapCommand Fetch a range of uids

Definition at line 172 of file imapcommand.cpp.

CommandPtr imapCommand::clientGetACL ( const QString &  box) [static]

Create a GETACL command.

Parameters:
boxmailbox name
Returns:
a GETACL imapCommand

Definition at line 333 of file imapcommand.cpp.

CommandPtr imapCommand::clientGetAnnotation ( const QString &  box,
const QString &  entry,
const QStringList &  attributeNames 
) [static]

Create a GETANNOTATION command.

Parameters:
boxmailbox name
entryentry specifier
attributeNamesattribute specifier
Returns:
a GETANNOTATION imapCommand

Definition at line 374 of file imapcommand.cpp.

CommandPtr imapCommand::clientGetQuotaroot ( const QString &  box) [static]

Create a GETQUOTAROOT command.

Parameters:
boxmailbox name
Returns:
a GETQUOTAROOT imapCommand

Definition at line 399 of file imapcommand.cpp.

static imapCommand * imapCommand::clientList ( const QString &  reference,
const QString &  path,
bool  lsub = false 
) [static]

Create a LIST command.

Parameters:
reference
pathThe path to list
lsubPerform a LIST or a LSUB command
Returns:
a LIST imapCommand

Definition at line 197 of file imapcommand.cpp.

CommandPtr imapCommand::clientListRights ( const QString &  box,
const QString &  user 
) [static]

Create a LISTRIGHTS command.

Parameters:
boxmailbox name
userauthentication identifier
Returns:
a LISTRIGHTS imapCommand

Definition at line 340 of file imapcommand.cpp.

CommandPtr imapCommand::clientLogout ( ) [static]

Create a LOGOUT command.

Returns:
a LOGOUT imapCommand

Definition at line 305 of file imapcommand.cpp.

CommandPtr imapCommand::clientMyRights ( const QString &  box) [static]

Create a MYRIGHTS command.

Parameters:
boxmailbox name
Returns:
a MYRIGHTS imapCommand

Definition at line 348 of file imapcommand.cpp.

CommandPtr imapCommand::clientNamespace ( ) [static]

Create a NAMESPACE command.

Returns:
a NAMESPACE imapCommand

Definition at line 393 of file imapcommand.cpp.

static imapCommand * imapCommand::clientNoop ( ) [static]

Create a NOOP command.

Returns:
a NOOP imapCommand

Definition at line 160 of file imapcommand.cpp.

CommandPtr imapCommand::clientRename ( const QString &  src,
const QString &  dest 
) [static]

Create a RENAME command.

Parameters:
srcSource
destDestination
Returns:
a RENAME imapCommand

Definition at line 283 of file imapcommand.cpp.

CommandPtr imapCommand::clientSearch ( const QString &  search,
bool  nouid = false 
) [static]

Create a SEARCH command.

Parameters:
search
nouidPerform a UID SEARCH or a SEARCH command
Returns:
a SEARCH imapCommand

Definition at line 291 of file imapcommand.cpp.

static imapCommand * imapCommand::clientSelect ( const QString &  path,
bool  examine = false 
) [static]

Create a SELECT command.

Parameters:
pathThe path to select
lsubPerform a SELECT or a EXAMINE command
Returns:
a SELECT imapCommand

Note:
We use always SELECT, because UW-IMAP doesn't check for new mail, when used with the "mbox driver" and the folder is opened with EXAMINE and Courier can't append to a mailbox that is in EXAMINE state

Definition at line 206 of file imapcommand.cpp.

CommandPtr imapCommand::clientSetACL ( const QString &  box,
const QString &  user,
const QString &  acl 
) [static]

Create a SETACL command.

Parameters:
boxmailbox name
userauthentication identifier
aclaccess right modification (starting with optional +/-)
Returns:
a SETACL imapCommand

Definition at line 317 of file imapcommand.cpp.

CommandPtr imapCommand::clientSetAnnotation ( const QString &  box,
const QString &  entry,
const QMap< QString, QString > &  attributes 
) [static]

Create a SETANNOTATION command.

Parameters:
boxmailbox name
entryentry specifier
attributesmap of attribute names + values
Returns:
a SETANNOTATION imapCommand

Definition at line 355 of file imapcommand.cpp.

CommandPtr imapCommand::clientStartTLS ( ) [static]

Create a STARTTLS command.

Returns:
a STARTTLS imapCommand

Definition at line 311 of file imapcommand.cpp.

CommandPtr imapCommand::clientStatus ( const QString &  path,
const QString &  parameters 
) [static]

Create a STATUS command.

Parameters:
path
parameters
Returns:
a STATUS imapCommand

Definition at line 241 of file imapcommand.cpp.

CommandPtr imapCommand::clientStore ( const QString &  set,
const QString &  item,
const QString &  data,
bool  nouid = false 
) [static]

Create a STORE command.

Parameters:
set
item
data
nouidPerform a UID STORE or a STORE command
Returns:
a STORE imapCommand

Definition at line 297 of file imapcommand.cpp.

CommandPtr imapCommand::clientSubscribe ( const QString &  path) [static]

Create a SUBSCRIBE command.

Parameters:
path
Returns:
a SUBSCRIBE imapCommand

Definition at line 263 of file imapcommand.cpp.

CommandPtr imapCommand::clientUnsubscribe ( const QString &  path) [static]

Create a UNSUBSCRIBE command.

Parameters:
path
Returns:
a UNSUBSCRIBE imapCommand

Definition at line 270 of file imapcommand.cpp.

const QString & imapCommand::command ( )

get the command

Returns:
the command

Definition at line 108 of file imapcommand.cpp.

const QString imapCommand::getStr ( )

returns the data to send to the server The function returns the complete data to be sent to the server (<id> <command> [<parameter>])

Returns:
the data to send to the server
Todo:
possibly rename function to be clear of it's purpose

Definition at line 151 of file imapcommand.cpp.

const QString & imapCommand::id ( )

get the id

Returns:
the id

Definition at line 96 of file imapcommand.cpp.

bool imapCommand::isComplete ( )

is it complete?

Returns:
whether the command is completed

Definition at line 78 of file imapcommand.cpp.

const QString & imapCommand::parameter ( )

get the parameter

Returns:
the parameter

Definition at line 102 of file imapcommand.cpp.

const QString & imapCommand::result ( )

get the result of the command

Returns:
The result, i.e. first word of the result line, like OK

Definition at line 84 of file imapcommand.cpp.

const QString & imapCommand::resultInfo ( )

get information about the result

Returns:
Information about the result, i.e. the rest of the result line

Definition at line 90 of file imapcommand.cpp.

void imapCommand::setCommand ( const QString &  command)

set the command

Parameters:
commandthe imap command
Returns:
none

Definition at line 139 of file imapcommand.cpp.

void imapCommand::setComplete ( )

set the completed state

Returns:
none

Definition at line 121 of file imapcommand.cpp.

void imapCommand::setId ( const QString &  id)

set the id

Parameters:
idthe id used by the command
Returns:
none

Definition at line 114 of file imapcommand.cpp.

void imapCommand::setParameter ( const QString &  parameter)

set the command parameter(s)

Parameters:
parameterthe comand parameter(s)
Returns:
none

Definition at line 145 of file imapcommand.cpp.

void imapCommand::setResult ( const QString &  result)

set the completed state

Parameters:
resultthe command result
Returns:
none

Definition at line 127 of file imapcommand.cpp.

void imapCommand::setResultInfo ( const QString &  result)

set the completed state

Parameters:
resultthe command result information
Returns:
none

Definition at line 133 of file imapcommand.cpp.


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

kioslave/imap4

Skip menu "kioslave/imap4"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.4
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