| 1 |
/* |
| 2 |
* Copyright (C) 2020 Arnaud Ferraris <[email protected]> |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: GPL-3.0-or-later |
| 5 |
*/ |
| 6 |
|
| 7 |
#pragma once |
| 8 |
|
| 9 |
#include "callaudio-dbus.h" |
| 10 |
#include <glib-object.h> |
| 11 |
|
| 12 |
/** |
| 13 |
* CadOperationType: |
| 14 |
* @CAD_OPERATION_SELECT_MODE: Selecting an audio mode (default mode, voice call mode) |
| 15 |
* @CAD_OPERATION_ENABLE_SPEAKER: Enable or disable the loudspeaker |
| 16 |
* @CAD_OPERATION_MUTE_MIC: Mute or unmute the microphone |
| 17 |
* |
| 18 |
* Enum values to indicate the operation to be performed. |
| 19 |
*/ |
| 20 |
typedef enum { |
| 21 |
CAD_OPERATION_SELECT_MODE = 0, |
| 22 |
CAD_OPERATION_ENABLE_SPEAKER, |
| 23 |
CAD_OPERATION_MUTE_MIC, |
| 24 |
} CadOperationType; |
| 25 |
|
| 26 |
typedef struct _CadOperation CadOperation; |
| 27 |
|
| 28 |
typedef void (*CadOperationCallback)(CadOperation *op); |
| 29 |
|
| 30 |
struct _CadOperation { |
| 31 |
CadOperationType type; |
| 32 |
gpointer value; |
| 33 |
CallAudioDbusCallAudio *object; |
| 34 |
GDBusMethodInvocation *invocation; |
| 35 |
CadOperationCallback callback; |
| 36 |
gboolean success; |
| 37 |
}; |