37 #include "qgpgme_export.h"
40 #include <QStringList>
50 class QGPGME_EXPORT
DN
54 typedef QVector<Attribute> AttributeList;
55 typedef AttributeList::const_iterator const_iterator;
58 explicit DN(
const QString &dn);
59 explicit DN(
const char *utf8DN);
63 const DN &operator=(
const DN &other);
66 static QString escape(
const QString &value);
70 QString prettyDN()
const;
77 QString dn(
const QString &sep)
const;
79 QString operator[](
const QString &attr)
const;
81 void append(
const Attribute &attr);
83 const_iterator begin()
const;
84 const_iterator end()
const;
87 void setAttributeOrder(
const QStringList &order)
const;
90 const QStringList & attributeOrder()
const;
99 class QGPGME_EXPORT
DN::Attribute
102 typedef DN::AttributeList List;
104 explicit Attribute(
const QString &name = QString(),
const QString &value = QString())
105 : mName(name.toUpper()), mValue(value) {}
106 Attribute(
const Attribute &other)
107 : mName(other.name()), mValue(other.value()) {}
109 const Attribute &operator=(
const Attribute &other)
111 if (
this != &other) {
112 mName = other.name();
113 mValue = other.value();
118 const QString &name()
const
122 const QString &value()
const
127 void setValue(
const QString &value)
137 #endif // QGPGME_DN_H