Don't reuse file names
[harmattan/cameraplus] / lib / qtcamconfig.h
1 // -*- c++ -*-
2
3 /*!
4  * This file is part of CameraPlus.
5  *
6  * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21  */
22
23 #ifndef QT_CAM_CONFIG_H
24 #define QT_CAM_CONFIG_H
25
26 #include <QObject>
27 #include <QStringList>
28
29 class QtCamImageSettings;
30 class QtCamVideoSettings;
31 class QtCamQuirks;
32
33 #define SCANNER_TYPE_V4L2                     "v4l2"
34 #define SCANNER_TYPE_ENUM                     "enum"
35
36 #define RENDERER_TYPE_MEEGO                   "meego"
37
38 #ifndef DATA_DIR
39 #define DATA_DIR                              "/usr/share/qtcamera/config/"
40 #endif /* DATA_DIR */
41
42 class QtCamConfigPrivate;
43
44 class QtCamConfig : public QObject {
45   Q_OBJECT
46
47 public:
48   QtCamConfig(QObject *parent = 0);
49   QtCamConfig(const QString& configPath, QObject *parent = 0);
50
51   virtual ~QtCamConfig();
52
53   QString deviceScannerType() const;
54   QString deviceScannerProperty() const;
55
56   QString videoSource() const;
57
58   QString viewfinderSink() const;
59   QString viewfinderRenderer() const;
60   bool viewfinderUseFence() const;
61
62   QString audioSource() const;
63   QString wrapperVideoSource() const;
64   QString wrapperVideoSourceProperty() const;
65
66   QtCamImageSettings *imageSettings(const QVariant& id);
67   QtCamVideoSettings *videoSettings(const QVariant& id);
68   QtCamQuirks *quirks(const QVariant& id);
69
70   QString imageEncodingProfileName() const;
71   QString imageEncodingProfilePath() const;
72
73   QString videoEncodingProfileName() const;
74   QString videoEncodingProfilePath() const;
75
76   QString imageSuffix() const;
77   QString videoSuffix() const;
78
79   QString audioCaptureCaps() const;
80
81   QStringList viewfinderFilters() const;
82
83   QString roiElement() const;
84   QString roiMessageName() const;
85   QString roiEnableProperty() const;
86   QString roiMessage() const;
87
88   bool isPreviewSupported() const;
89
90 private:
91   QtCamConfigPrivate *d_ptr;
92 };
93
94 #endif /* QT_CAM_CONFIG_H */