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

KBlog Client Library

  • KBlog
  • WordpressBuggy
Public Member Functions | Protected Member Functions
KBlog::WordpressBuggy Class Reference

#include <wordpressbuggy.h>

Inheritance diagram for KBlog::WordpressBuggy:
KBlog::MovableType KBlog::MetaWeblog KBlog::Blogger1 KBlog::Blog

List of all members.

Public Member Functions

 WordpressBuggy (const KUrl &server, QObject *parent=0)
virtual ~WordpressBuggy ()
void createPost (KBlog::BlogPost *post)
QString interfaceName () const
void modifyPost (KBlog::BlogPost *post)
- Public Member Functions inherited from KBlog::MovableType
 MovableType (const KUrl &server, QObject *parent=0)
virtual ~MovableType ()
void fetchPost (KBlog::BlogPost *post)
void listRecentPosts (int number)
virtual void listTrackBackPings (KBlog::BlogPost *post)
- Public Member Functions inherited from KBlog::MetaWeblog
 MetaWeblog (const KUrl &server, QObject *parent=0)
virtual ~MetaWeblog ()
virtual void createMedia (KBlog::BlogMedia *media)
virtual void listCategories ()
- Public Member Functions inherited from KBlog::Blogger1
 Blogger1 (const KUrl &server, QObject *parent=0)
virtual ~Blogger1 ()
virtual void fetchUserInfo ()
virtual void listBlogs ()
void removePost (KBlog::BlogPost *post)
void setUrl (const KUrl &server)
- Public Member Functions inherited from KBlog::Blog
 Blog (const KUrl &server, QObject *parent=0, const QString &applicationName=QString(), const QString &applicationVersion=QString())
virtual ~Blog ()
QString blogId () const
QString password () const
virtual void setBlogId (const QString &blogId)
virtual void setPassword (const QString &password)
virtual void setTimeZone (const KTimeZone &timeZone)
void setUserAgent (const QString &applicationName, const QString &applicationVersion)
virtual void setUsername (const QString &username)
KTimeZone timeZone ()
KUrl url () const
QString userAgent () const
QString username () const

Protected Member Functions

 WordpressBuggy (const KUrl &server, WordpressBuggyPrivate &dd, QObject *parent=0)
- Protected Member Functions inherited from KBlog::MovableType
 MovableType (const KUrl &server, MovableTypePrivate &dd, QObject *parent=0)
- Protected Member Functions inherited from KBlog::MetaWeblog
 MetaWeblog (const KUrl &server, MetaWeblogPrivate &dd, QObject *parent=0)
- Protected Member Functions inherited from KBlog::Blogger1
 Blogger1 (const KUrl &server, Blogger1Private &dd, QObject *parent=0)
- Protected Member Functions inherited from KBlog::Blog
 Blog (const KUrl &server, BlogPrivate &dd, QObject *parent=0, const QString &applicationName=QString(), const QString &applicationVersion=QString())

Additional Inherited Members

- Signals inherited from KBlog::MovableType
void listedTrackBackPings (KBlog::BlogPost *post, const QList< QMap< QString, QString > > &pings)
- Signals inherited from KBlog::MetaWeblog
void createdMedia (KBlog::BlogMedia *media)
void listedCategories (const QList< QMap< QString, QString > > &categories)
- Signals inherited from KBlog::Blogger1
void fetchedUserInfo (const QMap< QString, QString > &userInfo)
void listedBlogs (const QList< QMap< QString, QString > > &blogsList)
- Signals inherited from KBlog::Blog
void createdPost (KBlog::BlogPost *post)
void error (KBlog::Blog::ErrorType type, const QString &errorMessage)
void errorComment (KBlog::Blog::ErrorType type, const QString &errorMessage, KBlog::BlogPost *post, KBlog::BlogComment *comment)
void errorMedia (KBlog::Blog::ErrorType type, const QString &errorMessage, KBlog::BlogMedia *media)
void errorPost (KBlog::Blog::ErrorType type, const QString &errorMessage, KBlog::BlogPost *post)
void fetchedPost (KBlog::BlogPost *post)
void listedRecentPosts (const QList< KBlog::BlogPost > &posts)
void modifiedPost (KBlog::BlogPost *post)
void removedPost (KBlog::BlogPost *post)

Detailed Description

A class that can be used for access to blogs (Wordpress, Drupal <5.6 and most likely many more) which simply use the yyyyMMddThh:mm:ss dateTime.iso8601 format stated on http://www.xmlrpc.com.

This is only an example for an ISO-8601 compatible format, but many blogs seem to assume exactly this format. This class is needed because KXmlRpc::Client only has support for the extended format yyyy-MM-ddThh:mm:ss which is also standard conform and makes more sense than the mixture above. This class reimplements createPost and modifyPost from scratch to send the dateTime in a compatible format (yyyyMMddThh:mm:ss).

The rest of the code is inherited from MovableType, as it does not use the dateTime format. The name is because this problem was first discovered with Wordpress.

Blog* myblog = new WordpressBuggy("http://example.com/xmlrpc/gateway.php");
myblog->setUsername( "some_user_id" );
myblog->setPassword( "YoURFunnyPAsSwoRD" );
myblog->setBlogId( "1" ); // can be caught by listBlogs()
KBlog::BlogPost *post = new BlogPost();
post->setTitle( "This is the title." );
post->setContent( "Here is some the content..." );
myblog->createPost( post );
Author:
Christian Weilbach <christian_weilbach@web.de>

Definition at line 68 of file wordpressbuggy.h.


Constructor & Destructor Documentation

WordpressBuggy::WordpressBuggy ( const KUrl &  server,
QObject *  parent = 0 
)
explicit

Create an object for WordpressBuggy.

Parameters:
serveris the url for the xmlrpc gateway.
parentis the parent object.

Definition at line 38 of file wordpressbuggy.cpp.

WordpressBuggy::~WordpressBuggy ( )
virtual

Destroy the object.

Definition at line 51 of file wordpressbuggy.cpp.

WordpressBuggy::WordpressBuggy ( const KUrl &  server,
WordpressBuggyPrivate &  dd,
QObject *  parent = 0 
)
protected

Constructor needed for private inheritance.

Definition at line 44 of file wordpressbuggy.cpp.


Member Function Documentation

void WordpressBuggy::createPost ( KBlog::BlogPost *  post)
virtual

Create a new post on server.

Parameters:
postis send to the server.

Reimplemented from KBlog::MovableType.

Definition at line 56 of file wordpressbuggy.cpp.

QString WordpressBuggy::interfaceName ( ) const
virtual

Returns the of the inherited object.

Reimplemented from KBlog::MovableType.

Definition at line 273 of file wordpressbuggy.cpp.

void WordpressBuggy::modifyPost ( KBlog::BlogPost *  post)
virtual

Modify a post on server.

Parameters:
postThe post to be modified on the server. You need to set its id correctly.
See also:
BlogPost::setPostId( const QString& )
modifiedPost( KBlog::BlogPost* )

Reimplemented from KBlog::MovableType.

Definition at line 169 of file wordpressbuggy.cpp.


The documentation for this class was generated from the following files:
  • wordpressbuggy.h
  • wordpressbuggy.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 16 2013 19:19:44 by doxygen 1.8.1.1 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.10.5 API Reference

Skip menu "kdepimlibs-4.10.5 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