PulseAudio Qt Bindings

operation.h
1/*
2 SPDX-FileCopyrightText: 2014-2015 Harald Sitter <sitter@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#ifndef OPERATION_H
8#define OPERATION_H
9
10#include <pulse/operation.h>
11
12namespace PulseAudioQt
13{
14/**
15 * @brief The PAOperation class
16 * Helps with management of pa_operations. pa_operations need to be expicitly
17 * unref'd after use, so this class is essentially a fancy scoping helper where
18 * destruction of an instance would also unref the held operation (if there is
19 * one).
20 */
22{
23public:
24 /**
25 * @brief PAOperation
26 * @param operation operation to manage the scope of
27 */
28 explicit PAOperation(pa_operation *operation = nullptr);
30
31 PAOperation &operator=(pa_operation *operation);
32
33 /**
34 * @brief operator !
35 * @return whether or not there is an operation pointer
36 */
37 bool operator!();
38
39 /**
40 * @brief operator bool representing whether there is an operation
41 */
42 operator bool();
43
44 /**
45 * @brief operator *
46 * @return pointer to internal pa_operation object
47 */
48 pa_operation *&operator*();
49
50private:
51 pa_operation *m_operation;
52};
53
54} // PulseAudioQt
55
56#endif // OPERATION_H
The PAOperation class Helps with management of pa_operations.
Definition operation.h:22
pa_operation *& operator*()
operator *
Definition operation.cpp:34
bool operator!()
operator !
Definition operation.cpp:29
PAOperation(pa_operation *operation=nullptr)
PAOperation.
Definition operation.cpp:11
The primary namespace of PulseAudioQt.
Definition card.cpp:17
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.