Files
tdesktop/Telegram/SourceFiles/platform/win/windows_toast_activator.h
allhaileris afb81b8278
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Close stale issues and PRs / stale (push) Successful in 13s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
init
2026-02-16 15:50:16 +03:00

53 lines
1.3 KiB
C++

/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#include "base/platform/win/base_windows_rpcndr_h.h"
#include "windows_toastactivator_h.h"
#include "base/platform/win/wrl/wrl_implements_h.h"
// {F11932D3-6110-4BBC-9B02-B2EC07A1BD19}
class DECLSPEC_UUID("F11932D3-6110-4BBC-9B02-B2EC07A1BD19") ToastActivator
: public ::Microsoft::WRL::RuntimeClass<
::Microsoft::WRL::RuntimeClassFlags<::Microsoft::WRL::ClassicCom>,
INotificationActivationCallback,
::Microsoft::WRL::FtmBase> {
public:
ToastActivator() = default;
~ToastActivator() = default;
HRESULT STDMETHODCALLTYPE Activate(
_In_ LPCWSTR appUserModelId,
_In_ LPCWSTR invokedArgs,
_In_reads_(dataCount) const NOTIFICATION_USER_INPUT_DATA *data,
ULONG dataCount) override;
HRESULT STDMETHODCALLTYPE QueryInterface(
REFIID riid,
void **ppObj);
ULONG STDMETHODCALLTYPE AddRef();
ULONG STDMETHODCALLTYPE Release();
private:
long _ref = 1;
};
struct ToastActivation {
struct UserInput {
QString key;
QString value;
};
QString args;
std::vector<UserInput> input;
[[nodiscard]] static QString String(LPCWSTR value);
};
[[nodiscard]] rpl::producer<ToastActivation> ToastActivations();