xref: /haiku/src/kits/debugger/settings/TeamSignalSettings.h (revision fce4895d1884da5ae6fb299d23c735c598e690b1)
1 /*
2  * Copyright 2015, Rene Gollent, rene@gollent.com.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef TEAM_SIGNAL_SETTINGS_H
6 #define TEAM_SIGNAL_SETTINGS_H
7 
8 #include <Message.h>
9 
10 #include "SignalDispositionTypes.h"
11 
12 
13 class TeamSignalSettings {
14 public:
15 								TeamSignalSettings();
16 	virtual						~TeamSignalSettings();
17 
18 			TeamSignalSettings&
19 								operator=(
20 									const TeamSignalSettings& other);
21 									// throws std::bad_alloc;
22 
23 			const char*			ID() const;
24 			status_t			SetTo(const BMessage& archive);
25 			status_t			WriteTo(BMessage& archive) const;
26 			void				Unset();
27 
28 			void				SetDefaultSignalDisposition(int32 disposition);
29 			int32				DefaultSignalDisposition() const;
30 
31 			int32				CountCustomSignalDispositions() const;
32 			status_t			AddCustomSignalDisposition(int32 signal,
33 									int32 disposition);
34 			status_t			RemoveCustomSignalDispositionAt(int32 index);
35 			status_t			GetCustomSignalDispositionAt(int32 index,
36 									int32& signal, int32& disposition) const;
37 
38 	virtual	TeamSignalSettings*
39 								Clone() const;
40 
41 private:
42 	BMessage					fValues;
43 };
44 
45 
46 #endif	// TEAM_SIGNAL_SETTINGS_H
47