37class Enclosure::EnclosurePrivate :
public Shared
46 bool operator==(
const EnclosurePrivate &other)
const
48 return ( isNull == other.isNull || (url == other.url &&
49 length == other.length &&
55Enclosure Enclosure::fromXML(
const TQDomElement& e)
60 if (e.hasAttribute(TQString::fromLatin1(
"url")))
61 url = e.attribute(TQString::fromLatin1(
"url"));
63 if (e.hasAttribute(TQString::fromLatin1(
"length")))
66 int c = e.attribute(TQString::fromLatin1(
"length")).toInt(&ok);
69 if (e.hasAttribute(TQString::fromLatin1(
"type")))
70 type = e.attribute(TQString::fromLatin1(
"type"));
72 return Enclosure(url, length, type);
75TQDomElement Enclosure::toXML(TQDomDocument document)
const
77 TQDomElement e = document.createElement(TQString::fromLatin1(
"enclosure"));
79 e.setAttribute(TQString::fromLatin1(
"url"), d->url);
81 e.setAttribute(TQString::fromLatin1(
"length"), TQString::number(d->length));
82 if (!d->type.isNull())
83 e.setAttribute(TQString::fromLatin1(
"type"), d->type);
88Enclosure::Enclosure() : d(new EnclosurePrivate)
94Enclosure::Enclosure(
const Enclosure& other) : d(0)
99Enclosure::Enclosure(
const TQString& url,
int length,
const TQString& type) : d(new EnclosurePrivate)
107Enclosure::~Enclosure()
116Enclosure& Enclosure::operator=(
const Enclosure& other)
128bool Enclosure::operator==(
const Enclosure &other)
const
130 return *d == *other.d;
133bool Enclosure::isNull()
const
138TQString Enclosure::url()
const
143int Enclosure::length()
const
148TQString Enclosure::type()
const