• Skip to content
  • Skip to link menu
KDE 4.3 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 Arthur <mike@mikearthur.co.uk>
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 
00120     virtual QString interfaceName() const = 0;
00121 
00127     virtual void setBlogId( const QString &blogId );
00128 
00133     QString blogId() const;
00134 
00141     virtual void setPassword( const QString &password );
00142 
00147     QString password() const;
00148 
00154     virtual void setUsername( const QString &username );
00155 
00161     QString username() const;
00162 
00169     virtual void setUrl( const KUrl &url );
00170 
00176     KUrl url() const;
00177 
00184     virtual void setTimeZone( const KTimeZone &timeZone );
00185 
00191     KTimeZone timeZone();
00192 
00200     virtual void listRecentPosts( int number ) = 0;
00201 
00212     virtual void fetchPost( KBlog::BlogPost *post ) = 0;
00213 
00224     virtual void modifyPost( KBlog::BlogPost *post ) = 0;
00225 
00232     virtual void createPost( KBlog::BlogPost *post ) = 0;
00233 
00243     virtual void removePost( KBlog::BlogPost *post ) = 0;
00244 
00245   Q_SIGNALS:
00253     void listedRecentPosts(
00254         const QList<KBlog::BlogPost>& posts );
00255 
00263     void createdPost( KBlog::BlogPost *post );
00264 
00272     void fetchedPost( KBlog::BlogPost *post );
00273 
00281     void modifiedPost( KBlog::BlogPost *post );
00282 
00290     void removedPost( KBlog::BlogPost *post );
00291 
00300     void error( KBlog::Blog::ErrorType type, const QString &errorMessage );
00301 
00311     void errorPost( KBlog::Blog::ErrorType type,
00312                     const QString &errorMessage, KBlog::BlogPost *post );
00313 
00323     void errorMedia( KBlog::Blog::ErrorType type,
00324                      const QString &errorMessage, KBlog::BlogMedia *media );
00325 
00336     void errorComment( KBlog::Blog::ErrorType type,
00337                        const QString &errorMessage, KBlog::BlogPost *post,
00338                        KBlog::BlogComment *comment );
00339 
00340   protected:
00342     BlogPrivate *const d_ptr;
00343 
00355     Blog( const KUrl &server, BlogPrivate &dd, QObject *parent = 0,
00356           const QString &applicationName = QString(),
00357           const QString &applicationVersion = QString() );
00358 
00359   private:
00369     void setUserAgent( const QString &applicationName,
00370                        const QString &applicationVersion );
00371     Q_DECLARE_PRIVATE( Blog )
00372 };
00373 
00374 } //namespace KBlog
00375 #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
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.9
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