2018-08-28 10:58:49 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2018 The Android Open Source Project
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _CHECKPOINT_H
|
|
|
|
#define _CHECKPOINT_H
|
|
|
|
|
2018-10-11 03:52:04 +02:00
|
|
|
#include <binder/Status.h>
|
2018-08-28 10:58:49 +02:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace android {
|
|
|
|
namespace vold {
|
|
|
|
|
2019-01-23 02:27:25 +01:00
|
|
|
android::binder::Status cp_supportsCheckpoint(bool& result);
|
|
|
|
|
2019-03-18 21:36:40 +01:00
|
|
|
android::binder::Status cp_supportsBlockCheckpoint(bool& result);
|
|
|
|
|
|
|
|
android::binder::Status cp_supportsFileCheckpoint(bool& result);
|
|
|
|
|
2018-10-11 03:52:04 +02:00
|
|
|
android::binder::Status cp_startCheckpoint(int retry);
|
2018-08-28 10:58:49 +02:00
|
|
|
|
2018-10-11 03:52:04 +02:00
|
|
|
android::binder::Status cp_commitChanges();
|
2018-08-28 10:58:49 +02:00
|
|
|
|
2019-03-21 01:02:47 +01:00
|
|
|
void cp_abortChanges(const std::string& message, bool retry);
|
2018-08-28 10:58:49 +02:00
|
|
|
|
2018-10-03 02:40:44 +02:00
|
|
|
bool cp_needsRollback();
|
2018-08-28 10:58:49 +02:00
|
|
|
|
|
|
|
bool cp_needsCheckpoint();
|
|
|
|
|
2020-06-11 08:51:17 +02:00
|
|
|
bool cp_isCheckpointing();
|
|
|
|
|
2018-10-11 03:52:04 +02:00
|
|
|
android::binder::Status cp_prepareCheckpoint();
|
2018-08-28 10:58:49 +02:00
|
|
|
|
2019-03-07 02:45:17 +01:00
|
|
|
android::binder::Status cp_restoreCheckpoint(const std::string& mountPoint, int count = 0);
|
2018-09-21 19:49:57 +02:00
|
|
|
|
2018-10-11 03:52:04 +02:00
|
|
|
android::binder::Status cp_markBootAttempt();
|
2018-08-28 10:58:49 +02:00
|
|
|
|
2019-10-11 17:38:21 +02:00
|
|
|
void cp_resetCheckpoint();
|
2018-08-28 10:58:49 +02:00
|
|
|
} // namespace vold
|
|
|
|
} // namespace android
|
|
|
|
|
|
|
|
#endif
|