• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KNewStuff

provider.cpp

Go to the documentation of this file.
00001 /*
00002     This file is part of KNewStuff2.
00003     Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
00004     Copyright (c) 2003 - 2007 Josef Spillner <spillner@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 #include "provider.h"
00023 
00024 #include <kdebug.h>
00025 #include <kio/job.h>
00026 
00027 using namespace KNS;
00028 
00029 class ProviderPrivate
00030 {
00031 public:
00032     ProviderPrivate() {}
00033 };
00034 
00035 Provider::Provider()
00036         : d(0)
00037 {
00038 }
00039 
00040 Provider::~Provider()
00041 {
00042     //qDeleteAll(mFeeds);
00043     //delete d;
00044 }
00045 
00046 void Provider::addDownloadUrlFeed(const QString& feedtype, Feed *feed)
00047 {
00048     mFeeds[feedtype] = feed;
00049     // FIXME: check for "blessed" feed types?
00050 }
00051 
00052 Feed *Provider::downloadUrlFeed(const QString& feedtype) const
00053 {
00054     if (mFeeds.contains(feedtype)) {
00055         return mFeeds[feedtype];
00056     } else {
00057         return NULL;
00058     }
00059 }
00060 
00061 void Provider::setName(const KTranslatable &name)
00062 {
00063     mName = name;
00064 }
00065 
00066 KTranslatable Provider::name() const
00067 {
00068     return mName;
00069 }
00070 
00071 void Provider::setIcon(const KUrl &url)
00072 {
00073     mIcon = url;
00074 }
00075 
00076 KUrl Provider::icon() const
00077 {
00078     return mIcon;
00079 }
00080 
00081 void Provider::setUploadUrl(const KUrl &url)
00082 {
00083     mUploadUrl = url;
00084 }
00085 
00086 KUrl Provider::uploadUrl() const
00087 {
00088     return mUploadUrl;
00089 }
00090 
00091 void Provider::setNoUploadUrl(const KUrl &url)
00092 {
00093     mNoUploadUrl = url;
00094 }
00095 
00096 KUrl Provider::noUploadUrl() const
00097 {
00098     return mNoUploadUrl;
00099 }
00100 
00101 void Provider::setWebAccess(const KUrl &url)
00102 {
00103     mWebAccess = url;
00104 }
00105 
00106 KUrl Provider::webAccess() const
00107 {
00108     return mWebAccess;
00109 }
00110 
00111 void Provider::setWebService(const KUrl &url)
00112 {
00113     mWebService = url;
00114 }
00115 
00116 KUrl Provider::webService() const
00117 {
00118     return mWebService;
00119 }
00120 
00121 QStringList Provider::feeds() const
00122 {
00123     return mFeeds.keys();
00124 }
00125 

KNewStuff

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.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