KBlog Client Library
KBlog::Blog Class Reference
#include <blog.h>

Detailed Description
A class that provides methods to call functions on a supported blog web application.This is the main interface to the blogging client library.
Definition at line 71 of file blog.h.
Public Types | |
enum | ErrorType { XmlRpc, Atom, ParsingError, AuthenticationError, NotSupported, Other } |
Signals | |
void | listedRecentPosts (const QList< KBlog::BlogPost > &posts) |
void | createdPost (KBlog::BlogPost *post) |
void | fetchedPost (KBlog::BlogPost *post) |
void | modifiedPost (KBlog::BlogPost *post) |
void | removedPost (KBlog::BlogPost *post) |
void | error (KBlog::Blog::ErrorType type, const QString &errorMessage) |
void | errorPost (KBlog::Blog::ErrorType type, const QString &errorMessage, KBlog::BlogPost *post) |
void | errorMedia (KBlog::Blog::ErrorType type, const QString &errorMessage, KBlog::BlogMedia *media) |
void | errorComment (KBlog::Blog::ErrorType type, const QString &errorMessage, KBlog::BlogPost *post, KBlog::BlogComment *comment) |
Public Member Functions | |
Blog (const KUrl &server, QObject *parent=0, const QString &applicationName=QString(), const QString &applicationVersion=QString()) | |
virtual | ~Blog () |
QString | userAgent () const |
virtual QString | interfaceName () const =0 |
virtual void | setBlogId (const QString &blogId) |
QString | blogId () const |
virtual void | setPassword (const QString &password) |
QString | password () const |
virtual void | setUsername (const QString &username) |
QString | username () const |
virtual void | setUrl (const KUrl &url) |
KUrl | url () const |
virtual void | setTimeZone (const KTimeZone &timeZone) |
KTimeZone | timeZone () |
virtual void | listRecentPosts (int number)=0 |
virtual void | fetchPost (KBlog::BlogPost *post)=0 |
virtual void | modifyPost (KBlog::BlogPost *post)=0 |
virtual void | createPost (KBlog::BlogPost *post)=0 |
virtual void | removePost (KBlog::BlogPost *post)=0 |
Protected Member Functions | |
Blog (const KUrl &server, BlogPrivate &dd, QObject *parent=0, const QString &applicationName=QString(), const QString &applicationVersion=QString()) | |
Protected Attributes | |
BlogPrivate *const | d_ptr |
Member Enumeration Documentation
Enumeration for possible errors.
Constructor & Destructor Documentation
Blog::Blog | ( | const KUrl & | server, | |
QObject * | parent = 0 , |
|||
const QString & | applicationName = QString() , |
|||
const QString & | applicationVersion = QString() | |||
) | [explicit] |
Constructor used by the remote interface implementations.
- Parameters:
-
server URL for the blog's remote interface. parent the parent of this object, defaults to null. applicationName the client application's name to use in the HTTP user agent string, defaults to KBlog's own. applicationVersion the client application's version to use in the HTTP user agent string, defaults to KBlog's own.
Blog::Blog | ( | const KUrl & | server, | |
BlogPrivate & | dd, | |||
QObject * | parent = 0 , |
|||
const QString & | applicationName = QString() , |
|||
const QString & | applicationVersion = QString() | |||
) | [protected] |
Constructor needed to allow private inheritance of 'Private' classes.
- Parameters:
-
server URL for the blog's XML-RPC interface. dd URL for the corresponding private class. parent the parent of this object, defaults to null. applicationName the client application's name to use in the HTTP user agent string, defaults to KBlog's own. applicationVersion the client application's version to use in the HTTP user agent string, defaults to KBlog's own.
Member Function Documentation
QString Blog::userAgent | ( | ) | const |
virtual QString KBlog::Blog::interfaceName | ( | ) | const [pure virtual] |
Returns the name of the blogging API this object implements.
Implemented in KBlog::Blogger1, KBlog::GData, KBlog::MetaWeblog, KBlog::MovableType, and KBlog::WordpressBuggy.
void Blog::setBlogId | ( | const QString & | blogId | ) | [virtual] |
QString Blog::blogId | ( | ) | const |
Returns the unique ID for the specific blog on the server.
- See also:
- setBlogId( const QString &blogId );
void Blog::setPassword | ( | const QString & | password | ) | [virtual] |
Sets the password used in blog authentication.
- Parameters:
-
password the blog's password.
- See also:
- password();
QString Blog::password | ( | ) | const |
void Blog::setUsername | ( | const QString & | username | ) | [virtual] |
Sets the username used in blog authentication.
- Parameters:
-
username the blog's username.
- See also:
- username()
QString Blog::username | ( | ) | const |
void Blog::setUrl | ( | const KUrl & | url | ) | [virtual] |
Sets the URL for the blog's XML-RPC interface.
- Parameters:
-
url the blog's XML-RPC URL.
- See also:
- url()
Reimplemented in KBlog::Blogger1.
KUrl Blog::url | ( | ) | const |
void Blog::setTimeZone | ( | const KTimeZone & | timeZone | ) | [virtual] |
Sets the time zone of the blog's server.
- Parameters:
-
timeZone the time zone of the server.
- See also:
- timeZone()
KTimeZone Blog::timeZone | ( | ) |
virtual void KBlog::Blog::listRecentPosts | ( | int | number | ) | [pure virtual] |
List a number of recent posts from the server.
The posts are returned in descending chronological order.
- Parameters:
-
number the number of posts to fetch.
Implemented in KBlog::Blogger1, KBlog::GData, and KBlog::MovableType.
virtual void KBlog::Blog::fetchPost | ( | KBlog::BlogPost * | post | ) | [pure virtual] |
Fetch a blog post from the server with a specific ID.
The ID of the existing post must be retrieved using getRecentPosts and then be modified and provided to this method or a new BlogPost created with the existing ID.
- Parameters:
-
post a blog post with the ID identifying the blog post to fetch.
- See also:
- fetchedPost()
listedRecentPosts( int number )
Implemented in KBlog::Blogger1, and KBlog::GData.
virtual void KBlog::Blog::modifyPost | ( | KBlog::BlogPost * | post | ) | [pure virtual] |
Modify an existing blog post on the server.
The ID of the existing post must be retrieved using getRecentPosts and then be modified and provided to this method or a new BlogPost created with the existing ID.
- Parameters:
-
post the new blog post.
- See also:
- modifiedPost()
listedRecentPosts( int number )
Implemented in KBlog::Blogger1, KBlog::GData, and KBlog::WordpressBuggy.
virtual void KBlog::Blog::createPost | ( | KBlog::BlogPost * | post | ) | [pure virtual] |
Create a new blog post on the server.
- Parameters:
-
post the blog post to create.
- See also:
- createdPost()
Implemented in KBlog::Blogger1, KBlog::GData, and KBlog::WordpressBuggy.
virtual void KBlog::Blog::removePost | ( | KBlog::BlogPost * | post | ) | [pure virtual] |
Remove an existing blog post from the server.
The BlogPost object representing the existing post must be retrieved using getRecentPosts and then provided to this method.
- Parameters:
-
post* the blog post to remove.
- See also:
- removedPost()
listedRecentPosts( int number )
Implemented in KBlog::Blogger1, and KBlog::GData.
void KBlog::Blog::listedRecentPosts | ( | const QList< KBlog::BlogPost > & | posts | ) | [signal] |
This signal is emitted when a listRecentPosts() job fetches a post from the blogging server.
- Parameters:
-
posts the list of posts.
- See also:
- listRecentPosts()
void KBlog::Blog::createdPost | ( | KBlog::BlogPost * | post | ) | [signal] |
This signal is emitted when a createPost() job creates a new blog post on the blogging server.
- Parameters:
-
post the created post.
- See also:
- createPost()
void KBlog::Blog::fetchedPost | ( | KBlog::BlogPost * | post | ) | [signal] |
This signal is emitted when a fetchPost() job fetches a post from the blogging server.
- Parameters:
-
post the fetched post.
- See also:
- fetchPost()
void KBlog::Blog::modifiedPost | ( | KBlog::BlogPost * | post | ) | [signal] |
This signal is emitted when a modifyPost() job modifies a post on the blogging server.
- Parameters:
-
post the modified post.
- See also:
- modifyPost()
void KBlog::Blog::removedPost | ( | KBlog::BlogPost * | post | ) | [signal] |
This signal is emitted when a removePost() job removes a post from the blogging server.
- Parameters:
-
post the removed post.
- See also:
- removePost()
void KBlog::Blog::error | ( | KBlog::Blog::ErrorType | type, | |
const QString & | errorMessage | |||
) | [signal] |
This signal is emitted when an error occurs with XML parsing or a structural problem.
- Parameters:
-
type the type of the error. errorMessage the error message.
- See also:
- ErrorType
void KBlog::Blog::errorPost | ( | KBlog::Blog::ErrorType | type, | |
const QString & | errorMessage, | |||
KBlog::BlogPost * | post | |||
) | [signal] |
This signal is emitted when an error occurs with XML parsing or a structural problem in an operation involving a blog post.
- Parameters:
-
type the type of the error. errorMessage the error message. post the post that caused the error.
- See also:
- ErrorType
void KBlog::Blog::errorMedia | ( | KBlog::Blog::ErrorType | type, | |
const QString & | errorMessage, | |||
KBlog::BlogMedia * | media | |||
) | [signal] |
This signal is emitted when an error occurs with XML parsing or a structural problem in an operation involving some blog media.
- Parameters:
-
type the type of the error. errorMessage the error message. media the media that caused the error.
- See also:
- ErrorType
void KBlog::Blog::errorComment | ( | KBlog::Blog::ErrorType | type, | |
const QString & | errorMessage, | |||
KBlog::BlogPost * | post, | |||
KBlog::BlogComment * | comment | |||
) | [signal] |
This signal is emitted when an error occurs with XML parsing or a structural problem in an operation involving a blog post's comment.
- Parameters:
-
type the type of the error. errorMessage the error message. post the post that caused the error. comment the comment that caused the error.
- See also:
- ErrorType
Member Data Documentation
BlogPrivate* const KBlog::Blog::d_ptr [protected] |
The documentation for this class was generated from the following files: