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

KBlog Client Library

  • 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
31template <class T,class S> class QMap;
32
33class KTimeZone;
34class KUrl;
35
53namespace KBlog {
54
55class BlogPost;
56class BlogComment;
57class BlogMedia;
58class BlogPrivate;
59
71class 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::BlogComment
A class that represents a blog comment on the blog post.
Definition blogcomment.h:51
KBlog::BlogMedia
A class that represents a media object on the server.
Definition blogmedia.h:49
KBlog::BlogPost
A class that represents a blog post on the server.
Definition blogpost.h:69
KBlog::Blog
A class that provides methods to call functions on a supported blog web application.
Definition blog.h:72
KBlog::Blog::interfaceName
virtual QString interfaceName() const =0
Returns the name of the blogging API this object implements.
KBlog::Blog::d_ptr
BlogPrivate *const d_ptr
A pointer to the corresponding 'Private' class.
Definition blog.h:354
KBlog::Blog::ErrorType
ErrorType
Enumeration for possible errors.
Definition blog.h:97
KBlog::Blog::ParsingError
@ ParsingError
A parsing error.
Definition blog.h:103
KBlog::Blog::Atom
@ Atom
An error in the syndication client.
Definition blog.h:101
KBlog::Blog::XmlRpc
@ XmlRpc
An error in the XML-RPC client.
Definition blog.h:99
KBlog::Blog::AuthenticationError
@ AuthenticationError
An error on authentication.
Definition blog.h:105
KBlog::Blog::NotSupported
@ NotSupported
An error where the method called is not supported by this object.
Definition blog.h:107
KBlog::Blog::modifyPost
virtual void modifyPost(KBlog::BlogPost *post)=0
Modify an existing blog post on the server.
KBlog::Blog::createdPost
void createdPost(KBlog::BlogPost *post)
This signal is emitted when a createPost() job creates a new blog post on the blogging server.
KBlog::Blog::removedPost
void removedPost(KBlog::BlogPost *post)
This signal is emitted when a removePost() job removes a post from the blogging server.
KBlog::Blog::listRecentPosts
virtual void listRecentPosts(int number)=0
List a number of recent posts from the server.
KBlog::Blog::errorMedia
void errorMedia(KBlog::Blog::ErrorType type, const QString &errorMessage, KBlog::BlogMedia *media)
This signal is emitted when an error occurs with XML parsing or a structural problem in an operation ...
KBlog::Blog::fetchPost
virtual void fetchPost(KBlog::BlogPost *post)=0
Fetch a blog post from the server with a specific ID.
KBlog::Blog::errorPost
void errorPost(KBlog::Blog::ErrorType type, const QString &errorMessage, KBlog::BlogPost *post)
This signal is emitted when an error occurs with XML parsing or a structural problem in an operation ...
KBlog::Blog::removePost
virtual void removePost(KBlog::BlogPost *post)=0
Remove an existing blog post from the server.
KBlog::Blog::createPost
virtual void createPost(KBlog::BlogPost *post)=0
Create a new blog post on the server.
KBlog::Blog::fetchedPost
void fetchedPost(KBlog::BlogPost *post)
This signal is emitted when a fetchPost() job fetches a post from the blogging server.
KBlog::Blog::errorComment
void errorComment(KBlog::Blog::ErrorType type, const QString &errorMessage, KBlog::BlogPost *post, KBlog::BlogComment *comment)
This signal is emitted when an error occurs with XML parsing or a structural problem in an operation ...
KBlog::Blog::error
void error(KBlog::Blog::ErrorType type, const QString &errorMessage)
This signal is emitted when an error occurs with XML parsing or a structural problem.
KBlog::Blog::listedRecentPosts
void listedRecentPosts(const QList< KBlog::BlogPost > &posts)
This signal is emitted when a listRecentPosts() job fetches a post from the blogging server.
KBlog::Blog::modifiedPost
void modifiedPost(KBlog::BlogPost *post)
This signal is emitted when a modifyPost() job modifies a post on the blogging server.
KBlog
Namespace for blog related classes.
Definition blog.h:53
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 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-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