akonadi
19 #include "socialnetworkattributes.h"
21 #include "akonadi/config-akonadi.h"
25 #include <qjson/serializer.h>
26 #include <qjson/parser.h>
28 class Akonadi::SocialNetworkAttributesPrivate
34 Akonadi::SocialNetworkAttributes::SocialNetworkAttributes()
35 : d( new SocialNetworkAttributesPrivate() )
39 Akonadi::SocialNetworkAttributes::SocialNetworkAttributes(
const QString &userName,
43 : d( new SocialNetworkAttributesPrivate() )
48 d->attributes[
QLatin1String(
"maxPostLength" )] = maxPostLength;
51 Akonadi::SocialNetworkAttributes::~SocialNetworkAttributes()
56 void Akonadi::SocialNetworkAttributes::deserialize(
const QByteArray &data )
59 d->attributes = parser.parse(data).toMap();
62 QByteArray Akonadi::SocialNetworkAttributes::serialized()
const
64 QJson::Serializer serializer;
65 #if !defined( USE_QJSON_0_8 )
66 return serializer.serialize( d->attributes );
68 return serializer.serialize( d->attributes, 0 );
75 new SocialNetworkAttributes(
82 QByteArray Akonadi::SocialNetworkAttributes::type()
const
84 static const QByteArray sType(
"socialattributes" );
88 QString Akonadi::SocialNetworkAttributes::userName()
const
93 QString Akonadi::SocialNetworkAttributes::networkName()
const
95 return d->attributes[
QLatin1String(
"networkName" )].toString();
98 bool Akonadi::SocialNetworkAttributes::canPublish()
const
100 return d->attributes[
QLatin1String(
"canPublish" )].toBool();
103 uint Akonadi::SocialNetworkAttributes::maxPostLength()
const
Provides interface for custom attributes for Entity.
char * toString(const T &value)
uint toUInt(bool *ok, int base) const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:03 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.