2017-05-10 01:28:20 +02:00
|
|
|
|
|
|
|
//
|
|
|
|
// libtgvoip is free and unencumbered public domain software.
|
|
|
|
// For more information, see http://unlicense.org or the UNLICENSE file
|
|
|
|
// you should have received with this source code distribution.
|
|
|
|
//
|
|
|
|
|
2018-09-09 22:20:48 +02:00
|
|
|
#ifndef TGVOIP_WINDOWSSANDBOXUTILS_H
|
|
|
|
#define TGVOIP_WINDOWSSANDBOXUTILS_H
|
|
|
|
|
2017-05-10 01:28:20 +02:00
|
|
|
#include <audioclient.h>
|
2017-05-11 05:21:04 +02:00
|
|
|
#include <windows.h>
|
2017-06-06 03:44:16 +02:00
|
|
|
#ifndef TGVOIP_WP_SILVERLIGHT
|
2017-05-11 05:21:04 +02:00
|
|
|
#include <mmdeviceapi.h>
|
2017-06-06 03:44:16 +02:00
|
|
|
#endif
|
2017-05-11 05:21:04 +02:00
|
|
|
#include <wrl.h>
|
2017-05-10 01:28:20 +02:00
|
|
|
#include <wrl/implements.h>
|
|
|
|
|
|
|
|
using namespace Microsoft::WRL;
|
|
|
|
|
2017-05-11 15:33:39 +02:00
|
|
|
namespace tgvoip {
|
2017-05-11 05:21:04 +02:00
|
|
|
|
2017-06-06 03:44:16 +02:00
|
|
|
#ifndef TGVOIP_WP_SILVERLIGHT
|
2017-05-11 15:33:39 +02:00
|
|
|
class ActivationHandler :
|
|
|
|
public RuntimeClass< RuntimeClassFlags< ClassicCom >, FtmBase, IActivateAudioInterfaceCompletionHandler >
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
STDMETHOD(ActivateCompleted)(IActivateAudioInterfaceAsyncOperation *operation);
|
2017-05-10 01:28:20 +02:00
|
|
|
|
2017-05-11 15:33:39 +02:00
|
|
|
ActivationHandler(HANDLE _event);
|
|
|
|
HANDLE event;
|
2017-05-19 16:13:51 +02:00
|
|
|
IAudioClient2* client;
|
2017-05-11 15:33:39 +02:00
|
|
|
HRESULT actResult;
|
|
|
|
};
|
2017-06-06 03:44:16 +02:00
|
|
|
#endif
|
2017-05-10 01:28:20 +02:00
|
|
|
|
2017-05-11 15:33:39 +02:00
|
|
|
class WindowsSandboxUtils {
|
|
|
|
public:
|
2017-05-19 16:13:51 +02:00
|
|
|
static IAudioClient2* ActivateAudioDevice(const wchar_t* devID, HRESULT* callResult, HRESULT* actResult);
|
2017-05-11 15:33:39 +02:00
|
|
|
};
|
2017-05-10 01:28:20 +02:00
|
|
|
}
|
2018-09-09 22:20:48 +02:00
|
|
|
|
|
|
|
#endif //TGVOIP_WINDOWSSANDBOXUTILS_H
|