2
* Copyright (C) 2013 Canonical, Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
#include "aalcameraservice.h"
18
#include "storagemanager.h"
20
#include "camera_control.h"
22
AalCameraService *AalCameraService::m_service = 0;
24
AalCameraService::AalCameraService(QObject *parent) :
25
QMediaService(parent),
29
m_storageManager = new StorageManager;
32
AalCameraService::~AalCameraService()
34
delete m_storageManager;
35
delete m_androidControl;
38
QMediaControl *AalCameraService::requestControl(const char *name)
44
void AalCameraService::releaseControl(QMediaControl *control)
49
CameraControl *AalCameraService::androidControl()
51
return m_androidControl;
54
bool AalCameraService::connectCamera()
56
m_androidControl = new CameraControl;
60
void AalCameraService::disconnectCamera()
64
void AalCameraService::initControls(CameraControl *camControl, CameraControlListener *listener)
66
delete m_androidControl;
72
bool AalCameraService::isCameraActive() const
77
bool AalCameraService::isBackCameraUsed() const
82
void AalCameraService::updateCaptureReady()
86
StorageManager *AalCameraService::storageManager()
88
return m_storageManager;