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