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

KBlog Client Library

blog.h

Go to the documentation of this file.
00001 /*
00002   This file is part of the kblog library.
00003 
00004   Copyright (c) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
00005   Copyright (c) 2006-2007 Christian Weilbach <christian_weilbach@web.de>
00006   Copyright (c) 2007 Mike McQuaid <mike@mikemcquaid.com>
00007 
00008   This library is free software; you can redistribute it and/or
00009   modify it under the terms of the GNU Library General Public
00010   License as published by the Free Software Foundation; either
00011   version 2 of the License, or (at your option) any later version.
00012 
00013   This library is distributed in the hope that it will be useful,
00014   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016   Library General Public License for more details.
00017 
00018   You should have received a copy of the GNU Library General Public License
00019   along with this library; see the file COPYING.LIB.  If not, write to
00020   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00021   Boston, MA 02110-1301, USA.
00022 */
00023 
00024 #ifndef KBLOG_BLOG_H
00025 #define KBLOG_BLOG_H
00026 
00027 #include <kblog/kblog_export.h>
00028 
00029 #include <QtCore/QObject>
00030 
00031 template <class T,class S> class QMap;
00032 
00033 class KTimeZone;
00034 class KUrl;
00035 
00053 namespace KBlog {
00054 
00055 class BlogPost;
00056 class BlogComment;
00057 class BlogMedia;
00058 class BlogPrivate;
00059 
00071 class KBLOG_EXPORT Blog : public QObject
00072 {
00073   Q_OBJECT
00074   public:
00085     explicit Blog( const KUrl &server, QObject *parent = 0,
00086                    const QString &applicationName = QString(),
00087                    const QString &applicationVersion = QString() );
00088 
00092     virtual ~Blog();
00093 
00097     enum ErrorType {
00099       XmlRpc,
00101       Atom,
00103       ParsingError,
00105       AuthenticationError,
00107       NotSupported,
00109       Other
00110     };
00111 
00115     QString userAgent() const;
00116 
00126     void setUserAgent( const QString &applicationName,
00127                        const QString &applicationVersion );
00128 
00132     virtual QString interfaceName() const = 0;
00133 
00139     virtual void setBlogId( const QString &blogId );
00140 
00145     QString blogId() const;
00146 
00153     virtual void setPassword( const QString &password );
00154 
00159     QString password() const;
00160 
00166     virtual void setUsername( const QString &username );
00167 
00173     QString username() const;
00174 
00181     virtual void setUrl( const KUrl &url );
00182 
00188     KUrl url() const;
00189 
00196     virtual void setTimeZone( const KTimeZone &timeZone );
00197 
00203     KTimeZone timeZone();
00204 
00212     virtual void listRecentPosts( int number ) = 0;
00213 
00224     virtual void fetchPost( KBlog::BlogPost *post ) = 0;
00225 
00236     virtual void modifyPost( KBlog::BlogPost *post ) = 0;
00237 
00244     virtual void createPost( KBlog::BlogPost *post ) = 0;
00245 
00255     virtual void removePost( KBlog::BlogPost *post ) = 0;
00256 
00257   Q_SIGNALS:
00265     void listedRecentPosts(
00266         const QList<KBlog::BlogPost>& posts );
00267 
00275     void createdPost( KBlog::BlogPost *post );
00276 
00284     void fetchedPost( KBlog::BlogPost *post );
00285 
00293     void modifiedPost( KBlog::BlogPost *post );
00294 
00302     void removedPost( KBlog::BlogPost *post );
00303 
00312     void error( KBlog::Blog::ErrorType type, const QString &errorMessage );
00313 
00323     void errorPost( KBlog::Blog::ErrorType type,
00324                     const QString &errorMessage, KBlog::BlogPost *post );
00325 
00335     void errorMedia( KBlog::Blog::ErrorType type,
00336                      const QString &errorMessage, KBlog::BlogMedia *media );
00337 
00348     void errorComment( KBlog::Blog::ErrorType type,
00349                        const QString &errorMessage, KBlog::BlogPost *post,
00350                        KBlog::BlogComment *comment );
00351 
00352   protected:
00354     BlogPrivate *const d_ptr;
00355 
00367     Blog( const KUrl &server, BlogPrivate &dd, QObject *parent = 0,
00368           const QString &applicationName = QString(),
00369           const QString &applicationVersion = QString() );
00370 
00371   private:
00372     Q_DECLARE_PRIVATE( Blog )
00373 };
00374 
00375 } //namespace KBlog
00376 #endif

KBlog Client Library

Skip menu "KBlog Client Library"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • 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