radioapp/radiopresetstorage/inc/radiopresetstorage_win32_p.h
changeset 13 46974bebc798
child 14 63aabac4416d
equal deleted inserted replaced
0:f3d95d9c00ab 13:46974bebc798
       
     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 RADIOPRESETSTORAGE_P_H_
       
    19 #define RADIOPRESETSTORAGE_P_H_
       
    20 
       
    21 
       
    22 #include <qscopedpointer>
       
    23 
       
    24 // User includes
       
    25 #include <qscopedpointer>
       
    26 #include <QByteArray>
       
    27 
       
    28 // Forward declarations
       
    29 class QSettings;
       
    30 class QDataStream;
       
    31 
       
    32 class Preset
       
    33 {
       
    34 public:
       
    35 
       
    36     Preset();
       
    37     ~Preset();
       
    38 
       
    39     void externalize( QDataStream& outStream );
       
    40     void internalize( QDataStream& inStream );
       
    41 
       
    42     uint        mFrequency;
       
    43     QString     mName;
       
    44     bool        mRenamedByUser;
       
    45     int         mGenre;
       
    46     QString     mUrl;
       
    47     int         mPiCode;
       
    48     bool        mFavorite;
       
    49     bool        mLocalStation;
       
    50 
       
    51 };
       
    52 
       
    53 class RadioPresetStoragePrivate
       
    54 {
       
    55 public:
       
    56 
       
    57     RadioPresetStoragePrivate();
       
    58     ~RadioPresetStoragePrivate();
       
    59 
       
    60     bool init();
       
    61 
       
    62     void readBookKeeping();
       
    63     void saveBookKeeping();
       
    64 
       
    65     void removeIndex( int index );
       
    66     void addIndex( int index );
       
    67 
       
    68     QScopedPointer<QSettings>   mSettings;
       
    69     QByteArray                  mBookKeeping;
       
    70 
       
    71 };
       
    72 
       
    73 #endif // RADIOPRESETSTORAGE_P_H_