• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

KBlog Client Library

KBlog::GData

KBlog::GData Class Reference

A class that can be used for access to GData blogs. More...

#include <gdata.h>

Inheritance diagram for KBlog::GData:
Inheritance graph
[legend]

List of all members.

Signals

void createdComment (const KBlog::BlogPost *post, const KBlog::BlogComment *comment)
void fetchedProfileId (const QString &profileId)
void listedAllComments (const QList< KBlog::BlogComment > &commentsList)
void listedBlogs (const QList< QMap< QString, QString > > &blogsList)
void listedComments (KBlog::BlogPost *post, const QList< KBlog::BlogComment > &comments)
void removedComment (const KBlog::BlogPost *post, const KBlog::BlogComment *comment)

Public Member Functions

 GData (const KUrl &server, QObject *parent=0)
 ~GData ()
virtual void createComment (KBlog::BlogPost *post, KBlog::BlogComment *comment)
void createPost (KBlog::BlogPost *post)
void fetchPost (KBlog::BlogPost *post)
void fetchProfileId ()
QString fullName () const
QString interfaceName () const
virtual void listAllComments ()
virtual void listBlogs ()
virtual void listComments (KBlog::BlogPost *post)
virtual void listRecentPosts (const QStringList &label=QStringList(), int number=0, const KDateTime &upMinTime=KDateTime(), const KDateTime &upMaxTime=KDateTime(), const KDateTime &pubMinTime=KDateTime(), const KDateTime &pubMaxTime=KDateTime())
void listRecentPosts (int number)
void modifyPost (KBlog::BlogPost *post)
QString profileId () const
virtual void removeComment (KBlog::BlogPost *post, KBlog::BlogComment *comment)
void removePost (KBlog::BlogPost *post)
virtual void setFullName (const QString &fullName)
virtual void setProfileId (const QString &pid)

Protected Member Functions

 GData (const KUrl &server, GDataPrivate &dd, QObject *parent=0)

Detailed Description

A class that can be used for access to GData blogs.

The new blogspot.com accounts ( August 2007 ) exclusively support GData API which is a standard based on Atom API. Compared to Blogger 1.0, which is based on Xml-Rpc and less secure, it adds new functionality like titles and comments.

  Blog* myblog = new GData("http://myblogspot.account.com");
  myblog->setProfileId( "2039484587348593945823" ); // can be fetched via fetchProfileId()
  myblog->setBlogId( "1" ); // can be caught by listBlogs()
  myblog->setUsername( "your_email@address.com" );
  myblog->setPassword( "yOuRFuNnYPasSword" );
  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>
Reinhold Kainhofer <reinhold@kainhofer.com>

Definition at line 70 of file gdata.h.


Constructor & Destructor Documentation

GData::GData ( const KUrl &  server,
QObject *  parent = 0 
) [explicit]

Create an object for GData.

Parameters:
server The server url for the xmlrpc gateway.
parent The parent object, inherited from QObject.

Definition at line 46 of file gdata.cpp.

GData::~GData (  ) 

Destructor.

Definition at line 53 of file gdata.cpp.

KBlog::GData::GData ( const KUrl &  server,
GDataPrivate &  dd,
QObject *  parent = 0 
) [protected]

Overloaded for private inheritance handling.


Member Function Documentation

void GData::createComment ( KBlog::BlogPost *  post,
KBlog::BlogComment *  comment 
) [virtual]

Create a comment on the server.

Parameters:
post This is the post with its id set correctly.
comment This is the comment to create.
See also:
BlogPost::setPostId( const QString& )
createdComment( KBlog::BlogPost*, KBlog::BlogComment* )

Definition at line 366 of file gdata.cpp.

void KBlog::GData::createdComment ( const KBlog::BlogPost *  post,
const KBlog::BlogComment *  comment 
) [signal]

This signal is emitted when a comment has been created on the blogging server.

Parameters:
post This is the corresponding post.
comment This is the created comment.
See also:
createComment( KBlog::BlogPost *post, KBlog::BlogComment *comment )
void GData::createPost ( KBlog::BlogPost *  post  )  [virtual]

Create a new post on server.

Parameters:
post This is send to the server.
See also:
createdPost( KBlog::BlogPost *post )

Implements KBlog::Blog.

Definition at line 267 of file gdata.cpp.

void KBlog::GData::fetchedProfileId ( const QString &  profileId  )  [signal]

This signal is emitted when the profile id has been fetched.

Parameters:
profileId This is the fetched id. On error it is QString()
See also:
fetchProfileId()
void GData::fetchPost ( KBlog::BlogPost *  post  )  [virtual]

Fetch the Post with a specific id.

Parameters:
post This is the post with its id set correctly.
See also:
BlogPost::setPostId( const QString& )
fetchedPost( KBlog::BlogPost *post )

Implements KBlog::Blog.

Definition at line 182 of file gdata.cpp.

void GData::fetchProfileId (  ) 

Get information about the profile from the blog.

Sets the profileId automatically for the blog it is called from.

See also:
setProfileId( const QString& )
void fetchedProfileId( const QString& )

Definition at line 90 of file gdata.cpp.

QString GData::fullName (  )  const

Returns the full name of user of the blog.

See also:
setFullName()

Definition at line 64 of file gdata.cpp.

