master
h 40 lines 718 Bytes
Raw
1 /*++
2
3 Copyright (c) Microsoft. All rights reserved.
4
5 Module Name:
6
7 ConsoleProgressIndicator.h
8
9 Abstract:
10
11 This file contains console function declarations.
12
13 --*/
14
15 #pragma once
16
17 #include <thread>
18 #include "wrl.h"
19
20 namespace wsl::windows::common {
21 class ConsoleProgressIndicator
22 {
23 private:
24 std::thread m_thread;
25 wil::unique_event m_event;
26 std::wstring m_waitMessage;
27 std::wstring m_progressMessage;
28 bool m_interactive{};
29
30 void IndicateProgress() const;
31
32 public:
33 ConsoleProgressIndicator(std::wstring&& inputMessage, bool animatedDots = false);
34 ~ConsoleProgressIndicator();
35
36 void End();
37
38 void UpdateProgress(std::wstring&& progress);
39 };
40 } // namespace wsl::windows::common