3bbb1b0bda343bbd1f541025c22e14b7e1438630
[harmattan/cameraplus] / lib / qtcamexposure.cpp
1 #include "qtcamexposure.h"
2 #include "qtcamcapability_p.h"
3
4 // TODO: hardcoded
5 #define EXPOSURE_MIN 0
6 #define EXPOSURE_MAX 4294967295u
7
8 QtCamExposure::QtCamExposure(QtCamDevice *dev, QObject *parent) :
9   QtCamCapability(new QtCamCapabilityPrivate(dev, QtCamCapability::Exposure, "exposure"),
10                   parent) {
11
12 }
13
14 QtCamExposure::~QtCamExposure() {
15
16 }
17
18 unsigned int QtCamExposure::value() {
19   unsigned int val = 0;
20
21   if (!d_ptr->uintValue(&val)) {
22     return 0;
23   }
24
25   return val;
26 }
27
28 bool QtCamExposure::setValue(unsigned int val) {
29   return d_ptr->setUintValue(val);
30 }
31
32 unsigned int QtCamExposure::minimumValue() {
33   return EXPOSURE_MIN;
34 }
35
36 unsigned int QtCamExposure::maximumValue() {
37   return EXPOSURE_MAX;
38 }