1 | /* $Id: AudioTestService.h 89215 2021-05-21 10:47:13Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * AudioTestService - Audio test execution server, Public Header.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2021 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 | #ifndef VBOX_INCLUDED_SRC_Audio_AudioTestService_h
|
---|
19 | #define VBOX_INCLUDED_SRC_Audio_AudioTestService_h
|
---|
20 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
21 | # pragma once
|
---|
22 | #endif
|
---|
23 |
|
---|
24 | #include "AudioTestServiceInternal.h"
|
---|
25 |
|
---|
26 |
|
---|
27 | /**
|
---|
28 | * Structure for keeping an Audio Test Server (ATS) instance.
|
---|
29 | */
|
---|
30 | typedef struct ATSSERVER
|
---|
31 | {
|
---|
32 | /** The selected transport layer. */
|
---|
33 | PCATSTRANSPORT pTransport;
|
---|
34 | /** Whether to terminate or not.
|
---|
35 | * @todo implement signals and stuff. */
|
---|
36 | bool volatile fTerminate;
|
---|
37 | /** Pipe for communicating with the serving thread about new clients. - read end */
|
---|
38 | RTPIPE hPipeR;
|
---|
39 | /** Pipe for communicating with the serving thread about new clients. - write end */
|
---|
40 | RTPIPE hPipeW;
|
---|
41 | /** Main thread waiting for connections. */
|
---|
42 | RTTHREAD hThreadMain;
|
---|
43 | /** Thread serving connected clients. */
|
---|
44 | RTTHREAD hThreadServing;
|
---|
45 | /** Critical section protecting the list of new clients. */
|
---|
46 | RTCRITSECT CritSectClients;
|
---|
47 | /** List of new clients waiting to be picked up by the client worker thread. */
|
---|
48 | RTLISTANCHOR LstClientsNew;
|
---|
49 | } ATSSERVER;
|
---|
50 | /** Pointer to an Audio Test Server (ATS) instance. */
|
---|
51 | typedef ATSSERVER *PATSSERVER;
|
---|
52 |
|
---|
53 |
|
---|
54 | int AudioTestSvcInit(PATSSERVER pThis);
|
---|
55 | int AudioTestSvcStart(PATSSERVER pThis);
|
---|
56 | int AudioTestSvcShutdown(PATSSERVER pThis);
|
---|
57 |
|
---|
58 | #endif /* !VBOX_INCLUDED_SRC_Audio_AudioTestService_h */
|
---|
59 |
|
---|