1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- #ifndef UPDATE_ENGINE_UPDATE_MANAGER_ANDROID_THINGS_POLICY_H_
- #define UPDATE_ENGINE_UPDATE_MANAGER_ANDROID_THINGS_POLICY_H_
- #include <string>
- #include "update_engine/update_manager/next_update_check_policy_impl.h"
- #include "update_engine/update_manager/policy_utils.h"
- namespace chromeos_update_manager {
- class AndroidThingsPolicy : public Policy {
- public:
- AndroidThingsPolicy() = default;
- ~AndroidThingsPolicy() override = default;
-
- EvalStatus UpdateCheckAllowed(EvaluationContext* ec,
- State* state,
- std::string* error,
- UpdateCheckParams* result) const override;
-
-
- EvalStatus UpdateCanBeApplied(
- EvaluationContext* ec,
- State* state,
- std::string* error,
- chromeos_update_engine::ErrorCode* result,
- chromeos_update_engine::InstallPlan* install_plan) const override;
-
- EvalStatus UpdateCanStart(EvaluationContext* ec,
- State* state,
- std::string* error,
- UpdateDownloadParams* result,
- UpdateState update_state) const override;
-
- EvalStatus UpdateDownloadAllowed(EvaluationContext* ec,
- State* state,
- std::string* error,
- bool* result) const override;
-
-
- EvalStatus P2PEnabled(EvaluationContext* ec,
- State* state,
- std::string* error,
- bool* result) const override;
-
-
- EvalStatus P2PEnabledChanged(EvaluationContext* ec,
- State* state,
- std::string* error,
- bool* result,
- bool prev_result) const override;
- protected:
-
- std::string PolicyName() const override { return "AndroidThingsPolicy"; }
- private:
- friend class UmAndroidThingsPolicyTest;
- FRIEND_TEST(UmAndroidThingsPolicyTest, UpdateCheckAllowedWaitsForTheTimeout);
- static const NextUpdateCheckPolicyConstants kNextUpdateCheckPolicyConstants;
- DISALLOW_COPY_AND_ASSIGN(AndroidThingsPolicy);
- };
- }
- #endif
|