KBlog

blogger1.h
Go to the documentation of this file.
1 /*
2  This file is part of the kblog library.
3 
4  Copyright (c) 2004 Reinhold Kainhofer <[email protected]>
5  Copyright (c) 2006-2007 Christian Weilbach <[email protected]>
6  Copyright (c) 2007 Mike McQuaid <[email protected]>
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public
10  License as published by the Free Software Foundation; either
11  version 2 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
18  You should have received a copy of the GNU Library General Public License
19  along with this library; see the file COPYING.LIB. If not, write to
20  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  Boston, MA 02110-1301, USA.
22 */
23 
24 #ifndef KBLOG_BLOGGER1_H
25 #define KBLOG_BLOGGER1_H
26 
27 #include <blog.h>
28 
29 class QUrl;
30 
40 namespace KBlog
41 {
42 
43 class Blogger1Private;
44 
66 class KBLOG_EXPORT Blogger1 : public Blog
67 {
68  Q_OBJECT
69 public:
76  explicit Blogger1(const QUrl &server, QObject *parent = nullptr);
77 
81  virtual ~Blogger1();
82 
86  QString interfaceName() const override;
87 
93  void setUrl(const QUrl &server) override;
94 
100  virtual void fetchUserInfo();
101 
106  virtual void listBlogs();
107 
117  void listRecentPosts(int number) override;
118 
128  void fetchPost(KBlog::BlogPost *post) override;
129 
138  void modifyPost(KBlog::BlogPost *post) override;
139 
147  void createPost(KBlog::BlogPost *post) override;
148 
158  void removePost(KBlog::BlogPost *post) override;
159 
160 Q_SIGNALS:
161 
171  void listedBlogs(const QList<QMap<QString, QString> > &blogsList);
172 
183  void fetchedUserInfo(const QMap<QString, QString> &userInfo);
184 
185 protected:
189  Blogger1(const QUrl &server, Blogger1Private &dd, QObject *parent = nullptr);
190 
191 private:
192  Q_DECLARE_PRIVATE(Blogger1)
193  Q_PRIVATE_SLOT(d_func(),
194  void slotFetchUserInfo(const QList<QVariant> &, const QVariant &))
195  Q_PRIVATE_SLOT(d_func(),
196  void slotListBlogs(const QList<QVariant> &, const QVariant &))
197  Q_PRIVATE_SLOT(d_func(),
198  void slotListRecentPosts(const QList<QVariant> &, const QVariant &))
199  Q_PRIVATE_SLOT(d_func(),
200  void slotFetchPost(const QList<QVariant> &, const QVariant &))
201  Q_PRIVATE_SLOT(d_func(),
202  void slotCreatePost(const QList<QVariant> &, const QVariant &))
203  Q_PRIVATE_SLOT(d_func(),
204  void slotModifyPost(const QList<QVariant> &, const QVariant &))
205  Q_PRIVATE_SLOT(d_func(),
206  void slotRemovePost(const QList<QVariant> &, const QVariant &))
207  Q_PRIVATE_SLOT(d_func(),
208  void slotError(int, const QString &, const QVariant &))
209 };
210 
211 } //namespace KBlog
212 #endif
Namespace for blog related classes.
Definition: blog.h:53
A class that represents a blog post on the server.
Definition: blogpost.h:65
A class that can be used for access to Blogger 1.0 blogs.
Definition: blogger1.h:66
A class that provides methods to call functions on a supported blog web application.
Definition: blog.h:72
This is the main interface for blogging APIs.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Jun 2 2020 23:08:22 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.