blob: 255619c6226c56db7baa95c142847600e36514e4 [file] [log] [blame]
David Chen1481fe12017-10-16 13:16:34 -07001/*
2 * Copyright (C) 2017 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#ifndef STATS_LOG_EVENT_WRAPPER_H
17#define STATS_LOG_EVENT_WRAPPER_H
18
19#include <binder/Parcel.h>
20#include <binder/Parcelable.h>
21#include <binder/Status.h>
22#include <utils/RefBase.h>
23#include <vector>
24
25namespace android {
26namespace os {
27
28// Represents a parcelable object. Only used to send data from Android OS to statsd.
29class StatsLogEventWrapper : public android::Parcelable {
30 public:
31 StatsLogEventWrapper();
32
33 StatsLogEventWrapper(StatsLogEventWrapper&& in) = default;
34
35 android::status_t writeToParcel(android::Parcel* out) const;
36
37 android::status_t readFromParcel(const android::Parcel* in);
38
39 // These are public for ease of conversion.
40 std::vector<uint8_t> bytes;
41};
42} // Namespace os
43} // Namespace android
44
45
46#endif // STATS_LOG_EVENT_WRAPPER_H
47