26 #include <QtCore/QCoreApplication>
27 #include <QtCore/QString>
28 #include <QtCore/QStringList>
30 namespace Syndication {
33 class RSSVocab::RSSVocabPrivate
49 static RSSVocab *sSelf;
50 static void cleanupRSSVocab()
56 RSSVocab *RSSVocab::RSSVocabPrivate::sSelf = 0;
58 RSSVocab::RSSVocab() : d(new RSSVocabPrivate)
60 QString ns = QLatin1String(
"http://purl.org/rss/1.0/");
64 d->title = PropertyPtr(
new Property(ns + QLatin1String(
"title")) );
65 d->link = PropertyPtr(
new Property(ns + QLatin1String(
"link")) );
66 d->description = PropertyPtr(
new Property(ns + QLatin1String(
"description")) );
67 d->name = PropertyPtr(
new Property(ns + QLatin1String(
"name")) );
68 d->url = PropertyPtr(
new Property(ns + QLatin1String(
"url")) );
69 d->image = PropertyPtr(
new Property(ns + QLatin1String(
"image")) );
70 d->textinput = PropertyPtr(
new Property(ns + QLatin1String(
"textinput")) );
71 d->items = PropertyPtr(
new Property(ns + QLatin1String(
"items")) );
72 d->channel = ResourcePtr(
new Resource(ns + QLatin1String(
"channel")) );
73 d->item = ResourcePtr(
new Resource(ns + QLatin1String(
"item")) );
83 static RSSVocabPrivate p;
86 qAddPostRoutine(RSSVocabPrivate::cleanupRSSVocab);
93 return d->namespaceURI;
103 return d->description;
147 class RSS09Vocab::RSS09VocabPrivate
165 static void cleanupRSS09Vocab()
171 RSS09Vocab *RSS09Vocab::RSS09VocabPrivate::sSelf = 0;
173 RSS09Vocab::RSS09Vocab() : d(new RSS09VocabPrivate)
175 QString ns = QLatin1String(
"http://my.netscape.com/rdf/simple/0.9/");
177 d->namespaceURI = ns;
179 d->title = PropertyPtr(
new Property(ns + QLatin1String(
"title")) );
180 d->properties.append(d->title->uri());
181 d->link = PropertyPtr(
new Property(ns + QLatin1String(
"link")) );
182 d->properties.append(d->link->uri());
183 d->description = PropertyPtr(
new Property(ns + QLatin1String(
"description")) );
184 d->properties.append(d->description->uri());
185 d->name = PropertyPtr(
new Property(ns + QLatin1String(
"name")) );
186 d->properties.append(d->name->uri());
187 d->url = PropertyPtr(
new Property(ns + QLatin1String(
"url")) );
188 d->properties.append(d->url->uri());
189 d->image = PropertyPtr(
new Property(ns + QLatin1String(
"image")) );
190 d->properties.append(d->image->uri());
191 d->textinput = PropertyPtr(
new Property(ns + QLatin1String(
"textinput")) );
192 d->properties.append(d->textinput->uri());
193 d->item = ResourcePtr(
new Resource(ns + QLatin1String(
"item")) );
194 d->classes.append(d->item->uri());
195 d->channel = ResourcePtr(
new Resource(ns + QLatin1String(
"channel")) );
196 d->classes.append(d->channel->uri());
206 if(!RSS09VocabPrivate::sSelf) {
208 qAddPostRoutine(RSS09VocabPrivate::cleanupRSS09Vocab);
210 return RSS09VocabPrivate::sSelf;
215 return d->namespaceURI;
225 return d->description;
270 return d->properties;