KBlog::Blog

#include <blog.h>

Inheritance diagram for KBlog::Blog:

Public Types

enum  ErrorType {
  XmlRpc, Atom, ParsingError, AuthenticationError,
  NotSupported, Other
}
 

Signals

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)
 

Public Member Functions

 Blog (const QUrl &server, QObject *parent=nullptr, const QString &applicationName=QString(), const QString &applicationVersion=QString())
 
virtual ~Blog ()
 
QString blogId () const
 
virtual void createPost (KBlog::BlogPost *post)=0
 
virtual void fetchPost (KBlog::BlogPost *post)=0
 
virtual QString interfaceName () const =0
 
virtual void listRecentPosts (int number)=0
 
virtual void modifyPost (KBlog::BlogPost *post)=0
 
QString password () const
 
virtual void removePost (KBlog::BlogPost *post)=0
 
virtual void setBlogId (const QString &blogId)
 
virtual void setPassword (const QString &password)
 
virtual void setTimeZone (const QTimeZone &timeZone)
 
virtual void setUrl (const QUrl &url)
 
void setUserAgent (const QString &applicationName, const QString &applicationVersion)
 
virtual void setUsername (const QString &username)
 
QTimeZone timeZone ()
 
QUrl url () const
 
QString userAgent () const
 
QString username () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Protected Member Functions

 Blog (const QUrl &server, BlogPrivate &dd, QObject *parent=nullptr, const QString &applicationName=QString(), const QString &applicationVersion=QString())
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Protected Attributes

BlogPrivate *const d_ptr
 

Additional Inherited Members

- Properties inherited from QObject
 objectName
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QObject
typedef QObjectList
 

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.

Author
Christian Weilbach <[email protected]>
Mike McQuaid <[email protected]>
Reinhold Kainhofer <[email protected]>

Definition at line 72 of file blog.h.

Member Enumeration Documentation

Enumeration for possible errors.

Enumerator
XmlRpc 

An error in the XML-RPC client.

Atom 

An error in the syndication client.

ParsingError 

A parsing error.

AuthenticationError 

An error on authentication.

NotSupported 

An error where the method called is not supported by this object.

Other 

Any other miscellaneous error.

Definition at line 98 of file blog.h.

Constructor & Destructor Documentation

Blog::Blog ( const QUrl server,
QObject parent = nullptr,
const QString applicationName = QString(),
const QString applicationVersion = QString() 
)
explicit

Constructor used by the remote interface implementations.

Parameters
serverURL for the blog's remote interface.
parentthe parent of this object, defaults to null.
applicationNamethe client application's name to use in the HTTP user agent string, defaults to KBlog's own.
applicationVersionthe client application's version to use in the HTTP user agent string, defaults to KBlog's own.

Definition at line 33 of file blog.cpp.

Blog::~Blog ( )
virtual

Destroys the Blog object.

Definition at line 51 of file blog.cpp.

Blog::Blog ( const QUrl server,
BlogPrivate &  dd,
QObject parent = nullptr,
const QString applicationName = QString(),
const QString applicationVersion = QString() 
)
protected

Constructor needed to allow private inheritance of 'Private' classes.

Parameters
serverURL for the blog's XML-RPC interface.
ddURL for the corresponding private class.
parentthe parent of this object, defaults to null.
applicationNamethe client application's name to use in the HTTP user agent string, defaults to KBlog's own.
applicationVersionthe client application's version to use in the HTTP user agent string, defaults to KBlog's own.

Definition at line 42 of file blog.cpp.

Member Function Documentation

QString Blog::blogId ( ) const

Returns the unique ID for the specific blog on the server.

See also
setBlogId( const QString &blogId );

Definition at line 108 of file blog.cpp.

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
postthe created post.
See also
createPost()
virtual void KBlog::Blog::createPost ( KBlog::BlogPost post)
pure virtual

Create a new blog post on the server.

Parameters
postthe blog post to create.
See also
createdPost()

Implemented in KBlog::GData, KBlog::Blogger1, KBlog::MovableType, KBlog::WordpressBuggy, and KBlog::LiveJournal.

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
typethe type of the error.
errorMessagethe error message.
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
typethe type of the error.
errorMessagethe error message.
postthe post that caused the error.
commentthe comment 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
typethe type of the error.
errorMessagethe error message.
mediathe media that caused the error.
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
typethe type of the error.
errorMessagethe error message.
postthe post that caused the error.
See also
ErrorType
void KBlog::Blog::fetchedPost ( KBlog::BlogPost post)
signal

