• Skip to content
  • Skip to link menu
KDE 4.5 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

Syndication Library

feed.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 "feed.h"
00024 #include "category.h"
00025 #include "image.h"
00026 #include "item.h"
00027 #include "person.h"
00028 
00029 #include <QtCore/QList>
00030 #include <QtCore/QString>
00031 
00032 namespace Syndication {
00033 
00034 Feed::~Feed()
00035 {
00036 }
00037 
00038 QString Feed::debugInfo() const
00039 {
00040     QString info;
00041     
00042     info += "# Feed begin ######################\n";
00043 
00044     QString dtitle = title();
00045     if (!dtitle.isNull())
00046         info += "title: #" + dtitle + "#\n";
00047     
00048     QString dlink = link();
00049     if (!dlink.isNull())
00050         info += "link: #" + dlink + "#\n";
00051     
00052     QString ddescription = description();
00053     if (!ddescription.isNull())
00054         info += "description: #" + ddescription + "#\n";
00055     
00056     QString dcopyright = copyright();
00057     if (!dcopyright.isNull())
00058         info += "copyright: #" + dcopyright + "#\n";
00059 
00060     QString dlanguage = language();
00061     if (!dlanguage.isNull())
00062         info += "language: #" + dlanguage + "#\n";
00063     
00064     QList<PersonPtr> dauthors = authors();
00065     QList<PersonPtr>::ConstIterator itp = dauthors.constBegin();
00066     QList<PersonPtr>::ConstIterator endp = dauthors.constEnd();
00067     
00068     for ( ; itp != endp; ++itp)
00069         info += (*itp)->debugInfo();
00070                 
00071     QList<CategoryPtr> dcategories = categories();
00072     QList<CategoryPtr>::ConstIterator itc = dcategories.constBegin();
00073     QList<CategoryPtr>::ConstIterator endc = dcategories.constEnd();
00074     
00075     for ( ; itc != endc; ++itc)
00076         info += (*itc)->debugInfo();
00077 
00078     ImagePtr dimage = image();
00079      
00080     if (!dimage->isNull())
00081         info += dimage->debugInfo();
00082     
00083     QList<ItemPtr> ditems = items();
00084     QList<ItemPtr>::ConstIterator it = ditems.constBegin();
00085     QList<ItemPtr>::ConstIterator end = ditems.constEnd();
00086     
00087     for ( ; it != end; ++it)
00088         info += (*it)->debugInfo();
00089 
00090     info += "# Feed end ########################\n";
00091 
00092     return info;
00093 }
00094 
00095 } // namespace Syndication

Syndication Library

Skip menu "Syndication Library"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • 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.1
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