QString GData::interfaceName (  )  const [virtual]

Returns the of the inherited object.

Implements KBlog::Blog.

Definition at line 58 of file gdata.cpp.

void GData::listAllComments (  )  [virtual]

List the all comments available for this authentication on the server.

See also:
void listedAllComments( const QList<KBlog::BlogComment>& )

Definition at line 171 of file gdata.cpp.

void GData::listBlogs (  )  [virtual]

List the blogs available for this authentication on the server.

See also:
void listedBlogs( const QList<QMap<QString,QString>>& )

Definition at line 100 of file gdata.cpp.

void GData::listComments ( KBlog::BlogPost *  post  )  [virtual]

List the comments available for this post on the server.

Parameters:
post The post, which posts should be listed.
See also:
void listedComments( KBlog::BlogPost*, const QList<KBlog::BlogComment>& )

Definition at line 157 of file gdata.cpp.

void KBlog::GData::listedAllComments ( const QList< KBlog::BlogComment > &  commentsList  )  [signal]

This signal is emitted when a list of all comments has been fetched from the blogging server.

Parameters:
commentsList The list of comments.
See also:
listAllComments()
void KBlog::GData::listedBlogs ( const QList< QMap< QString, QString > > &  blogsList  )  [signal]

This signal is emitted when a list of blogs has been fetched from the blogging server.

Parameters:
blogsList The list of blogs.
See also:
listBlogs()
void KBlog::GData::listedComments ( KBlog::BlogPost *  post,
const QList< KBlog::BlogComment > &  comments 
) [signal]

This signal is emitted when a list of comments has been fetched from the blogging server.

Parameters:
post This is the corresponding post.
comments The list of comments.
See also:
listComments( KBlog::BlogPost* )
void GData::listRecentPosts ( const QStringList &  label = QStringList(),
int  number = 0,
const KDateTime &  upMinTime = KDateTime(),
const KDateTime &  upMaxTime = KDateTime(),
const KDateTime &  pubMinTime = KDateTime(),
const KDateTime &  pubMaxTime = KDateTime() 
) [virtual]

List recent posts on the server depending on meta information about the post.

Parameters:
label The lables of posts to fetch.
number The number of posts to fetch. The order is newest first.
upMinTime The oldest upload time of the posts to fetch.
upMaxTime The newest upload time of the posts to fetch.
pubMinTime The oldest publication time of the posts to fetch.
pubMaxTime The newest publication time of the posts to fetch.
See also:
void listedPosts( const QList<KBlog::BlogPost>& )
void fetchPost( KBlog::BlogPost* )

Definition at line 111 of file gdata.cpp.

void GData::listRecentPosts ( int  number  )  [virtual]

List recent posts on the server.

The status of the posts will be Fetched.

Parameters:
number The number of posts to fetch. The order is newest first.
See also:
void listedPosts( const QList<KBlog::BlogPost>& )
void fetchPost( KBlog::BlogPost* )
BlogPost::Status

Implements KBlog::Blog.

Definition at line 151 of file gdata.cpp.

void GData::modifyPost ( KBlog::BlogPost *  post  )  [virtual]

Modify a post on server.

Parameters:
post This is used to send the modified post including the correct id.

Implements KBlog::Blog.

Definition at line 202 of file gdata.cpp.

QString GData::profileId (  )  const

Returns the profile id of the blog.

This is used for rss paths internally.

Returns:
The profile id.
See also:
setProfileId( const QString& )

Definition at line 77 of file gdata.cpp.

void GData::removeComment ( KBlog::BlogPost *  post,
KBlog::BlogComment *  comment 
) [virtual]

Remove a comment from the server.

Parameters:
post This is the post with its id set correctly.
comment This is the comment to remove.
See also:
BlogPost::setPostId( const QString& )
removedComment( KBlog::BlogPost*, KBlog::BlogComment* )

Definition at line 420 of file gdata.cpp.

void KBlog::GData::removedComment ( const KBlog::BlogPost *  post,
const KBlog::BlogComment *  comment 
) [signal]

This signal is emitted when a comment has been removed from the blogging server.

Parameters:
post This is the corresponding post.
comment This is the removed comment.
See also:
removeComment( KBlog::BlogPost *post, KBlog::BlogComment *comment )
void GData::removePost ( KBlog::BlogPost *  post  )  [virtual]

Remove a post from the server.

Parameters:
post This is the post with its id set correctly.
See also:
BlogPost::setPostId( const QString& )
removedPost( KBlog::BlogPost* )

Implements KBlog::Blog.

Definition at line 327 of file gdata.cpp.

void GData::setFullName ( const QString &  fullName  )  [virtual]

Sets the user's name for the blog.

Username is only the E-Mail address of the user. This is used in createPost and modifyPost.

Parameters:
fullName is a QString containing the blog username.
See also:
username()
createPost( KBlog::BlogPost* )
modifiyPost( KBlog::BlogPost* )

Definition at line 70 of file gdata.cpp.

void GData::setProfileId ( const QString &  pid  )  [virtual]

Get the profile's id of the blog.

Parameters:
pid This is nummeric id.
See also:
profileId()

Definition at line 83 of file gdata.cpp.


The documentation for this class was generated from the following files:
  • gdata.h
  • gdata.cpp

KBlog Client Library

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal