Restore the "GPL licensing not permitted" in GLUT license headers.
[haiku.git] / headers / os / package / Context.h
blobeffe09cce0d34433070ac98d779f127631a09462
1 /*
2 * Copyright 2011-2015, Haiku, Inc.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _PACKAGE__CONTEXT_H_
6 #define _PACKAGE__CONTEXT_H_
9 #include <Entry.h>
10 #include <String.h>
13 namespace BSupportKit {
14 class BJobStateListener;
18 namespace BPackageKit {
21 namespace BPrivate {
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;
41 class BContext {
42 public:
43 BContext(BDecisionProvider& decisionProvider,
44 BSupportKit::BJobStateListener&
45 jobStateListener);
46 ~BContext();
48 status_t InitCheck() const;
50 status_t GetNewTempfile(const BString& baseName,
51 BEntry* entry) const;
53 BDecisionProvider& DecisionProvider() const;
54 BSupportKit::BJobStateListener& JobStateListener() const;
56 private:
57 status_t _Initialize();
59 BDecisionProvider& fDecisionProvider;
60 BSupportKit::BJobStateListener& fJobStateListener;
61 status_t fInitStatus;
63 mutable BPrivate::TempfileManager* fTempfileManager;
67 } // namespace BPackageKit
70 #endif // _PACKAGE__CONTEXT_H_