// -*- c++ -*-

/*
 *
 * Copyright (C) 2002 George Staikos <staikos@kde.org>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */


#ifndef _V4LDEVTUNER_H
#define _V4LDEVTUNER_H

#include "v4ldev.h"

/**
 * Interface for Video4Linux tuners.
 *
 * @version $Id: v4ldevtuner.h,v 1.8 2002/11/13 01:05:30 staikos Exp $
 */
class V4LTuner : public V4LDev
{
    friend class V4LDev;

public:
    ~V4LTuner();

    virtual int setSource(const QString &source);

    virtual int setFreq(unsigned long freq);
    virtual unsigned long freq() const;
    virtual unsigned long minFreq() const { return _minFreq; }
    virtual unsigned long maxFreq() const { return _maxFreq; }

    virtual int signal() const;

    virtual int setTunerMode(int x);
    virtual int tunerMode() const;

    virtual bool isTuner() const;
    virtual bool canOverlay() const;

    virtual int setImageSize(int w, int h = -1);

protected:
    V4LTuner(int fd, const QString &name, int channels, int type, int minw, int minh, int maxw, int maxh);

private:
    struct video_tuner _vt;
    unsigned long _minFreq, _maxFreq;
    bool _disableOverlay;
    int _tunerNum;
};



#endif

