KBlog

livejournal.h
Go to the documentation of this file.
1 /*
2  This file is part of the kblog library.
3 
4  SPDX-FileCopyrightText: 2007 Mike McQuaid <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #ifndef KBLOG_LIVEJOURNAL_H
10 #define KBLOG_LIVEJOURNAL_H
11 
12 #include <blog.h>
13 
14 #include <QColor>
15 
16 class QUrl;
17 
25 namespace KBlog
26 {
27 
28 class LiveJournalPrivate;
29 
45 class KBLOG_EXPORT LiveJournal : public Blog
46 {
47  Q_OBJECT
48 public:
55  explicit LiveJournal(const QUrl &server, QObject *parent = nullptr);
56 
60  virtual ~LiveJournal();
61 
62  virtual void addFriend(const QString &username, int group,
63  const QColor &fgcolor = QColor(0, 0, 0),
64  const QColor &bgcolor = QColor(255, 255, 255));
65 
66  virtual void assignFriendToCategory(const QString &username, int category);
67 
73  void createPost(KBlog::BlogPost *post);
74 
75  virtual void deleteFriend(const QString &username);
76 
83  void fetchPost(KBlog::BlogPost *post);
84 
85  virtual void fetchUserInfo();
86 
87  QString fullName() const;
88 
92  QString interfaceName() const;
93 
94  void listCategories();
95 
96  virtual void listFriends();
97 
98  virtual void listFriendsOf();
99 
100  virtual void listMoods();
101 
102  virtual void listPictureKeywords();
103 
110  void listRecentPosts(int number);
111 
118  void modifyPost(KBlog::BlogPost *post);
119 
120  void removePost(KBlog::BlogPost *post);
126  void setUrl(const QUrl &server);
127 
128  QString serverMessage() const;
129 
130  QString userId() const;
131 
132 Q_SIGNALS:
133  void addedFriend();
134  void assignedFriendToCategory();
135  void deletedFriend();
136  void expiredCookie();
137  void expiredAllCookies();
138  void generatedCookie(const QString &cookie);
139  void listedCategories(const QMap<QString, QString> &categories);
140  void listedFriends(const QMap<QString, QMap<QString, QString> > &friends);
141  void listedFriendsOf(const QMap<QString,
142  QMap<QString, QString> > &friendsOf);
143  void listedMoods(const QMap<int, QString> &moods);
144  void listedPictureKeywords(const QMap<QString, QUrl> &pictureKeywords);
145  void fetchedUserInfo();
146 
147 protected:
148  LiveJournal(const QUrl &server, LiveJournalPrivate &dd, QObject *parent = nullptr);
149 
150 private:
151  Q_DECLARE_PRIVATE(LiveJournal)
152  Q_PRIVATE_SLOT(d_func(),
153  void slotAddFriend(const QList<QVariant> &, const QVariant &))
154  Q_PRIVATE_SLOT(d_func(),
155  void slotAssignFriendToCategory(const QList<QVariant> &, const QVariant &))
156  Q_PRIVATE_SLOT(d_func(),
157  void slotCreatePost(const QList<QVariant> &, const QVariant &))
158  Q_PRIVATE_SLOT(d_func(),
159  void slotDeleteFriend(const QList<QVariant> &, const QVariant &))
160 // Q_PRIVATE_SLOT( d_func(),
161 // void slotExpireCookie( const QList<QVariant> &, const QVariant & ) )
162  Q_PRIVATE_SLOT(d_func(),
163  void slotFetchPost(const QList<QVariant> &, const QVariant &))
164  Q_PRIVATE_SLOT(d_func(),
165  void slotFetchUserInfo(const QList<QVariant> &, const QVariant &))
166 // Q_PRIVATE_SLOT( d_func(),
167 // void slotGenerateCookie( const QList<QVariant> &, const QVariant & ) )
168  Q_PRIVATE_SLOT(d_func(),
169  void slotListCategories(const QList<QVariant> &, const QVariant &))
170  Q_PRIVATE_SLOT(d_func(),
171  void slotListFriends(const QList<QVariant> &, const QVariant &))
172  Q_PRIVATE_SLOT(d_func(),
173  void slotListFriendsOf(const QList<QVariant> &, const QVariant &))
174  Q_PRIVATE_SLOT(d_func(),
175  void slotListMoods(const QList<QVariant> &, const QVariant &))
176  Q_PRIVATE_SLOT(d_func(),
177  void slotListPictureKeywords(const QList<QVariant> &, const QVariant &))
178  Q_PRIVATE_SLOT(d_func(),
179  void slotListRecentPosts(const QList<QVariant> &, const QVariant &))
180  Q_PRIVATE_SLOT(d_func(),
181  void slotModifyPost(const QList<QVariant> &, const QVariant &))
182  Q_PRIVATE_SLOT(d_func(),
183  void slotRemovePost(const QList<QVariant> &, const QVariant &))
184  Q_PRIVATE_SLOT(d_func(),
185  void slotError(int, const QString &, const QVariant &))
186 };
187 // Q_DECLARE_OPERATORS_FOR_FLAGS( LiveJournal::GenerateCookieOptions )
188 
189 } //namespace KBlog
190 #endif
A class that can be used for access to Movable Type blogs.
Definition: livejournal.h:45
Namespace for blog related classes.
Definition: blog.h:40
A class that represents a blog post on the server.
Definition: blogpost.h:52
A class that provides methods to call functions on a supported blog web application.
Definition: blog.h:59
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 Jul 14 2020 23:13:47 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.