blob: 2cfedd948d5a87d48dfb325e6c4fce1bee0e0d89 [file] [log] [blame]
Casey Dahlina93cd532016-01-14 16:55:11 -08001//
2// Copyright (C) 2016 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17#ifndef UPDATE_ENGINE_UPDATE_ENGINE_STATUS_H_
18#define UPDATE_ENGINE_UPDATE_ENGINE_STATUS_H_
19
20#include <binder/Parcelable.h>
21#include <utils/String16.h>
22
23namespace android {
24namespace brillo {
25
26// Parcelable object containing the current status of update engine, to be sent
27// over binder to clients from the server.
28class ParcelableUpdateEngineStatus : public Parcelable {
29 public:
30 ParcelableUpdateEngineStatus() = default;
31 virtual ~ParcelableUpdateEngineStatus() = default;
32
33 status_t writeToParcel(Parcel* parcel) const override;
34 status_t readFromParcel(const Parcel* parcel) override;
35
36 int64_t last_checked_time_;
37 double progress_;
38 android::String16 current_operation_;
39 android::String16 new_version_;
40 int64_t new_size_;
41};
42
43} // namespace brillo
44} // namespace android
45
46#endif // UPDATE_ENGINE_UPDATE_ENGINE_STATUS_H_