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

mailtransport

  • mailtransport
transportmanager.h
1/*
2 Copyright (c) 2006 - 2007 Volker Krause <vkrause@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef MAILTRANSPORT_TRANSPORTMANAGER_H
21#define MAILTRANSPORT_TRANSPORTMANAGER_H
22
23#include <mailtransport/mailtransport_export.h>
24#include <mailtransport/transporttype.h>
25
26#include <QtCore/QList>
27#include <QtCore/QObject>
28
29#include <akonadi/agenttype.h>
30
31class KJob;
32
33namespace KWallet {
34 class Wallet;
35}
36
37namespace MailTransport {
38
39class Transport;
40class TransportJob;
41class TransportManagerPrivate;
42
54class MAILTRANSPORT_EXPORT TransportManager : public QObject
55{
56 Q_OBJECT
57 Q_CLASSINFO( "D-Bus Interface", "org.kde.pim.TransportManager" )
58
59 friend class Transport;
60 friend class TransportManagerPrivate;
61
62 public:
63
67 virtual ~TransportManager();
68
72 static TransportManager *self();
73
79 void loadPasswordsAsync();
80
90 Transport *transportById( int id, bool def = true ) const;
91
100 Transport *transportByName( const QString &name, bool def = true ) const;
101
107 QList<Transport *>transports() const;
108
112 TransportType::List types() const;
113
119 Transport *createTransport() const;
120
126 void addTransport( Transport *transport );
127
136 MAILTRANSPORT_DEPRECATED TransportJob *createTransportJob( int transportId );
137
147 MAILTRANSPORT_DEPRECATED TransportJob *createTransportJob( const QString &transport );
148
158 MAILTRANSPORT_DEPRECATED void schedule( TransportJob *job );
159
164 void createDefaultTransport();
165
167 enum ShowCondition {
168 Always,
169 IfNoTransportExists
172 };
173
181 bool showTransportCreationDialog( QWidget *parent, ShowCondition showCondition = Always );
182
191 bool configureTransport( Transport *transport, QWidget *parent );
192
193 public Q_SLOTS:
197 Q_SCRIPTABLE bool isEmpty() const;
198
202 Q_SCRIPTABLE QList<int> transportIds() const;
203
207 Q_SCRIPTABLE QStringList transportNames() const;
208
212 Q_SCRIPTABLE QString defaultTransportName() const;
213
218 Q_SCRIPTABLE int defaultTransportId() const;
219
224 Q_SCRIPTABLE void setDefaultTransport( int id );
225
230 Q_SCRIPTABLE void removeTransport( int id );
231
232 Q_SIGNALS:
237 Q_SCRIPTABLE void transportsChanged();
238
244 Q_SCRIPTABLE void changesCommitted();
245
251 void passwordsChanged();
252
258 void transportRemoved( int id, const QString &name );
259
266 void transportRenamed( int id, const QString &oldName, const QString &newName );
267
268 protected:
273 KWallet::Wallet *wallet();
274
278 void loadPasswords();
279
283 TransportManager();
284
285 private:
286
287 // These are used by our friend, Transport
288 void emitChangesCommitted();
289
290 private:
291 TransportManagerPrivate *const d;
292
293 Q_PRIVATE_SLOT( d, void slotTransportsChanged() )
294 Q_PRIVATE_SLOT( d, void slotWalletOpened( bool success ) )
295 Q_PRIVATE_SLOT( d, void dbusServiceUnregistered() )
296 Q_PRIVATE_SLOT( d, void agentTypeAdded( const Akonadi::AgentType &atype ) )
297 Q_PRIVATE_SLOT( d, void agentTypeRemoved( const Akonadi::AgentType &atype ) )
298 Q_PRIVATE_SLOT( d, void jobResult( KJob *job ) )
299};
300
301} // namespace MailTransport
302
303#endif // MAILTRANSPORT_TRANSPORTMANAGER_H
MailTransport::TransportJob
Abstract base class for all mail transport jobs.
Definition transportjob.h:42
MailTransport::TransportManager
Central transport management interface.
Definition transportmanager.h:55
MailTransport::TransportManager::transportRemoved
void transportRemoved(int id, const QString &name)
Emitted when a transport is deleted.
MailTransport::TransportManager::changesCommitted
Q_SCRIPTABLE void changesCommitted()
Internal signal to synchronize all TransportManager instances.
MailTransport::TransportManager::passwordsChanged
void passwordsChanged()
Emitted when passwords have been loaded from the wallet.
MailTransport::TransportManager::transportsChanged
Q_SCRIPTABLE void transportsChanged()
Emitted when transport settings have changed (by this or any other TransportManager instance).
MailTransport::TransportManager::ShowCondition
ShowCondition
Describes when to show the transport creation dialog.
Definition transportmanager.h:167
MailTransport::TransportManager::Always
@ Always
Show the transport creation dialog unconditionally.
Definition transportmanager.h:168
MailTransport::TransportManager::transportRenamed
void transportRenamed(int id, const QString &oldName, const QString &newName)
Emitted when a transport has been renamed.
MailTransport::TransportType::List
QList< TransportType > List
Describes a list of transport types.
Definition transporttype.h:62
MailTransport::Transport
Represents the settings of a specific mail transport.
Definition transport.h:51
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

mailtransport

Skip menu "mailtransport"
  • 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