• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

syndication/rdf

syndicationvocab.cpp
00001 /*
00002  * This file is part of the syndication library
00003  *
00004  * Copyright (C) 2006 Frank Osterfeld <osterfeld@kde.org>
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public License
00017  * along with this library; see the file COPYING.LIB.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 #include "syndicationvocab.h"
00024 #include "property.h"
00025 
00026 #include <QtCore/QCoreApplication>
00027 #include <QtCore/QString>
00028 
00029 namespace Syndication {
00030 namespace RDF {
00031 
00032 class SyndicationVocab::SyndicationVocabPrivate
00033 {
00034     public:
00035         
00036     QString namespaceURI;
00037     PropertyPtr updatePeriod;
00038     PropertyPtr updateFrequency;
00039     PropertyPtr updateBase;
00040 
00041     static SyndicationVocab *sSelf;
00042     static void cleanupSyndicationVocab()
00043     {
00044         delete sSelf;
00045         sSelf = 0;
00046     }
00047 };
00048 SyndicationVocab *SyndicationVocab::SyndicationVocabPrivate::sSelf = 0;
00049 
00050 SyndicationVocab::SyndicationVocab() : d(new SyndicationVocabPrivate)
00051 {
00052     QString ns = QString::fromUtf8("http://purl.org/rss/1.0/modules/syndication/");
00053     
00054     d->namespaceURI = ns;
00055     
00056     d->updatePeriod = PropertyPtr( new Property(ns + QString::fromUtf8("updatePeriod")) );
00057     d->updateFrequency = PropertyPtr( new Property(ns + QString::fromUtf8("updateFrequency")) );
00058     d->updateBase = PropertyPtr( new Property(ns + QString::fromUtf8("updateBase")) );
00059     
00060 }
00061 
00062 SyndicationVocab::~SyndicationVocab()
00063 {
00064     delete d;
00065 }
00066 
00067 SyndicationVocab* SyndicationVocab::self()
00068 {
00069     static SyndicationVocabPrivate p;
00070     if(!p.sSelf) {
00071         p.sSelf = new SyndicationVocab;
00072         qAddPostRoutine(SyndicationVocabPrivate::cleanupSyndicationVocab);
00073     }
00074     return p.sSelf;
00075 }
00076         
00077 const QString& SyndicationVocab::namespaceURI() const
00078 {
00079     return d->namespaceURI;
00080 }
00081 
00082 PropertyPtr SyndicationVocab::updatePeriod() const
00083 {
00084     return d->updatePeriod;
00085 }
00086 
00087 PropertyPtr SyndicationVocab::updateFrequency() const
00088 {
00089     return d->updateFrequency;
00090 }
00091 
00092 PropertyPtr SyndicationVocab::updateBase() const
00093 {
00094     return d->updateBase;
00095 }
00096 
00097 } // namespace RDF
00098 } // namespace Syndication

syndication/rdf

Skip menu "syndication/rdf"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal