• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

blogilo

  • sources
  • kde-4.14
  • kdepim
  • blogilo
  • src
backend.h
Go to the documentation of this file.
1 /*
2  This file is part of Blogilo, A KDE Blogging Client
3 
4  Copyright (C) 2008-2010 Mehrdad Momeny <mehrdad.momeny@gmail.com>
5  Copyright (C) 2008-2010 Golnaz Nilieh <g382nilieh@gmail.com>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License or (at your option) version 3 or any later version
11  accepted by the membership of KDE e.V. (or its successor approved
12  by the membership of KDE e.V.), which shall act as a proxy
13  defined in Section 14 of version 3 of the license.
14 
15 
16  This program is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with this program; if not, see http://www.gnu.org/licenses/
23 */
24 
25 #ifndef BACKEND_H
26 #define BACKEND_H
27 
28 #include "category.h"
29 #include "bilbopost.h"
30 
31 #include <kblog/blog.h>
32 
33 #include <QObject>
34 #include <QMap>
35 
36 
37 class BilboMedia;
45 class Backend : public QObject
46 {
47  Q_OBJECT
48 public:
49  explicit Backend( int blog_id, QObject* parent = 0 );
50 
51  ~Backend();
52 
59  void getCategoryListFromServer();
60 
65  void getEntriesListFromServer( int count );
66 
71  void publishPost( BilboPost *post );
72 
77  void uploadMedia( BilboMedia *media );
78 
84  void modifyPost( BilboPost* post );
85 
90  void removePost( BilboPost *post );
91 
92 // void setPostCategories( const QString postId, const QMap<QString, bool> &categoriesList );
93 
102  void fetchPost( BilboPost *post );
103 
104 protected Q_SLOTS:
105  void categoriesListed( const QList< QMap< QString, QString > > & categories );
106  void entriesListed( const QList< KBlog::BlogPost > &posts );
107  void postPublished( KBlog::BlogPost *post );
108  void mediaUploaded( KBlog::BlogMedia *media );
109  void error( KBlog::Blog::ErrorType type, const QString &errorMessage );
110  void slotMediaError( KBlog::Blog::ErrorType type, const QString &errorMessage, KBlog::BlogMedia *media );
111 // void postCategoriesSetted( const QString &postId );
112  void slotPostRemoved( KBlog::BlogPost *post );
113  void slotPostFetched( KBlog::BlogPost *post );
117  void savePostInDbAndEmitResult( KBlog::BlogPost *post );
118 
119  void bloggerAuthenticated( const QMap<QString,QString>& authData );
120 
121 Q_SIGNALS:
126  void sigCategoryListFetched( int blog_id );
127 
132  void sigEntriesListFetched( int blog_id );
133 
139  void sigPostPublished( int blog_id, BilboPost *post );
140 
145  void sigMediaUploaded( BilboMedia *media );
146 
150  void sigPostRemoved( int blog_id, const BilboPost &post);
151 
152  void sigPostFetched( BilboPost *post );
153 
159  void sigError( const QString &errorMessage );
160 
161  void sigMediaError( const QString &errorMessage, BilboMedia* media );
162 
163 private:
164  KBlog::BlogPost* preparePost( KBlog::BlogPost* post );
165  QString errorTypeToString( KBlog::Blog::ErrorType type );
166 
167  class Private;
168  Private * const d;
169 };
170 
171 #endif
Backend::postPublished
void postPublished(KBlog::BlogPost *post)
Definition: backend.cpp:174
category.h
Backend::slotPostFetched
void slotPostFetched(KBlog::BlogPost *post)
Definition: backend.cpp:341
QMap< QString, QString >
Backend::publishPost
void publishPost(BilboPost *post)
Use this to publish a post to server.
Definition: backend.cpp:159
Backend::sigCategoryListFetched
void sigCategoryListFetched(int blog_id)
emit when a categoriesListed() Done and Categories added to DB
BilboPost
Definition of a blog post! it's implemented to decrease dependency to KBlog :)
Definition: bilbopost.h:41
Backend::sigError
void sigError(const QString &errorMessage)
this signal emitted when an error occurred on current transaction.
Backend::sigMediaError
void sigMediaError(const QString &errorMessage, BilboMedia *media)
bilbopost.h
Backend::error
void error(KBlog::Blog::ErrorType type, const QString &errorMessage)
Definition: backend.cpp:347
Backend::bloggerAuthenticated
void bloggerAuthenticated(const QMap< QString, QString > &authData)
Definition: backend.cpp:486
Backend::fetchPost
void fetchPost(BilboPost *post)
Fetch a blog post from the server with a specific ID.
Definition: backend.cpp:333
Backend::slotPostRemoved
void slotPostRemoved(KBlog::BlogPost *post)
Definition: backend.cpp:321
Backend::sigEntriesListFetched
void sigEntriesListFetched(int blog_id)
emit when a entriesListed() Done and Entries added to DB
Backend::removePost
void removePost(BilboPost *post)
Remove an existing post from server.
Definition: backend.cpp:311
QObject
Backend::sigPostFetched
void sigPostFetched(BilboPost *post)
QString
QList
Backend::mediaUploaded
void mediaUploaded(KBlog::BlogMedia *media)
Definition: backend.cpp:264
Backend::modifyPost
void modifyPost(BilboPost *post)
Modify an existing post.
Definition: backend.cpp:301
Backend::getEntriesListFromServer
void getEntriesListFromServer(int count)
retrieve latest posts from server
Definition: backend.cpp:133
Backend::uploadMedia
void uploadMedia(BilboMedia *media)
Upload a new Media object e.g.
Definition: backend.cpp:191
Backend
Engine of application.
Definition: backend.h:45
BilboMedia
Definition: bilbomedia.h:38
Backend::slotMediaError
void slotMediaError(KBlog::Blog::ErrorType type, const QString &errorMessage, KBlog::BlogMedia *media)
Definition: backend.cpp:357
Backend::getCategoryListFromServer
void getCategoryListFromServer()
Request to Fetch categories list from server.
Definition: backend.cpp:92
Backend::savePostInDbAndEmitResult
void savePostInDbAndEmitResult(KBlog::BlogPost *post)
This function is called after a post published fine, to insert it to DB and emit sigPostPublished.
Definition: backend.cpp:394
Backend::sigMediaUploaded
void sigMediaUploaded(BilboMedia *media)
This signal is emitted when a media has been uploaded to the server.
Backend::sigPostRemoved
void sigPostRemoved(int blog_id, const BilboPost &post)
this signal is emitted when a post removed successfully.
QObject::parent
QObject * parent() const
Backend::entriesListed
void entriesListed(const QList< KBlog::BlogPost > &posts)
Definition: backend.cpp:141
Backend::Backend
Backend(int blog_id, QObject *parent=0)
Definition: backend.cpp:62
Backend::~Backend
~Backend()
Definition: backend.cpp:86
Backend::sigPostPublished
void sigPostPublished(int blog_id, BilboPost *post)
This signal is emitted when a post published/modified and added/edited to Database.
Backend::categoriesListed
void categoriesListed(const QList< QMap< QString, QString > > &categories)
Definition: backend.cpp:107
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:16 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

blogilo

Skip menu "blogilo"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal