Akonadi Mime

dispatcherinterface.h
1 /*
2  SPDX-FileCopyrightText: 2009 Constantin Berzan <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "akonadi-mime_export.h"
10 
11 #include <Akonadi/AgentInstance>
12 
13 // krazy:excludeall=dpointer
14 
15 namespace Akonadi
16 {
17 /**
18  @short An interface for applications to interact with the dispatcher agent.
19 
20  This class provides methods such as send queued messages (@see
21  dispatchManually) and retry sending (@see retryDispatching).
22 
23  This class also takes care of registering the attributes that the mail
24  dispatcher agent and MailTransport use.
25 
26  @author Constantin Berzan <[email protected]>
27  @since 4.4
28 */
29 class AKONADI_MIME_EXPORT DispatcherInterface
30 {
31 public:
32  /**
33  Creates a new dispatcher interface.
34  */
36 
37  /**
38  Returns the current instance of the mail dispatcher agent. May return an invalid
39  AgentInstance in case it cannot find the mail dispatcher agent.
40  */
41  [[nodiscard]] Akonadi::AgentInstance dispatcherInstance() const;
42 
43  /**
44  Looks for messages in the outbox with DispatchMode::Manual and marks them
45  DispatchMode::Automatic for sending.
46  */
47  void dispatchManually();
48 
49  /**
50  Looks for messages in the outbox with ErrorAttribute, and clears them and
51  queues them again for sending.
52  */
53  void retryDispatching();
54 
55  /**
56  Looks for messages in the outbox with DispatchMode::Manual and changes the
57  Transport for them to the one with id @p transportId.
58 
59  @param transportId the transport to dispatch "manual dispatch" messages with
60  @since 4.5
61  */
62  void dispatchManualTransport(int transportId);
63 };
64 } // namespace MailTransport
An interface for applications to interact with the dispatcher agent.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Dec 5 2023 04:11:20 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.