diff options
Diffstat (limited to 'rtlfmradioservice.cpp')
-rw-r--r-- | rtlfmradioservice.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/rtlfmradioservice.cpp b/rtlfmradioservice.cpp new file mode 100644 index 0000000..12d1419 --- /dev/null +++ b/rtlfmradioservice.cpp @@ -0,0 +1,32 @@ +/* Copyright (C) 2016, The Qt Company Ltd. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "rtlfmradioservice.h" +#include "rtlfmradiotunercontrol.h" + +RtlFmRadioService::RtlFmRadioService(QObject *parent) + : QMediaService(parent) + , m_control(new RtlFmRadioTunerControl(this)) +{ +} + +RtlFmRadioService::~RtlFmRadioService() +{ +} + +QMediaControl *RtlFmRadioService::requestControl(const char *name) +{ + if (qstrcmp(name,QRadioTunerControl_iid) == 0) + return m_control; + + return 0; +} + +void RtlFmRadioService::releaseControl(QMediaControl *control) +{ + delete control; + m_control = 0; +} |