Make UEFI boot-platform build again
[haiku.git] / src / servers / launch / Conditions.h
blob485254424e6cf448c40602e99909e703529e74c6
1 /*
2 * Copyright 2015, Axel Dörfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef CONDITIONS_H
6 #define CONDITIONS_H
9 #include <String.h>
12 class BMessage;
15 class ConditionContext {
16 public:
17 virtual bool IsSafeMode() const = 0;
18 virtual bool BootVolumeIsReadOnly() const = 0;
22 class Condition {
23 public:
24 Condition();
25 virtual ~Condition();
27 virtual bool Test(ConditionContext& context) const = 0;
29 /*! Determines whether or not the result of this condition is fixed,
30 and will not change anymore.
32 virtual bool IsConstant(ConditionContext& context) const;
34 virtual BString ToString() const = 0;
38 class Conditions {
39 public:
40 static Condition* FromMessage(const BMessage& message);
41 static Condition* AddNotSafeMode(Condition* condition);
45 #endif // CONDITIONS_H