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

KBlog Client Library

  • sources
  • kde-4.12
  • kdepimlibs
  • kblog
blog.h
Go to the documentation of this file.
1 /*
2  This file is part of the kblog library.
3 
4  Copyright (c) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
5  Copyright (c) 2006-2007 Christian Weilbach <christian_weilbach@web.de>
6  Copyright (c) 2007 Mike McQuaid <mike@mikemcquaid.com>
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public
10  License as published by the Free Software Foundation; either
11  version 2 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
18  You should have received a copy of the GNU Library General Public License
19  along with this library; see the file COPYING.LIB. If not, write to
20  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  Boston, MA 02110-1301, USA.
22 */
23 
24 #ifndef KBLOG_BLOG_H
25 #define KBLOG_BLOG_H
26 
27 #include <kblog/kblog_export.h>
28 
29 #include <QtCore/QObject>
30 
31 template <class T,class S> class QMap;
32 
33 class KTimeZone;
34 class KUrl;
35 
53 namespace KBlog {
54 
55 class BlogPost;
56 class BlogComment;
57 class BlogMedia;
58 class BlogPrivate;
59 
71 class KBLOG_EXPORT Blog : public QObject
72 {
73  Q_OBJECT
74  public:
85  explicit Blog( const KUrl &server, QObject *parent = 0,
86  const QString &applicationName = QString(),
87  const QString &applicationVersion = QString() );
88 
92  virtual ~Blog();
93 
97  enum ErrorType {
99  XmlRpc,
101  Atom,
103  ParsingError,
105  AuthenticationError,
107  NotSupported,
109  Other
110  };
111 
115  QString userAgent() const;
116 
126  void setUserAgent( const QString &applicationName,
127  const QString &applicationVersion );
128 
132  virtual QString interfaceName() const = 0;
133 
139  virtual void setBlogId( const QString &blogId );
140 
145  QString blogId() const;
146 
153  virtual void setPassword( const QString &password );
154 
159  QString password() const;
160 
166  virtual void setUsername( const QString &username );
167 
173  QString username() const;
174 
181  virtual void setUrl( const KUrl &url );
182 
188  KUrl url() const;
189 
196  virtual void setTimeZone( const KTimeZone &timeZone );
197 
203  KTimeZone timeZone();
204 
212  virtual void listRecentPosts( int number ) = 0;
213 
224  virtual void fetchPost( KBlog::BlogPost *post ) = 0;
225 
236  virtual void modifyPost( KBlog::BlogPost *post ) = 0;
237 
244  virtual void createPost( KBlog::BlogPost *post ) = 0;
245 
255  virtual void removePost( KBlog::BlogPost *post ) = 0;
256 
257  Q_SIGNALS:
265  void listedRecentPosts(
266  const QList<KBlog::BlogPost>& posts );
267 
275  void createdPost( KBlog::BlogPost *post );
276 
284  void fetchedPost( KBlog::BlogPost *post );
285 
293  void modifiedPost( KBlog::BlogPost *post );
294 
302  void removedPost( KBlog::BlogPost *post );
303 
312  void error( KBlog::Blog::ErrorType type, const QString &errorMessage );
313 
323  void errorPost( KBlog::Blog::ErrorType type,
324  const QString &errorMessage, KBlog::BlogPost *post );
325 
335  void errorMedia( KBlog::Blog::ErrorType type,
336  const QString &errorMessage, KBlog::BlogMedia *media );
337 
348  void errorComment( KBlog::Blog::ErrorType type,
349  const QString &errorMessage, KBlog::BlogPost *post,
350  KBlog::BlogComment *comment );
351 
352  protected:
354  BlogPrivate *const d_ptr;
355 
367  Blog( const KUrl &server, BlogPrivate &dd, QObject *parent = 0,
368  const QString &applicationName = QString(),
369  const QString &applicationVersion = QString() );
370 
371  private:
372  Q_DECLARE_PRIVATE( Blog )
373 };
374 
375 } //namespace KBlog
376 #endif
KBlog::BlogMedia
A class that represents a media object on the server.
Definition: blogmedia.h:48
KBlog::Blog::ParsingError
A parsing error.
Definition: blog.h:103
KBlog::BlogComment
A class that represents a blog comment on the blog post.
Definition: blogcomment.h:50
KBlog::Blog::ErrorType
ErrorType
Enumeration for possible errors.
Definition: blog.h:97
KBlog::Blog::AuthenticationError
An error on authentication.
Definition: blog.h:105
KBlog::Blog::Atom
An error in the syndication client.
Definition: blog.h:101
KBlog::BlogPost
A class that represents a blog post on the server.
Definition: blogpost.h:68
KBlog::Blog::d_ptr
BlogPrivate *const d_ptr
A pointer to the corresponding 'Private' class.
Definition: blog.h:354
KBlog::Blog::NotSupported
An error where the method called is not supported by this object.
Definition: blog.h:107
KBlog::Blog
A class that provides methods to call functions on a supported blog web application.
Definition: blog.h:71
KBlog::Blog::XmlRpc
An error in the XML-RPC client.
Definition: blog.h:99
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:55 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KBlog Client Library

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

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



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