/*
 * See the README file for copyright information and how to reach the author.
 *
 */

#ifndef __PVRUSB2_SETUPTOOLS_H
#define __PVRUSB2_SETUPTOOLS_H

enum eItemType
{
    eBoolItem,
    ePercentItem,
    eSliderItem,
    eBigSliderItem,
    eOffsetItem,
    eAudioBitrateItem,
    eVideoBitrateItem,
    eVideoResolutionItem,
    eVideoResolutionHorizontalItem,
    eVideoResolutionVerticalItem,
    eVideoStandardItem,
    eVideoDeviceItem
};

class cRMSetupTools
{
    private:
        static int AudioBitrateValue(int _index);
        static int VideoBitrateValue(int _index);

    public:
        static int NumIndices(eItemType _item);
        static const char* const* Values(eItemType _item);
        static int ClipIndex(eItemType _item, int _index);

        static int Index2Value(eItemType _item, int _index);
        static int Index2Value(eItemType _item, int _index,
                int _minValue, int _maxValue);
        static char* Index2StringValue(eItemType _item, int _index);

        static int Value2Index(eItemType _item, const char* _value);
        static int Value2Index(eItemType _item,
                int _value, int _minValue, int _maxValue);
        static int OffsetValue2Index(eItemType _item,
                int _value, int _center, int _maxOffset);
};

#endif // __PVRUSB2_SETUPTOOLS_H

