tdeioslave/imap4

#include <imapcommand.h>

Public Member Functions

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

Static Public Member Functions

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

Protected Attributes

TQString aCommand
 
TQString mId
 
bool mComplete
 
TQString aParameter
 
TQString mResult
 
TQString mResultInfo
 

Detailed Description

encapulate a IMAP command

Author
Svenn Carstens
Date
2000
Todo:
fix the documentation

Definition at line 37 of file imapcommand.h.

Constructor & Destructor Documentation

◆ imapCommand() [1/2]

imapCommand::imapCommand ( )

Constructor.

Definition at line 58 of file imapcommand.cpp.

◆ imapCommand() [2/2]

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

Constructor.

Parameters
commandImap command
parameterParameters to the command
Returns
none

Definition at line 64 of file imapcommand.cpp.

Member Function Documentation

◆ clienStatus()

imapCommand * imapCommand::clienStatus ( const TQString &  path,
const TQString &  parameters 
)
static

Create a STATUS command.

Parameters
path
parameters
Returns
a STATUS imapCommand

Definition at line 239 of file imapcommand.cpp.

◆ clientAppend()

imapCommand * imapCommand::clientAppend ( const TQString &  box,
const TQString &  flags,
ulong  size 
)
static

Create a APPEND command.

Parameters
box
flags
size
Returns
a APPEND imapCommand

Definition at line 229 of file imapcommand.cpp.

◆ clientClose()

static imapCommand * imapCommand::clientClose ( )
static

Create a CLOSE command.

Returns
a CLOSE imapCommand

Definition at line 215 of file imapcommand.cpp.

◆ clientCopy()

imapCommand * imapCommand::clientCopy ( const TQString &  box,
const TQString &  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 221 of file imapcommand.cpp.

◆ clientCreate()

imapCommand * imapCommand::clientCreate ( const TQString &  path)
static

Create a CREATE command.

Parameters
path
Returns
a CREATE imapCommand

Definition at line 247 of file imapcommand.cpp.

◆ clientCustom()

imapCommand * imapCommand::clientCustom ( const TQString &  command,
const TQString &  arguments 
)
static

Create a custom command.

Parameters
commandThe custom command
argumentsThe custom arguments
Returns
a custom imapCommand

Definition at line 404 of file imapcommand.cpp.

◆ clientDelete()

imapCommand * imapCommand::clientDelete ( const TQString &  path)
static

Create a DELETE command.

Parameters
path
Returns
a DELETE imapCommand

Definition at line 254 of file imapcommand.cpp.

◆ clientDeleteACL()

imapCommand * imapCommand::clientDeleteACL ( const TQString &  box,
const TQString &  user 
)
static

Create a DELETEACL command.

Parameters
boxmailbox name
userauthentication identifier
Returns
a DELETEACL imapCommand

Definition at line 323 of file imapcommand.cpp.

◆ clientExpunge()

imapCommand * imapCommand::clientExpunge ( )
static

Create a EXPUNGE command.

Returns
a EXPUNGE imapCommand

Definition at line 275 of file imapcommand.cpp.

◆ clientFetch() [1/3]

static imapCommand * imapCommand::clientFetch ( const TQString &  sequence,
const TQString &  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 187 of file imapcommand.cpp.

◆ clientFetch() [2/3]

static imapCommand * imapCommand::clientFetch ( ulong  fromUid,
ulong  toUid,
const TQString &  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 170 of file imapcommand.cpp.

◆ clientFetch() [3/3]

static imapCommand * imapCommand::clientFetch ( ulong  uid,
const TQString &  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 164 of file imapcommand.cpp.

◆ clientGetACL()

imapCommand * imapCommand::clientGetACL ( const TQString &  box)
static

Create a GETACL command.

Parameters
boxmailbox name
Returns
a GETACL imapCommand

Definition at line 331 of file imapcommand.cpp.

◆ clientGetAnnotation()

imapCommand * imapCommand::clientGetAnnotation ( const TQString &  box,
const TQString &  entry,
const TQStringList &  attributeNames 
)
static

Create a GETANNOTATION command.

Parameters
boxmailbox name
entryentry specifier
attributeNamesattribute specifier
Returns
a GETANNOTATION imapCommand

Definition at line 372 of file imapcommand.cpp.

◆ clientGetQuotaroot()

imapCommand * imapCommand::clientGetQuotaroot ( const TQString &  box)
static

Create a GETQUOTAROOT command.

Parameters
boxmailbox name
Returns
a GETQUOTAROOT imapCommand

Definition at line 397 of file imapcommand.cpp.

◆ clientList()

static imapCommand * imapCommand::clientList ( const TQString &  reference,
const TQString &  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 195 of file imapcommand.cpp.

◆ clientListRights()

imapCommand * imapCommand::clientListRights ( const TQString &  box,
const TQString &  user 
)
static

Create a LISTRIGHTS command.

Parameters
boxmailbox name
userauthentication identifier
Returns
a LISTRIGHTS imapCommand

Definition at line 338 of file imapcommand.cpp.

◆ clientLogout()

imapCommand * imapCommand::clientLogout ( )
static

Create a LOGOUT command.

Returns
a LOGOUT imapCommand

Definition at line 303 of file imapcommand.cpp.

◆ clientMyRights()

imapCommand * imapCommand::clientMyRights ( const TQString &  box)
static

Create a MYRIGHTS command.

Parameters
boxmailbox name
Returns
a MYRIGHTS imapCommand

Definition at line 346 of file imapcommand.cpp.

◆ clientNamespace()

imapCommand * imapCommand::clientNamespace ( )
static

Create a NAMESPACE command.

Returns
a NAMESPACE imapCommand

Definition at line 391 of file imapcommand.cpp.

◆ clientNoop()

static imapCommand * imapCommand::clientNoop ( )
static

Create a NOOP command.

Returns
a NOOP imapCommand

Definition at line 158 of file imapcommand.cpp.

◆ clientRename()

imapCommand * imapCommand::clientRename ( const TQString &  src,
const TQString &  dest 
)
static

Create a RENAME command.

Parameters
srcSource
destDestination
Returns
a RENAME imapCommand

Definition at line 281 of file imapcommand.cpp.

◆ clientSearch()

imapCommand * imapCommand::clientSearch ( const TQString &  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 289 of file imapcommand.cpp.

◆ clientSelect()

static imapCommand * imapCommand::clientSelect ( const TQString &  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 204 of file imapcommand.cpp.

◆ clientSetACL()

imapCommand * imapCommand::clientSetACL ( const TQString &  box,
const TQString &  user,
const TQString &  acl 
)
static

Create a SETACL command.

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

Definition at line 315 of file imapcommand.cpp.

◆ clientSetAnnotation()

imapCommand * imapCommand::clientSetAnnotation ( const TQString &  box,
const TQString &  entry,
const TQMap< TQString, TQString > &  attributes 
)
static

Create a SETANNOTATION command.

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

Definition at line 353 of file imapcommand.cpp.

◆ clientStartTLS()

imapCommand * imapCommand::clientStartTLS ( )
static

Create a STARTTLS command.

Returns
a STARTTLS imapCommand

Definition at line 309 of file imapcommand.cpp.

◆ clientStore()

imapCommand * imapCommand::clientStore ( const TQString &  set,
const TQString &  item,
const TQString &  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 295 of file imapcommand.cpp.

◆ clientSubscribe()

imapCommand * imapCommand::clientSubscribe ( const TQString &  path)
static

Create a SUBSCRIBE command.

Parameters
path
Returns
a SUBSCRIBE imapCommand

Definition at line 261 of file imapcommand.cpp.

◆ clientUnsubscribe()

imapCommand * imapCommand::clientUnsubscribe ( const TQString &  path)
static

Create a UNSUBSCRIBE command.

Parameters
path
Returns
a UNSUBSCRIBE imapCommand

Definition at line 268 of file imapcommand.cpp.

◆ command()

const TQString & imapCommand::command ( )

get the command

Returns
the command

Definition at line 106 of file imapcommand.cpp.

◆ getStr()

const TQString 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.cpp.

◆ id()

const TQString & imapCommand::id ( )

get the id

Returns
the id

Definition at line 94 of file imapcommand.cpp.

◆ isComplete()

bool imapCommand::isComplete ( )

is it complete?

Returns
whether the command is completed

Definition at line 76 of file imapcommand.cpp.

◆ parameter()

const TQString & imapCommand::parameter ( )

get the parameter

Returns
the parameter

Definition at line 100 of file imapcommand.cpp.

◆ result()

const TQString & 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.cpp.

◆ resultInfo()

const TQString & 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.cpp.

◆ setCommand()

void imapCommand::setCommand ( const TQString &  command)

set the command

Parameters
commandthe imap command
Returns
none

Definition at line 137 of file imapcommand.cpp.

◆ setComplete()

void imapCommand::setComplete ( )

set the completed state

Returns
none

Definition at line 119 of file imapcommand.cpp.

◆ setId()

void imapCommand::setId ( const TQString &  id)

set the id

Parameters
idthe id used by the command
Returns
none

Definition at line 112 of file imapcommand.cpp.

◆ setParameter()

void imapCommand::setParameter ( const TQString &  parameter)

set the command parameter(s)

Parameters
parameterthe comand parameter(s)
Returns
none

Definition at line 143 of file imapcommand.cpp.

◆ setResult()

void imapCommand::setResult ( const TQString &  result)

set the completed state

Parameters
resultthe command result
Returns
none

Definition at line 125 of file imapcommand.cpp.

◆ setResultInfo()

void imapCommand::setResultInfo ( const TQString &  result)

set the completed state

Parameters
resultthe command result information
Returns
none

Definition at line 131 of file imapcommand.cpp.


The documentation for this class was generated from the following files: