qtinternetradio/irqfavoritesdb/inc/irqfavoritesdb_p.h
changeset 3 ee64f059b8e1
child 8 3b03c28289e6
equal deleted inserted replaced
2:2e1adbfc62af 3:ee64f059b8e1
       
     1 /*
       
     2 * Copyright (c) 2009 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 IRQFAVORITESDB_P_H
       
    19 #define IRQFAVORITESDB_P_H
       
    20 
       
    21 #include <QObject>
       
    22 #include <pspresetobserver.h>
       
    23 
       
    24 class CIRFavoritesDb;
       
    25 class IRQPreset;
       
    26 class IRQFavoritesDB;
       
    27 
       
    28 class IRQFavoritesDBPrivate : public MPSPresetObserver
       
    29 {
       
    30 public:
       
    31     IRQFavoritesDBPrivate(IRQFavoritesDB *aIRQFavorites);
       
    32     
       
    33     ~IRQFavoritesDBPrivate();
       
    34     
       
    35     void init();
       
    36     
       
    37     int addPreset(const IRQPreset& aPreset);
       
    38     
       
    39     int addPreset(const QString& aName, const QString& aURL);
       
    40     
       
    41     int getUniqId(int aNum) const;
       
    42             
       
    43     int deletePreset(int aUniqId);
       
    44     
       
    45     int searchPreset(int aUniqPresetId, int aIsdsPresetId);
       
    46     
       
    47     int getPreviousPreset(int aIndex);
       
    48     
       
    49     int getNextPreset(int aIndex); 
       
    50     
       
    51     int replacePreset(const IRQPreset& aNewPreset);
       
    52     
       
    53     int replaceUserDefinedPreset(const IRQPreset& aNewPreset);
       
    54     
       
    55     int makePresetUserDefined(int aChannelId, int aUserDefinedChannelId);
       
    56     
       
    57     int emptyPresetCount() const;
       
    58     
       
    59     int maxPresetCount();
       
    60     
       
    61     void setMoveStatus(bool aStatus);
       
    62     
       
    63     bool getMoveStatus();
       
    64     
       
    65     QList<IRQPreset*>* getPresets() const;
       
    66     
       
    67     void increasePlayedTimes(const IRQPreset &aPreset);
       
    68     
       
    69 private:
       
    70     /* from MPSPresetObserver */
       
    71     void HandlePresetChangedL(TInt aId, TUid aDataHandler, MPSPresetObserver::TPSReason aType);
       
    72     
       
    73     void addPresetL(const IRQPreset& aPreset, int& aRetValue);
       
    74     
       
    75     void replacePresetL(const IRQPreset& aNewPreset);
       
    76         
       
    77     void replaceUserDefinedPresetL(const IRQPreset& aNewPreset);
       
    78         
       
    79     void increasePlayedTimesL(const IRQPreset &aPreset);
       
    80     
       
    81 private:
       
    82     IRQFavoritesDB * const q_ptr;
       
    83     CIRFavoritesDb *mIRFavoritesDb;
       
    84 };
       
    85 
       
    86 #endif  //IRQFAVORITESDB_P_H