blogilo
#include <dbman.h>
|  | 
|  | DBMan () | 
|  | 
|  | ~DBMan () | 
|  | 
| int | addBlog (const BilboBlog &blog) | 
|  | 
| int | addCategory (const QString &name, const QString &description, const QString &htmlUrl, const QString &rssUrl, const QString &categoryId, const QString &parentId, int blog_id) | 
|  | 
| int | addFile (const QString &name, int blog_id, bool isUploaded, const QString &localUrl, const QString &remoteUrl) | 
|  | 
| int | addFile (const BilboMedia &file) | 
|  | 
| int | addFile () | 
|  | 
| int | addPost (const BilboPost &post, int blog_id) | 
|  | 
| BilboBlog * | blog (int blog_id) | 
|  | 
| const QMap< int, BilboBlog * > & | blogList () const | 
|  | 
| bool | clearAuthData (int blog_id) | 
|  | 
| bool | clearCategories (int blog_id) | 
|  | 
| bool | clearFiles (int blog_id) | 
|  | 
| bool | clearPosts (int blog_id) | 
|  | 
| bool | clearTempEntries () | 
|  | 
| bool | editBlog (const BilboBlog &blog) | 
|  | 
| bool | editPost (const BilboPost &post, int blog_id) | 
|  | 
| QMap< QString, QString > | getAuthData (int blog_id) | 
|  | 
| BilboPost | getPostInfo (int post_id) | 
|  | 
| QString | lastErrorText () const | 
|  | 
| QMap< QString, int > | listBlogsTitle () | 
|  | 
| QList< Category > | listCategories (int blog_id) | 
|  | 
| QMap< QString, bool > | listCategoriesId (int blog_id) | 
|  | 
| QMap< QString, int > | listCategoriesName (int blog_id) | 
|  | 
| QList< QVariantMap > | listLocalPosts () | 
|  | 
| QList< BilboPost * > | listPosts (int blog_id) | 
|  | 
| QList< QVariantMap > | listPostsInfo (int blog_id) | 
|  | 
| QMap< int, QString > | listPostsTitle (int blog_id) | 
|  | 
| QMap< BilboPost *, int > | listTempPosts () | 
|  | 
| BilboPost | localPost (int local_id) | 
|  | 
| bool | removeBlog (int blog_id) | 
|  | 
| bool | removeFile (int fileid) | 
|  | 
| bool | removeLocalEntry (const BilboPost &post) | 
|  | 
| bool | removeLocalEntry (int local_id) | 
|  | 
| bool | removePost (int id) | 
|  | 
| bool | removePost (int blog_id, const QString &postId) | 
|  | 
| bool | removeTempEntry (const BilboPost &post) | 
|  | 
| bool | saveAuthData (const QMap< QString, QString > &authData, int blog_id) | 
|  | 
| int | saveLocalEntry (const BilboPost &post, int blog_id) | 
|  | 
| int | saveTempEntry (const BilboPost &post, int blog_id) | 
|  | 
DataBase Manager class. 
this class implement Low level Database operations. and any object of App. have to use this API to store or retrive information and settings from Database.
- Author
- Mehrdad Momeny mehrd.nosp@m.ad.m.nosp@m.omeny.nosp@m.@gma.nosp@m.il.co.nosp@m.m 
- 
Golnaz Nilieh g382n.nosp@m.ilie.nosp@m.h@gma.nosp@m.il.c.nosp@m.om 
Definition at line 45 of file dbman.h.
END. 
(BEGIN) Data Manipulation Functions: Blog: 
Definition at line 373 of file dbman.cpp.
 
 
      
        
          | int DBMan::addFile | ( | const QString & | name, | 
        
          |  |  | int | blog_id, | 
        
          |  |  | bool | isUploaded, | 
        
          |  |  | const QString & | localUrl, | 
        
          |  |  | const QString & | remoteUrl | 
        
          |  | ) |  |  | 
      
 
 
      
        
          | int DBMan::addPost | ( | const BilboPost & | post, | 
        
          |  |  | int | blog_id | 
        
          |  | ) |  |  | 
      
 
