1/*
2 This file is part of the kblog library.
3
4 Copyright (c) 2007 Christian Weilbach <christian_weilbach@web.de>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
21
22#ifndef KBLOG_GDATA_P_H
23#define KBLOG_GDATA_P_H
24
25#include "gdata.h"
26#include "blog_p.h"
27
28#include <syndication/loader.h>
29
30class KJob;
31class QDateTime;
32class QByteArray;
33template <class T,class S>class QMap;
34
35namespace KIO
36{
37 class Job;
38}
39
40namespace KBlog {
41
42class GDataPrivate : public BlogPrivate
43{
44 public:
45 QString mAuthenticationString;
46 QDateTime mAuthenticationTime;
47 QMap<KJob *,KBlog::BlogPost*> mCreatePostMap;
48 QMap<KJob *,QMap<KBlog::BlogPost *,KBlog::BlogComment *> > mCreateCommentMap;
49 QMap<KJob *,QMap<KBlog::BlogPost *,KBlog::BlogComment *> > mRemoveCommentMap;
50 QMap<KJob *,KBlog::BlogPost *> mModifyPostMap;
51 QMap<KJob *,KBlog::BlogPost *> mRemovePostMap;
52 QMap<Syndication::Loader *,KBlog::BlogPost *> mFetchPostMap;
53 QMap<Syndication::Loader *,KBlog::BlogPost *> mListCommentsMap;
54 QMap<Syndication::Loader *,int> mListRecentPostsMap;
55 QString mFullName;
56 QString mProfileId;
57 GDataPrivate();
58 ~GDataPrivate();
59 bool authenticate();
60 virtual void slotFetchProfileId( KJob * );
61 virtual void slotListBlogs( Syndication::Loader *,
62 Syndication::FeedPtr, Syndication::ErrorCode );
63 virtual void slotListComments( Syndication::Loader *,
64 Syndication::FeedPtr, Syndication::ErrorCode );
65 virtual void slotListAllComments( Syndication::Loader *,
66 Syndication::FeedPtr, Syndication::ErrorCode );
67 virtual void slotListRecentPosts( Syndication::Loader *,
68 Syndication::FeedPtr, Syndication::ErrorCode );
69 virtual void slotFetchPost( Syndication::Loader *,
70 Syndication::FeedPtr, Syndication::ErrorCode );
71 virtual void slotCreatePost( KJob * );
72 virtual void slotModifyPost( KJob * );
73 virtual void slotRemovePost( KJob * );
74 virtual void slotCreateComment( KJob * );
75 virtual void slotRemoveComment( KJob * );
76 Q_DECLARE_PUBLIC( GData )
77};
78
79}
80#endif
81