xref: /haiku/src/bin/pkgman/DecisionProvider.h (revision 83f63a216ee17213be3e9125c17f611bdb26e1b5)
17d7ed9bfSOliver Tappe /*
27d7ed9bfSOliver Tappe  * Copyright 2011, Oliver Tappe <zooey@hirschkaefer.de>
37d7ed9bfSOliver Tappe  * Distributed under the terms of the MIT License.
47d7ed9bfSOliver Tappe  */
57d7ed9bfSOliver Tappe #ifndef DECISION_PROVIDER_H
67d7ed9bfSOliver Tappe #define DECISION_PROVIDER_H
77d7ed9bfSOliver Tappe 
87d7ed9bfSOliver Tappe 
97d7ed9bfSOliver Tappe #include <package/Context.h>
107d7ed9bfSOliver Tappe 
117d7ed9bfSOliver Tappe 
12*83f63a21SIngo Weinhold class DecisionProvider : public BPackageKit::BDecisionProvider {
13*83f63a21SIngo Weinhold public:
14*83f63a21SIngo Weinhold 								DecisionProvider(bool interactive = true);
15*83f63a21SIngo Weinhold 
SetInteractive(bool interactive)16*83f63a21SIngo Weinhold 			void				SetInteractive(bool interactive)
17*83f63a21SIngo Weinhold 									{ fInteractive = interactive; }
18*83f63a21SIngo Weinhold 
197d7ed9bfSOliver Tappe 	virtual	bool				YesNoDecisionNeeded(const BString& description,
20*83f63a21SIngo Weinhold 									const BString& question, const BString& yes,
21*83f63a21SIngo Weinhold 									const BString& no,
227d7ed9bfSOliver Tappe 									 const BString& defaultChoice);
23*83f63a21SIngo Weinhold 
24*83f63a21SIngo Weinhold private:
25*83f63a21SIngo Weinhold 			bool				fInteractive;
267d7ed9bfSOliver Tappe };
277d7ed9bfSOliver Tappe 
287d7ed9bfSOliver Tappe 
297d7ed9bfSOliver Tappe #endif	// DECISION_PROVIDER_H
30