Post: 
- Parameters
- 
  
  
- Returns
- return post id in database (deffer with postid) 
Delete previouse Categories (if there are any!) : 
Definition at line 464 of file dbman.cpp.
 
 
      
        
          | bool DBMan::clearAuthData | ( | int | blog_id | ) |  | 
      
 
 
      
        
          | bool DBMan::clearCategories | ( | int | blog_id | ) |  | 
      
 
 
      
        
          | bool DBMan::clearFiles | ( | int | blog_id | ) |  | 
      
 
 
      
        
          | bool DBMan::clearPosts | ( | int | blog_id | ) |  | 
      
 
 
      
        
          | bool DBMan::clearTempEntries | ( |  | ) |  | 
      
 
 
      
        
          | bool DBMan::editBlog | ( | const BilboBlog & | blog | ) |  | 
      
 
 
      
        
          | bool DBMan::editPost | ( | const BilboPost & | post, | 
        
          |  |  | int | blog_id | 
        
          |  | ) |  |  | 
      
 
Delete previouse Categories:
Add new Categories: 
Definition at line 531 of file dbman.cpp.
 
 
      
        
          | QString DBMan::lastErrorText | ( |  | ) | const | 
      
 
 
(BEGIN) Data retrieveing Functions: 
return List of blogs in Database. 
- Returns
Definition at line 1051 of file dbman.cpp.
 
 
      
        
          | QMap< QString, bool > DBMan::listCategoriesId | ( | int | blog_id | ) |  | 
      
 
 
      
        
          | QMap< QString, int > DBMan::listCategoriesName | ( | int | blog_id | ) |  | 
      
 
 
      
        
          | QList< QVariantMap > DBMan::listLocalPosts | ( |  | ) |  | 
      
 
Returns list of locally saved posts. 
Map value (e.g. int) is blog id. 
Definition at line 1363 of file dbman.cpp.
 
 
      
        
          | QList< QVariantMap > DBMan::listPostsInfo | ( | int | blog_id | ) |  | 
      
 
 
      
        
          | QMap< int, QString > DBMan::listPostsTitle | ( | int | blog_id | ) |  | 
      
 
 
Returns list of temporary posts, e.g. 
posts saved intervally or at application quit. Map value (e.g. int) is blog id. 
get Category list: 
Definition at line 1299 of file dbman.cpp.
 
 
      
        
          | bool DBMan::removeBlog | ( | int | blog_id | ) |  | 
      
 
 
      
        
          | bool DBMan::removeFile | ( | int | fileid | ) |  | 
      
 
 
      
        
          | bool DBMan::removeLocalEntry | ( | const BilboPost & | post | ) |  | 
      
 
 
      
        
          | bool DBMan::removeLocalEntry | ( | int | local_id | ) |  | 
      
 
 
      
        
          | bool DBMan::removePost | ( | int | id | ) |  | 
      
 
 
      
        
          | bool DBMan::removePost | ( | int | blog_id, | 
        
          |  |  | const QString & | postId | 
        
          |  | ) |  |  | 
      
 
 
      
        
          | bool DBMan::removeTempEntry | ( | const BilboPost & | post | ) |  | 
      
 
 
      
        
          | int DBMan::saveLocalEntry | ( | const BilboPost & | post, | 
        
          |  |  | int | blog_id | 
        
          |  | ) |  |  | 
      
 
 
      
        
          | int DBMan::saveTempEntry | ( | const BilboPost & | post, | 
        
          |  |  | int | blog_id | 
        
          |  | ) |  |  | 
      
 
 
Retrieve the instance of DataBase Manager. 
The Database manager (DBMan) is a singleton class of which only a single instance will exist. If no manager exists yet this function will create one for you.
- Returns
- the instance of the DBMan 
Definition at line 117 of file dbman.cpp.
 
 
The documentation for this class was generated from the following files:
 
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.