radioapp/radiopresetstorage/inc/radiopresetstorage.h
branchRCL_3
changeset 19 cce62ebc198e
equal deleted inserted replaced
18:1a6714c53019 19:cce62ebc198e
       
     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_H_
       
    19 #define RADIOPRESETSTORAGE_H_
       
    20 
       
    21 // System includes
       
    22 #include <QtGlobal>
       
    23 #include <QList>
       
    24 #include <QScopedPointer>
       
    25 
       
    26 #include "radiopresetstorageexport.h"
       
    27 
       
    28 // Forward declarations
       
    29 class RadioStationIf;
       
    30 class RadioPresetStoragePrivate;
       
    31 
       
    32 class STORAGE_DLL_EXPORT RadioPresetStorage
       
    33 {
       
    34     Q_DECLARE_PRIVATE_D( d_ptr.data(), RadioPresetStorage )
       
    35     Q_DISABLE_COPY( RadioPresetStorage )
       
    36 
       
    37 public:
       
    38 
       
    39     RadioPresetStorage();
       
    40     ~RadioPresetStorage();
       
    41 
       
    42     int maxNumberOfPresets() const;
       
    43     int presetCount() const;
       
    44     int firstPreset() const;
       
    45     int nextPreset( int fromIndex ) const;
       
    46     bool deletePreset( int presetIndex );
       
    47     bool savePreset( const RadioStationIf& station );
       
    48     bool readPreset( int index, RadioStationIf& station );
       
    49     void readFrequencies( QList<uint>& frequencyList );
       
    50 
       
    51 private: // data
       
    52 
       
    53     /**
       
    54      * Unmodifiable pointer to the private implementation
       
    55      */
       
    56     const QScopedPointer<RadioPresetStoragePrivate> d_ptr;
       
    57 
       
    58 };
       
    59 
       
    60 #endif // RADIOPRESETSTORAGE_H_