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
00069 class KBLOG_EXPORT GData : public Blog
00070 {
00071 Q_OBJECT
00072 public:
00078 explicit GData( const KUrl &server, QObject *parent = 0 );
00079
00083 ~GData();
00084
00094 virtual void setFullName( const QString &fullName );
00095
00100 QString fullName() const;
00101
00108 QString profileId() const;
00109
00116 virtual void setProfileId( const QString &pid );
00117
00121 QString interfaceName() const;
00122
00130 void fetchProfileId();
00131
00137 virtual void listBlogs();
00138
00145 virtual void listComments( KBlog::BlogPost *post );
00146
00152 virtual void listAllComments();
00153
00162 void listRecentPosts( int number );
00163
00176 virtual void listRecentPosts( const QStringList &label=QStringList(), int number=0,
00177 const KDateTime &upMinTime=KDateTime(),
00178 const KDateTime &upMaxTime=KDateTime(),
00179 const KDateTime &pubMinTime=KDateTime(),
00180 const KDateTime &pubMaxTime=KDateTime() );
00181
00189 void fetchPost( KBlog::BlogPost *post );
00190
00195 void modifyPost( KBlog::BlogPost *post );
00196
00203 void createPost( KBlog::BlogPost *post );
00204
00212 void removePost( KBlog::BlogPost *post );
00213
00222 virtual void createComment( KBlog::BlogPost *post, KBlog::BlogComment *comment );
00223
00232 virtual void removeComment( KBlog::BlogPost *post, KBlog::BlogComment *comment );
00233
00234 Q_SIGNALS:
00235
00243 void listedBlogs( const QList<QMap<QString,QString> >& blogsList );
00244
00252 void listedAllComments( const QList<KBlog::BlogComment> &commentsList );
00253
00262 void listedComments( KBlog::BlogPost *post, const QList<KBlog::BlogComment> &comments );
00263
00272 void createdComment( const KBlog::BlogPost *post, const KBlog::BlogComment *comment );
00273
00282 void removedComment( const KBlog::BlogPost *post, const KBlog::BlogComment *comment );
00283
00291 void fetchedProfileId( const QString &profileId );
00292
00293 protected:
00297 GData( const KUrl &server, GDataPrivate &dd, QObject *parent = 0 );
00298
00299 private:
00300 Q_DECLARE_PRIVATE( GData )
00301 Q_PRIVATE_SLOT( d_func(),
00302 void slotFetchProfileId( KJob * ) )
00303 Q_PRIVATE_SLOT( d_func(),
00304 void slotFetchProfileIdData( KIO::Job *, const QByteArray & ) )
00305 Q_PRIVATE_SLOT( d_func(),
00306 void slotListBlogs( Syndication::Loader *,
00307 Syndication::FeedPtr, Syndication::ErrorCode ) )
00308 Q_PRIVATE_SLOT( d_func(),
00309 void slotListComments( Syndication::Loader *,
00310 Syndication::FeedPtr, Syndication::ErrorCode ) )
00311 Q_PRIVATE_SLOT( d_func(),
00312 void slotListAllComments( Syndication::Loader *,
00313 Syndication::FeedPtr, Syndication::ErrorCode ) )
00314 Q_PRIVATE_SLOT( d_func(),
00315 void slotListRecentPosts( Syndication::Loader *,
00316 Syndication::FeedPtr, Syndication::ErrorCode ) )
00317 Q_PRIVATE_SLOT( d_func(),
00318 void slotFetchPost( Syndication::Loader *,
00319 Syndication::FeedPtr, Syndication::ErrorCode ) )
00320 Q_PRIVATE_SLOT( d_func(),
00321 void slotCreatePost( KJob * ) )
00322 Q_PRIVATE_SLOT( d_func(),
00323 void slotCreatePostData( KIO::Job *, const QByteArray & ) )
00324 Q_PRIVATE_SLOT( d_func(),
00325 void slotModifyPost( KJob * ) )
00326 Q_PRIVATE_SLOT( d_func(),
00327 void slotModifyPostData( KIO::Job *, const QByteArray & ) )
00328 Q_PRIVATE_SLOT( d_func(),
00329 void slotRemovePost( KJob * ) )
00330 Q_PRIVATE_SLOT( d_func(),
00331 void slotRemovePostData( KIO::Job *, const QByteArray & ) )
00332 Q_PRIVATE_SLOT( d_func(),
00333 void slotCreateComment( KJob * ) )
00334 Q_PRIVATE_SLOT( d_func(),
00335 void slotCreateCommentData( KIO::Job *, const QByteArray & ) )
00336 Q_PRIVATE_SLOT( d_func(),
00337 void slotRemoveComment( KJob * ) )
00338 Q_PRIVATE_SLOT( d_func(),
00339 void slotRemoveCommentData( KIO::Job *, const QByteArray & ) )
00340 };
00341
00342 }
00343 #endif