This signal is emitted when a fetchPost() job fetches a post from the blogging server.

Parameters
postthe fetched post.
See also
fetchPost()
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
posta blog post with the ID identifying the blog post to fetch.
See also
fetchedPost()
listedRecentPosts( int number )

Implemented in KBlog::GData, KBlog::Blogger1, KBlog::MovableType, and KBlog::LiveJournal.

virtual QString KBlog::Blog::interfaceName ( ) const
pure virtual

Returns the name of the blogging API this object implements.

Implemented in KBlog::GData, KBlog::LiveJournal, KBlog::WordpressBuggy, KBlog::Blogger1, KBlog::MetaWeblog, and KBlog::MovableType.

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
poststhe list of posts.
See also
listRecentPosts()
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
numberthe number of posts to fetch.
See also
listedRecentPosts( const QList<KBlog::BlogPost>& posts )

Implemented in KBlog::GData, KBlog::LiveJournal, KBlog::Blogger1, and KBlog::MovableType.

void KBlog::Blog::modifiedPost ( KBlog::BlogPost post)
signal

This signal is emitted when a modifyPost() job modifies a post on the blogging server.

Parameters
postthe modified post.
See also
modifyPost()
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
postthe new blog post.
See also
modifiedPost()
listedRecentPosts( int number )

Implemented in KBlog::GData, KBlog::Blogger1, KBlog::LiveJournal, KBlog::MovableType, and KBlog::WordpressBuggy.

QString Blog::password ( ) const

Returns the password of the blog.

See also
setPassword( const QString & );

Definition at line 84 of file blog.cpp.

void KBlog::Blog::removedPost ( KBlog::BlogPost post)
signal

This signal is emitted when a removePost() job removes a post from the blogging server.

Parameters
postthe removed post.
See also
removePost()
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::GData, KBlog::Blogger1, and KBlog::LiveJournal.

void Blog::setBlogId ( const QString blogId)
virtual

Sets the unique ID for the specific blog on the server.

Parameters
blogIdthe ID of the blog to send/receive from.
See also
blogId();

Definition at line 102 of file blog.cpp.

void Blog::setPassword ( const QString password)
virtual

Sets the password used in blog authentication.

Parameters
passwordthe blog's password.
See also
password();

Definition at line 78 of file blog.cpp.

void Blog::setTimeZone ( const QTimeZone timeZone)
virtual

Sets the time zone of the blog's server.

Parameters
timeZonethe time zone of the server.
See also
timeZone()

Definition at line 126 of file blog.cpp.

void Blog::setUrl ( const QUrl url)
virtual

Sets the URL for the blog's XML-RPC interface.

Parameters
urlthe blog's XML-RPC URL.
See also
url()

Reimplemented in KBlog::LiveJournal, and KBlog::Blogger1.

Definition at line 114 of file blog.cpp.

void Blog::setUserAgent ( const QString applicationName,
const QString applicationVersion 
)

Sets the HTTP user agent string used to make the HTTP requests.

Parameters
applicationNamethe client application's name to use in the HTTP user agent string.
applicationVersionthe client application's version to use in the HTTP user agent string.
See also
userAgent()

Definition at line 63 of file blog.cpp.

void Blog::setUsername ( const QString username)
virtual

Sets the username used in blog authentication.

Parameters
usernamethe blog's username.
See also
username()

Definition at line 96 of file blog.cpp.

QTimeZone Blog::timeZone ( )

Get the time zone of the blog's server.

See also
void setTimeZone()

Definition at line 132 of file blog.cpp.

QUrl Blog::url ( ) const

Get the URL for the blog's XML-RPC interface.

See also
setUrl( const QUrl & )

Definition at line 120 of file blog.cpp.

QString Blog::userAgent ( ) const

Returns the HTTP user agent string used to make the HTTP requests.

Definition at line 57 of file blog.cpp.

QString Blog::username ( ) const

Returns the username used in blog authentication.

See also
setUsername( const QString & )

Definition at line 90 of file blog.cpp.

Member Data Documentation

BlogPrivate* const KBlog::Blog::d_ptr
protected

A pointer to the corresponding 'Private' class.

Definition at line 355 of file blog.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue May 26 2020 22:45:37 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.