ginebra2/items/FamiliarItems.h
changeset 3 0954f5dd2cd0
parent 1 b0dd75e285d2
child 4 d5cdb6bc139d
equal deleted inserted replaced
1:b0dd75e285d2 3:0954f5dd2cd0
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __gva_familiaritems_h__
       
    19 #define __gva_familiaritems_h__
       
    20 
       
    21 #include <QSqlDatabase>
       
    22 #include <QSqlQuery>
       
    23 
       
    24 namespace GVA 
       
    25 {
       
    26 
       
    27   class FamiliarItems 
       
    28   {
       
    29   public:
       
    30 
       
    31     enum ItemTag{
       
    32       Bookmark = 0x01,
       
    33       History = 0x02,
       
    34       BackForward = 0x04,
       
    35       Window = 0x08
       
    36     };
       
    37 
       
    38     struct Item {
       
    39       QString url;
       
    40       QString title;
       
    41       QString thumbnail;
       
    42       ItemTag tags;
       
    43     };
       
    44     
       
    45     FamiliarItems();
       
    46     ~FamiliarItems();
       
    47     void updateItem(const Item &);
       
    48     Item item(const QString url);
       
    49     QString thumbnail(const QString url);
       
    50     QString title(const QString url);
       
    51     ItemTag tag(const QString url);
       
    52   private:
       
    53     QSqlDatabase m_db;
       
    54   };
       
    55 }
       
    56 #endif