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 slotFetchProfileIdData( KIO::Job *, const QByteArray & ) )
00306 Q_PRIVATE_SLOT( d_func(),
00307 void slotListBlogs( Syndication::Loader *,
00308 Syndication::FeedPtr, Syndication::ErrorCode ) )
00309 Q_PRIVATE_SLOT( d_func(),
00310 void slotListComments( Syndication::Loader *,
00311 Syndication::FeedPtr, Syndication::ErrorCode ) )
00312 Q_PRIVATE_SLOT( d_func(),
00313 void slotListAllComments( Syndication::Loader *,
00314 Syndication::FeedPtr, Syndication::ErrorCode ) )
00315 Q_PRIVATE_SLOT( d_func(),
00316 void slotListRecentPosts( Syndication::Loader *,
00317 Syndication::FeedPtr, Syndication::ErrorCode ) )
00318 Q_PRIVATE_SLOT( d_func(),
00319 void slotFetchPost( Syndication::Loader *,
00320 Syndication::FeedPtr, Syndication::ErrorCode ) )
00321 Q_PRIVATE_SLOT( d_func(),
00322 void slotCreatePost( KJob * ) )
00323 Q_PRIVATE_SLOT( d_func(),
00324 void slotCreatePostData( KIO::Job *, const QByteArray & ) )
00325 Q_PRIVATE_SLOT( d_func(),
00326 void slotModifyPost( KJob * ) )
00327 Q_PRIVATE_SLOT( d_func(),
00328 void slotModifyPostData( KIO::Job *, const QByteArray & ) )
00329 Q_PRIVATE_SLOT( d_func(),
00330 void slotRemovePost( KJob * ) )
00331 Q_PRIVATE_SLOT( d_func(),
00332 void slotRemovePostData( KIO::Job *, const QByteArray & ) )
00333 Q_PRIVATE_SLOT( d_func(),
00334 void slotCreateComment( KJob * ) )
00335 Q_PRIVATE_SLOT( d_func(),
00336 void slotCreateCommentData( KIO::Job *, const QByteArray & ) )
00337 Q_PRIVATE_SLOT( d_func(),
00338 void slotRemoveComment( KJob * ) )
00339 Q_PRIVATE_SLOT( d_func(),
00340 void slotRemoveCommentData( KIO::Job *, const QByteArray & ) )
00341 };
00342
00343 }
00344 #endif