Akonadi Mime

dispatcherinterface.h
1/*
2 SPDX-FileCopyrightText: 2009 Constantin Berzan <exit3219@gmail.com>
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
15namespace 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 <exit3219@gmail.com>
27 @since 4.4
28*/
29class AKONADI_MIME_EXPORT DispatcherInterface
30{
31public:
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.
DispatcherInterface()
Creates a new dispatcher interface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:28 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.