Akonadi Mime

transportattribute.cpp
1/*
2 SPDX-FileCopyrightText: 2009 Constantin Berzan <exit3219@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "transportattribute.h"
8
9using namespace Akonadi;
10
11class Akonadi::TransportAttributePrivate
12{
13public:
14 int mId = -1;
15};
16
18 : d(new TransportAttributePrivate)
19{
20 d->mId = id;
21}
22
24
25TransportAttribute *TransportAttribute::clone() const
26{
27 return new TransportAttribute(d->mId);
28}
29
30QByteArray TransportAttribute::type() const
31{
32 static const QByteArray sType("TransportAttribute");
33 return sType;
34}
35
36QByteArray TransportAttribute::serialized() const
37{
38 return QByteArray::number(d->mId);
39}
40
41void TransportAttribute::deserialize(const QByteArray &data)
42{
43 d->mId = data.toInt();
44}
45
47{
48 return d->mId;
49}
50
52{
53 d->mId = id;
54}
Attribute determining which transport to use for sending a message.
TransportAttribute(int id=-1)
Creates a new TransportAttribute.
~TransportAttribute() override
Destroys this TransportAttribute.
void setTransportId(int id)
Sets the transport id to use for sending this message.
int transportId() const
Returns the transport id to use for sending this message.
QByteArray number(double n, char format, int precision)
int toInt(bool *ok, int base) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:32:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.