2 * Copyright 2015-2016, Rene Gollent, rene@gollent.com.
3 * Distributed under the terms of the MIT License.
5 #ifndef REPORT_USER_INTERFACE_H
6 #define REPORT_USER_INTERFACE_H
9 #include <ObjectList.h>
12 #include "UserInterface.h"
16 class ReportUserInterface
: public UserInterface
,
17 private Team::Listener
{
19 ReportUserInterface(thread_id targetThread
,
20 const char* reportPath
);
21 virtual ~ReportUserInterface();
23 virtual const char* ID() const;
25 virtual status_t
Init(Team
* team
,
26 UserInterfaceListener
* listener
);
28 virtual void Terminate();
30 virtual UserInterface
* Clone() const;
32 virtual bool IsInteractive() const;
34 virtual status_t
LoadSettings(const TeamUiSettings
* settings
);
35 virtual status_t
SaveSettings(TeamUiSettings
*& settings
) const;
37 virtual void NotifyUser(const char* title
,
39 user_notification_type type
);
40 virtual void NotifyBackgroundWorkStatus(
42 virtual int32
SynchronouslyAskUser(const char* title
,
43 const char* message
, const char* choice1
,
44 const char* choice2
, const char* choice3
);
45 virtual status_t
SynchronouslyAskUserForFile(entry_ref
* _ref
);
50 virtual void ThreadAdded(const Team::ThreadEvent
& event
);
51 virtual void ThreadStateChanged(
52 const Team::ThreadEvent
& event
);
53 virtual void DebugReportChanged(
54 const Team::DebugReportEvent
& event
);
58 UserInterfaceListener
* fListener
;
59 thread_id fTargetThread
;
60 const char* fReportPath
;
61 sem_id fShowSemaphore
;
62 sem_id fReportSemaphore
;
64 volatile bool fTerminating
;
68 #endif // REPORT_USER_INTERFACE_H