KBlog Client Library
gdata.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KBLOG_GDATA_H
00023 #define KBLOG_GDATA_H
00024
00025 #include <kblog/blog.h>
00026 #include <kdatetime.h>
00027
00028 #include <QtCore/QStringList>
00029
00030 class KUrl;
00031
00043 namespace KBlog {
00044
00045 class GDataPrivate;
00046 class BlogComment;
00047
00070 class KBLOG_EXPORT GData : public Blog
00071 {
00072 Q_OBJECT
00073 public:
00079 explicit GData( const KUrl &server, QObject *parent = 0 );
00080
00084 ~GData();
00085
00095 virtual void setFullName( const QString &fullName );
00096
00101 QString fullName() const;
00102
00109 QString profileId() const;
00110
00117 virtual void setProfileId( const QString &pid );
00118
00122 QString interfaceName() const;
00123
00131 void fetchProfileId();
00132
00138 virtual void listBlogs();
00139
00146 virtual void listComments( KBlog::BlogPost *post );
00147
00153 virtual void listAllComments();
00154
00163 void listRecentPosts( int number );
00164
00177 virtual void listRecentPosts( const QStringList &label=QStringList(), int number=0,
00178 const KDateTime &upMinTime=KDateTime(),
00179 const KDateTime &upMaxTime=KDateTime(),
00180 const KDateTime &pubMinTime=KDateTime(),
00181 const KDateTime &pubMaxTime=KDateTime() );
00182
00190 void fetchPost( KBlog::BlogPost *post );
00191
00196 void modifyPost( KBlog::BlogPost *post );
00197
00204 void createPost( KBlog::BlogPost *post );
00205
00213 void removePost( KBlog::BlogPost *post );
00214
00223 virtual void createComment( KBlog::BlogPost *post, KBlog::BlogComment *comment );
00224
00233 virtual void removeComment( KBlog::BlogPost *post, KBlog::BlogComment *comment );
00234
00235 Q_SIGNALS:
00236
00244 void listedBlogs( const QList<QMap<QString,QString> >& blogsList );
00245
00253 void listedAllComments( const QList<KBlog::BlogComment> &commentsList );
00254
00263 void listedComments( KBlog::BlogPost *post, const QList<KBlog::BlogComment> &comments );
00264
00273 void createdComment( const KBlog::BlogPost *post, const KBlog::BlogComment *comment );
00274
00283 void removedComment( const KBlog::BlogPost *post, const KBlog::BlogComment *comment );
00284
00292 void fetchedProfileId( const QString &profileId );
00293
00294 protected:
00298 GData( const KUrl &server, GDataPrivate &dd, QObject *parent = 0 );
00299
00300 private:
00301 Q_DECLARE_PRIVATE( GData )
00302 Q_PRIVATE_SLOT( d_func(),
00303 void slotFetchProfileId( KJob * ) )
00304 Q_PRIVATE_SLOT( d_func(),
00305 void slotListBlogs( Syndication::Loader *,
00306 Syndication::FeedPtr, Syndication::ErrorCode ) )
00307 Q_PRIVATE_SLOT( d_func(),
00308 void slotListComments( Syndication::Loader *,
00309 Syndication::FeedPtr, Syndication::ErrorCode ) )
00310 Q_PRIVATE_SLOT( d_func(),
00311 void slotListAllComments( Syndication::Loader *,
00312 Syndication::FeedPtr, Syndication::ErrorCode ) )
00313 Q_PRIVATE_SLOT( d_func(),
00314 void slotListRecentPosts( Syndication::Loader *,
00315 Syndication::FeedPtr, Syndication::ErrorCode ) )
00316 Q_PRIVATE_SLOT( d_func(),
00317 void slotFetchPost( Syndication::Loader *,
00318 Syndication::FeedPtr, Syndication::ErrorCode ) )
00319 Q_PRIVATE_SLOT( d_func(),
00320 void slotCreatePost( KJob * ) )
00321 Q_PRIVATE_SLOT( d_func(),
00322 void slotModifyPost( KJob * ) )
00323 Q_PRIVATE_SLOT( d_func(),
00324 void slotRemovePost( KJob * ) )
00325 Q_PRIVATE_SLOT( d_func(),
00326 void slotCreateComment( KJob * ) )
00327 Q_PRIVATE_SLOT( d_func(),
00328 void slotRemoveComment( KJob * ) )
00329 };
00330
00331 }
00332 #endif