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

kioslave/imap4

  • kioslave
  • imap4
imapcommand.h
1#ifndef _IMAPCOMMAND_H
2#define _IMAPCOMMAND_H
3/**********************************************************************
4 *
5 * imapcommand.h - IMAP4rev1 command handler
6 * Copyright (C) 2000 Sven Carstens <s.carstens@gmx.de>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 *
22 * Send comments and bug fixes to
23 *
24 *********************************************************************/
25
26#include <QStringList>
27#include <QString>
28#include <QMap>
29
30#include <boost/shared_ptr.hpp>
31
32class imapCommand;
33typedef boost::shared_ptr<imapCommand> CommandPtr;
34
42class imapCommand
43{
44public:
45
49 imapCommand ();
57 imapCommand (const QString & command, const QString & parameter);
63 bool isComplete ();
69 const QString & result ();
75 const QString & resultInfo ();
81 const QString & parameter ();
87 const QString & command ();
93 const QString & id ();
94
101 void setId (const QString &);
107 void setComplete ();
114 void setResult (const QString &);
121 void setResultInfo (const QString &);
128 void setCommand (const QString &);
135 void setParameter (const QString &);
144 const QString getStr ();
145
151 static CommandPtr clientNoop ();
161 static CommandPtr clientFetch (ulong uid, const QString & fields,
162 bool nouid = false);
173 static CommandPtr clientFetch (ulong fromUid, ulong toUid,
174 const QString & fields, bool nouid =
175 false);
186 static CommandPtr clientFetch (const QString & sequence,
187 const QString & fields, bool nouid =
188 false);
197 static CommandPtr clientList (const QString & reference,
198 const QString & path, bool lsub = false);
206 static CommandPtr clientSelect (const QString & path, bool examine =
207 false);
213 static CommandPtr clientClose();
220 static CommandPtr clientStatus (const QString & path,
221 const QString & parameters);
229 static CommandPtr clientCopy (const QString & box,
230 const QString & sequence, bool nouid =
231 false);
239 static CommandPtr clientAppend (const QString & box,
240 const QString & flags, ulong size);
246 static CommandPtr clientCreate (const QString & path);
252 static CommandPtr clientDelete (const QString & path);
258 static CommandPtr clientSubscribe (const QString & path);
264 static CommandPtr clientUnsubscribe (const QString & path);
269 static CommandPtr clientExpunge ();
276 static CommandPtr clientRename (const QString & src,
277 const QString & dest);
284 static CommandPtr clientSearch (const QString & search, bool nouid =
285 false);
294 static CommandPtr clientStore (const QString & set, const QString & item,
295 const QString & data, bool nouid = false);
300 static CommandPtr clientLogout ();
305 static CommandPtr clientStartTLS ();
306
308
315 static CommandPtr clientSetACL ( const QString& box, const QString& user, const QString& acl );
316
323 static CommandPtr clientDeleteACL ( const QString& box, const QString& user );
324
330 static CommandPtr clientGetACL ( const QString& box );
331
338 static CommandPtr clientListRights ( const QString& box, const QString& user );
339
345 static CommandPtr clientMyRights ( const QString& box );
346
348
355 static CommandPtr clientSetAnnotation ( const QString& box, const QString& entry, const QMap<QString, QString>& attributes );
356
364 static CommandPtr clientGetAnnotation ( const QString& box, const QString& entry, const QStringList& attributeNames );
365
370 static CommandPtr clientNamespace ();
371
377 static CommandPtr clientGetQuotaroot ( const QString& box );
378
385 static CommandPtr clientCustom ( const QString& command, const QString& arguments );
386
387protected:
388 QString aCommand;
389 QString mId;
390 bool mComplete;
391 QString aParameter;
392 QString mResult;
393 QString mResultInfo;
394
395private:
396 imapCommand & operator = (const imapCommand &);
397};
398
399#endif
imapCommand
encapulate a IMAP command
Definition: imapcommand.h:43
imapCommand::setId
void setId(const QString &)
set the id
Definition: imapcommand.cpp:114
imapCommand::clientGetAnnotation
static CommandPtr clientGetAnnotation(const QString &box, const QString &entry, const QStringList &attributeNames)
Create a GETANNOTATION command.
Definition: imapcommand.cpp:380
imapCommand::command
const QString & command()
get the command
Definition: imapcommand.cpp:108
imapCommand::setParameter
void setParameter(const QString &)
set the command parameter(s)
Definition: imapcommand.cpp:146
imapCommand::clientLogout
static CommandPtr clientLogout()
Create a LOGOUT command.
Definition: imapcommand.cpp:311
imapCommand::clientSearch
static CommandPtr clientSearch(const QString &search, bool nouid=false)
Create a SEARCH command.
Definition: imapcommand.cpp:297
imapCommand::clientSelect
static CommandPtr clientSelect(const QString &path, bool examine=false)
Create a SELECT command.
Definition: imapcommand.cpp:208
imapCommand::clientNoop
static CommandPtr clientNoop()
Create a NOOP command.
Definition: imapcommand.cpp:162
imapCommand::resultInfo
const QString & resultInfo()
get information about the result
Definition: imapcommand.cpp:90
imapCommand::clientAppend
static CommandPtr clientAppend(const QString &box, const QString &flags, ulong size)
Create a APPEND command.
Definition: imapcommand.cpp:233
imapCommand::clientMyRights
static CommandPtr clientMyRights(const QString &box)
Create a MYRIGHTS command.
Definition: imapcommand.cpp:354
imapCommand::clientSetAnnotation
static CommandPtr clientSetAnnotation(const QString &box, const QString &entry, const QMap< QString, QString > &attributes)
Create a SETANNOTATION command.
Definition: imapcommand.cpp:361
imapCommand::id
const QString & id()
get the id
Definition: imapcommand.cpp:96
imapCommand::setCommand
void setCommand(const QString &)
set the command
Definition: imapcommand.cpp:140
imapCommand::clientStore
static CommandPtr clientStore(const QString &set, const QString &item, const QString &data, bool nouid=false)
Create a STORE command.
Definition: imapcommand.cpp:303
imapCommand::clientSubscribe
static CommandPtr clientSubscribe(const QString &path)
Create a SUBSCRIBE command.
Definition: imapcommand.cpp:269
imapCommand::setComplete
void setComplete()
set the completed state
Definition: imapcommand.cpp:122
imapCommand::clientList
static CommandPtr clientList(const QString &reference, const QString &path, bool lsub=false)
Create a LIST command.
Definition: imapcommand.cpp:199
imapCommand::clientCustom
static CommandPtr clientCustom(const QString &command, const QString &arguments)
Create a custom command.
Definition: imapcommand.cpp:412
imapCommand::clientFetch
static CommandPtr clientFetch(ulong uid, const QString &fields, bool nouid=false)
Create a FETCH command.
Definition: imapcommand.cpp:168
imapCommand::result
const QString & result()
get the result of the command
Definition: imapcommand.cpp:84
imapCommand::isComplete
bool isComplete()
is it complete?
Definition: imapcommand.cpp:78
imapCommand::clientListRights
static CommandPtr clientListRights(const QString &box, const QString &user)
Create a LISTRIGHTS command.
Definition: imapcommand.cpp:346
imapCommand::clientNamespace
static CommandPtr clientNamespace()
Create a NAMESPACE command.
Definition: imapcommand.cpp:399
imapCommand::clientStartTLS
static CommandPtr clientStartTLS()
Create a STARTTLS command.
Definition: imapcommand.cpp:317
imapCommand::clientDeleteACL
static CommandPtr clientDeleteACL(const QString &box, const QString &user)
Create a DELETEACL command.
Definition: imapcommand.cpp:331
imapCommand::clientGetQuotaroot
static CommandPtr clientGetQuotaroot(const QString &box)
Create a GETQUOTAROOT command.
Definition: imapcommand.cpp:405
imapCommand::clientUnsubscribe
static CommandPtr clientUnsubscribe(const QString &path)
Create a UNSUBSCRIBE command.
Definition: imapcommand.cpp:276
imapCommand::setResult
void setResult(const QString &)
set the completed state
Definition: imapcommand.cpp:128
imapCommand::clientStatus
static CommandPtr clientStatus(const QString &path, const QString &parameters)
Create a STATUS command.
Definition: imapcommand.cpp:247
imapCommand::clientCreate
static CommandPtr clientCreate(const QString &path)
Create a CREATE command.
Definition: imapcommand.cpp:255
imapCommand::parameter
const QString & parameter()
get the parameter
Definition: imapcommand.cpp:102
imapCommand::clientClose
static CommandPtr clientClose()
Create a CLOSE command.
Definition: imapcommand.cpp:219
imapCommand::clientGetACL
static CommandPtr clientGetACL(const QString &box)
Create a GETACL command.
Definition: imapcommand.cpp:339
imapCommand::clientRename
static CommandPtr clientRename(const QString &src, const QString &dest)
Create a RENAME command.
Definition: imapcommand.cpp:289
imapCommand::clientExpunge
static CommandPtr clientExpunge()
Create a EXPUNGE command.
Definition: imapcommand.cpp:283
imapCommand::clientCopy
static CommandPtr clientCopy(const QString &box, const QString &sequence, bool nouid=false)
Create a COPY command.
Definition: imapcommand.cpp:225
imapCommand::clientDelete
static CommandPtr clientDelete(const QString &path)
Create a DELETE command.
Definition: imapcommand.cpp:262
imapCommand::clientSetACL
static CommandPtr clientSetACL(const QString &box, const QString &user, const QString &acl)
Create a SETACL command.
Definition: imapcommand.cpp:323
imapCommand::imapCommand
imapCommand()
Constructor.
Definition: imapcommand.cpp:60
imapCommand::setResultInfo
void setResultInfo(const QString &)
set the completed state
Definition: imapcommand.cpp:134
imapCommand::getStr
const QString getStr()
returns the data to send to the server The function returns the complete data to be sent to the serve...
Definition: imapcommand.cpp:152
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kioslave/imap4

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

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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