kioslaves/imap4

imapCommand Class Reference

#include <imapcommand.h>

List of all members.


Detailed Description

encapulate a IMAP command

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

Definition at line 37 of file imapcommand.h.


Public Member Functions

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

Static Public Member Functions

static imapCommandclientNoop ()
static imapCommandclientFetch (ulong uid, const QString &fields, bool nouid=false)
static imapCommandclientFetch (ulong fromUid, ulong toUid, const QString &fields, bool nouid=false)
static imapCommandclientFetch (const QString &sequence, const QString &fields, bool nouid=false)
static imapCommandclientList (const QString &reference, const QString &path, bool lsub=false)
static imapCommandclientSelect (const QString &path, bool examine=false)
static imapCommandclientClose ()
static imapCommandclientStatus (const QString &path, const QString &parameters)
static imapCommandclientCopy (const QString &box, const QString &sequence, bool nouid=false)
static imapCommandclientAppend (const QString &box, const QString &flags, ulong size)
static imapCommandclientCreate (const QString &path)
static imapCommandclientDelete (const QString &path)
static imapCommandclientSubscribe (const QString &path)
static imapCommandclientUnsubscribe (const QString &path)
static imapCommandclientExpunge ()
static imapCommandclientRename (const QString &src, const QString &dest)
static imapCommandclientSearch (const QString &search, bool nouid=false)
static imapCommandclientStore (const QString &set, const QString &item, const QString &data, bool nouid=false)
static imapCommandclientLogout ()
static imapCommandclientStartTLS ()
static imapCommandclientSetACL (const QString &box, const QString &user, const QString &acl)
static imapCommandclientDeleteACL (const QString &box, const QString &user)
static imapCommandclientGetACL (const QString &box)
static imapCommandclientListRights (const QString &box, const QString &user)
static imapCommandclientMyRights (const QString &box)
static imapCommandclientSetAnnotation (const QString &box, const QString &entry, const QMap< QString, QString > &attributes)
static imapCommandclientGetAnnotation (const QString &box, const QString &entry, const QStringList &attributeNames)
static imapCommandclientNamespace ()
static imapCommandclientGetQuotaroot (const QString &box)

Protected Attributes

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

Constructor & Destructor Documentation

imapCommand::imapCommand (  ) 

Constructor.

Definition at line 58 of file imapcommand.cc.

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

Constructor.

Parameters:
command Imap command
parameter Parameters to the command
Returns:
none

Definition at line 64 of file imapcommand.cc.


Member Function Documentation

bool imapCommand::isComplete (  ) 

is it complete?

Returns:
whether the command is completed

Definition at line 76 of file imapcommand.cc.

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 82 of file imapcommand.cc.

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 88 of file imapcommand.cc.

const QString & imapCommand::parameter (  ) 

get the parameter

Returns:
the parameter

Definition at line 100 of file imapcommand.cc.

const QString & imapCommand::command (  ) 

get the command

Returns:
the command

Definition at line 106 of file imapcommand.cc.

const QString & imapCommand::id (  ) 

get the id

Returns:
the id

Definition at line 94 of file imapcommand.cc.

void imapCommand::setId ( const QString &  id  ) 

set the id

Parameters:
id the id used by the command
Returns:
none

Definition at line 112 of file imapcommand.cc.

void imapCommand::setComplete (  ) 

set the completed state

Returns:
none

Definition at line 119 of file imapcommand.cc.

void imapCommand::setResult ( const QString &  result  ) 

set the completed state

Parameters:
result the command result
Returns:
none

Definition at line 125 of file imapcommand.cc.

void imapCommand::setResultInfo ( const QString &  result  ) 

set the completed state

Parameters:
result the command result information
Returns:
none

Definition at line 131 of file imapcommand.cc.

void imapCommand::setCommand ( const QString &  command  ) 

set the command

Parameters:
command the imap command
Returns:
none

Definition at line 137 of file imapcommand.cc.

void imapCommand::setParameter ( const QString &  parameter  ) 

set the command parameter(s)

Parameters:
parameter the comand parameter(s)
Returns:
none

Definition at line 143 of file imapcommand.cc.

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 149 of file imapcommand.cc.

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

Create a NOOP command.

Returns:
a NOOP imapCommand

Definition at line 158 of file imapcommand.cc.

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

Create a FETCH command.

Parameters:
uid Uid of the message to fetch
fields options to pass to the server
nouid Perform a FETCH or UID FETCH command
Returns:
a FETCH imapCommand Fetch a single uid

Definition at line 164 of file imapcommand.cc.

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

Create a FETCH command.

Parameters:
fromUid start uid of the messages to fetch
toUid last uid of the messages to fetch
fields options to pass to the server
nouid Perform a FETCH or UID FETCH command
Returns:
a FETCH imapCommand Fetch a range of uids

Definition at line 170 of file imapcommand.cc.

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

Create a FETCH command.

Parameters:
sequence a IMAP FETCH sequence string
fields options to pass to the server
nouid Perform 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 187 of file imapcommand.cc.

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

Create a LIST command.

Parameters:
reference 
path The path to list
lsub Perform a LIST or a LSUB command
Returns:
a LIST imapCommand

Definition at line 195 of file imapcommand.cc.

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

Create a SELECT command.

Parameters:
path The path to select
lsub Perform 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 204 of file imapcommand.cc.

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

Create a CLOSE command.

Returns:
a CLOSE imapCommand

Definition at line 215 of file imapcommand.cc.

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

Create a STATUS command.

Parameters:
path 
parameters 
Returns:
a STATUS imapCommand

Definition at line 239 of file imapcommand.cc.

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

Create a COPY command.

Parameters:
box 
sequence 
nouid Perform a COPY or UID COPY command
Returns:
a COPY imapCommand

Definition at line 221 of file imapcommand.cc.

imapCommand * 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 229 of file imapcommand.cc.

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

Create a CREATE command.

Parameters:
path 
Returns:
a CREATE imapCommand

Definition at line 247 of file imapcommand.cc.

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

Create a DELETE command.

Parameters:
path 
Returns:
a DELETE imapCommand

Definition at line 254 of file imapcommand.cc.

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

Create a SUBSCRIBE command.

Parameters:
path 
Returns:
a SUBSCRIBE imapCommand

Definition at line 261 of file imapcommand.cc.

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

Create a UNSUBSCRIBE command.

Parameters:
path 
Returns:
a UNSUBSCRIBE imapCommand

Definition at line 268 of file imapcommand.cc.

imapCommand * imapCommand::clientExpunge (  )  [static]

Create a EXPUNGE command.

Returns:
a EXPUNGE imapCommand

Definition at line 275 of file imapcommand.cc.

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

Create a RENAME command.

Parameters:
src Source
dest Destination
Returns:
a RENAME imapCommand

Definition at line 281 of file imapcommand.cc.

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

Create a SEARCH command.

Parameters:
search 
nouid Perform a UID SEARCH or a SEARCH command
Returns:
a SEARCH imapCommand

Definition at line 289 of file imapcommand.cc.

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

Create a STORE command.

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

Definition at line 295 of file imapcommand.cc.

imapCommand * imapCommand::clientLogout (  )  [static]

Create a LOGOUT command.

Returns:
a LOGOUT imapCommand

Definition at line 303 of file imapcommand.cc.

imapCommand * imapCommand::clientStartTLS (  )  [static]

Create a STARTTLS command.

Returns:
a STARTTLS imapCommand

Definition at line 309 of file imapcommand.cc.

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

Create a SETACL command.

Parameters:
box mailbox name
user authentication identifier
acl access right modification (starting with optional +/-)
Returns:
a SETACL imapCommand

Definition at line 315 of file imapcommand.cc.

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

Create a DELETEACL command.

Parameters:
box mailbox name
user authentication identifier
Returns:
a DELETEACL imapCommand

Definition at line 323 of file imapcommand.cc.

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

Create a GETACL command.

Parameters:
box mailbox name
Returns:
a GETACL imapCommand

Definition at line 331 of file imapcommand.cc.

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

Create a LISTRIGHTS command.

Parameters:
box mailbox name
user authentication identifier
Returns:
a LISTRIGHTS imapCommand

Definition at line 338 of file imapcommand.cc.

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

Create a MYRIGHTS command.

Parameters:
box mailbox name
Returns:
a MYRIGHTS imapCommand

Definition at line 346 of file imapcommand.cc.

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

Create a SETANNOTATION command.

Parameters:
box mailbox name
entry entry specifier
attributes map of attribute names + values
Returns:
a SETANNOTATION imapCommand

Definition at line 353 of file imapcommand.cc.

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

Create a GETANNOTATION command.

Parameters:
box mailbox name
entry entry specifier
attributeNames attribute specifier
Returns:
a GETANNOTATION imapCommand

Definition at line 372 of file imapcommand.cc.

imapCommand * imapCommand::clientNamespace (  )  [static]

Create a NAMESPACE command.

Returns:
a NAMESPACE imapCommand

Definition at line 391 of file imapcommand.cc.

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

Create a GETQUOTAROOT command.

Parameters:
box mailbox name
Returns:
a GETQUOTAROOT imapCommand

Definition at line 397 of file imapcommand.cc.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys