2 * Copyright 2011-2015, Haiku, Inc.
3 * Distributed under the terms of the MIT License.
5 #ifndef _PACKAGE__CONTEXT_H_
6 #define _PACKAGE__CONTEXT_H_
13 namespace BSupportKit
{
14 class BJobStateListener
;
18 namespace BPackageKit
{
22 class TempfileManager
;
26 struct BDecisionProvider
{
27 virtual ~BDecisionProvider();
29 virtual bool YesNoDecisionNeeded(const BString
& description
,
30 const BString
& question
,
31 const BString
& yes
, const BString
& no
,
32 const BString
& defaultChoice
);
33 // virtual bool ActionsAcceptanceDecisionNeeded(
34 // const BString& description,
35 // const BString& question) = 0;
36 // virtual int32 ChoiceDecisionNeeded(
37 // const BString& question) = 0;
43 BContext(BDecisionProvider
& decisionProvider
,
44 BSupportKit::BJobStateListener
&
48 status_t
InitCheck() const;
50 status_t
GetNewTempfile(const BString
& baseName
,
53 BDecisionProvider
& DecisionProvider() const;
54 BSupportKit::BJobStateListener
& JobStateListener() const;
57 status_t
_Initialize();
59 BDecisionProvider
& fDecisionProvider
;
60 BSupportKit::BJobStateListener
& fJobStateListener
;
63 mutable BPrivate::TempfileManager
* fTempfileManager
;
67 } // namespace BPackageKit
70 #endif // _PACKAGE__CONTEXT_H_