blob: d3a0212028aeab2ab09475ac42316edf8840b805 (
plain) (
blame)
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
34
35
36
37
38
39
40
41
42
43
44
|
/*
SPDX-FileCopyrightText: 2014-2015 Harald Sitter <sitter@kde.org>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#include "operation.h"
namespace PulseAudioQt
{
PAOperation::PAOperation(pa_operation *operation)
: m_operation(operation)
{
}
PAOperation::~PAOperation()
{
if (m_operation) {
pa_operation_unref(m_operation);
}
}
PAOperation &PAOperation::operator=(pa_operation *operation)
{
m_operation = operation;
return *this;
}
bool PAOperation::operator!()
{
return !m_operation;
}
pa_operation *&PAOperation::operator*()
{
return m_operation;
}
PAOperation::operator bool()
{
return m_operation;
}
} // PulseAudioQt
|