• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

Syndication Library

  • syndication
feed.cpp
1/*
2 * This file is part of the syndication library
3 *
4 * Copyright (C) 2006 Frank Osterfeld <osterfeld@kde.org>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 *
21 */
22
23#include "feed.h"
24#include "category.h"
25#include "image.h"
26#include "item.h"
27#include "person.h"
28
29#include <QtCore/QList>
30#include <QtCore/QString>
31
32namespace Syndication {
33
34Feed::~Feed()
35{
36}
37
38QString Feed::debugInfo() const
39{
40 QString info;
41
42 info += QLatin1String("# Feed begin ######################\n");
43
44 QString dtitle = title();
45 if (!dtitle.isNull())
46 info += QLatin1String("title: #") + dtitle + QLatin1String("#\n");
47
48 QString dlink = link();
49 if (!dlink.isNull())
50 info += QLatin1String("link: #") + dlink + QLatin1String("#\n");
51
52 QString ddescription = description();
53 if (!ddescription.isNull())
54 info += QLatin1String("description: #") + ddescription + QLatin1String("#\n");
55
56 QString dcopyright = copyright();
57 if (!dcopyright.isNull())
58 info += QLatin1String("copyright: #") + dcopyright + QLatin1String("#\n");
59
60 QString dlanguage = language();
61 if (!dlanguage.isNull())
62 info += QLatin1String("language: #") + dlanguage + QLatin1String("#\n");
63
64 QList<PersonPtr> dauthors = authors();
65 QList<PersonPtr>::ConstIterator itp = dauthors.constBegin();
66 QList<PersonPtr>::ConstIterator endp = dauthors.constEnd();
67
68 for ( ; itp != endp; ++itp)
69 info += (*itp)->debugInfo();
70
71 QList<CategoryPtr> dcategories = categories();
72 QList<CategoryPtr>::ConstIterator itc = dcategories.constBegin();
73 QList<CategoryPtr>::ConstIterator endc = dcategories.constEnd();
74
75 for ( ; itc != endc; ++itc)
76 info += (*itc)->debugInfo();
77
78 ImagePtr dimage = image();
79
80 if (!dimage->isNull())
81 info += dimage->debugInfo();
82
83 QList<ItemPtr> ditems = items();
84 QList<ItemPtr>::ConstIterator it = ditems.constBegin();
85 QList<ItemPtr>::ConstIterator end = ditems.constEnd();
86
87 for ( ; it != end; ++it)
88 info += (*it)->debugInfo();
89
90 info += QLatin1String("# Feed end ########################\n");
91
92 return info;
93}
94
95} // namespace Syndication
Syndication::Feed::~Feed
virtual ~Feed()
destructor
Definition: feed.cpp:34
Syndication::Feed::description
virtual QString description() const =0
A description of the feed.
Syndication::Feed::image
virtual ImagePtr image() const =0
returns an image associated with this item.
Syndication::Feed::copyright
virtual QString copyright() const =0
returns copyright information about the feed
Syndication::Feed::categories
virtual QList< CategoryPtr > categories() const =0
returns a list of categories this feed is associated with.
Syndication::Feed::title
virtual QString title() const =0
The title of the feed.
Syndication::Feed::items
virtual QList< ItemPtr > items() const =0
A list of items, in the order they were parsed from the feed source.
Syndication::Feed::link
virtual QString link() const =0
returns a link pointing to a website associated with this channel.
Syndication::Feed::debugInfo
virtual QString debugInfo() const
returns a description of the feed for debugging purposes
Definition: feed.cpp:38
Syndication::Feed::authors
virtual QList< PersonPtr > authors() const =0
returns a list of persons who created the feed content.
Syndication::Feed::language
virtual QString language() const =0
The language used in the feed.
Syndication
TODO.
Definition: abstractparser.cpp:25
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Syndication Library

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

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal