Akonadi Mime

transportattribute.cpp
1 /*
2  SPDX-FileCopyrightText: 2009 Constantin Berzan <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "transportattribute.h"
8 
9 using namespace Akonadi;
10 
11 class Akonadi::TransportAttributePrivate
12 {
13 public:
14  int mId = -1;
15 };
16 
18  : d(new TransportAttributePrivate)
19 {
20  d->mId = id;
21 }
22 
24 
25 TransportAttribute *TransportAttribute::clone() const
26 {
27  return new TransportAttribute(d->mId);
28 }
29 
30 QByteArray TransportAttribute::type() const
31 {
32  static const QByteArray sType("TransportAttribute");
33  return sType;
34 }
35 
36 QByteArray TransportAttribute::serialized() const
37 {
38  return QByteArray::number(d->mId);
39 }
40 
41 void 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 }
void setTransportId(int id)
Sets the transport id to use for sending this message.
QByteArray number(int n, int base)
Attribute determining which transport to use for sending a message.
int transportId() const
Returns the transport id to use for sending this message.
TransportAttribute(int id=-1)
Creates a new TransportAttribute.
int toInt(bool *ok, int base) const const
~TransportAttribute() override
Destroys this TransportAttribute.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Nov 29 2023 03:53:46 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.