summaryrefslogtreecommitdiffstats
path: root/src/controllers/controllerenumerator.h
blob: b94c538389391217381ae2989d80f3a6e74be001 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* @file controllerenumerator.h
* @author Sean Pappalardo spappalardo@mixxx.org
* @date Sat Apr 30 2011
* @brief Base class handling discovery and enumeration of DJ controllers.
*
* This class handles discovery and enumeration of DJ controllers and
*   must be inherited by a class that implements it on some API.
*/

#ifndef CONTROLLERENUMERATOR_H
#define CONTROLLERENUMERATOR_H

#include "controllers/controller.h"

class ControllerEnumerator : public QObject {
    Q_OBJECT
  public:
    ControllerEnumerator();
    // In this function, the inheriting class must delete the Controllers it
    // creates
    virtual ~ControllerEnumerator();

    virtual QList<Controller*> queryDevices() = 0;

    // Sub-classes return true here if their devices must be polled to get data
    // from the controller.
    virtual bool needPolling() {
        return false;
    }
};

#endif