blob: 5dd92990547c2e87af65718db216fb08c3d53296 [file] [log] [blame]
Joe Onorato5dcbc6c2017-08-29 15:13:58 -07001/*
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 STATS_SERVICE_H
18#define STATS_SERVICE_H
19
20#include <android/os/BnStatsManager.h>
Joe Onorato2cbc2cc2017-08-30 17:03:23 -070021#include <binder/IResultReceiver.h>
22#include <binder/IShellCallback.h>
Joe Onorato5dcbc6c2017-08-29 15:13:58 -070023#include <utils/Looper.h>
24
25#include <deque>
26#include <mutex>
27
28using namespace android;
29using namespace android::base;
30using namespace android::binder;
31using namespace android::os;
32using namespace std;
33
34
35// ================================================================================
36class StatsService : public BnStatsManager {
37public:
38 StatsService(const sp<Looper>& handlerLooper);
39 virtual ~StatsService();
40
Joe Onorato2cbc2cc2017-08-30 17:03:23 -070041 virtual status_t onTransact(uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags);
Joe Onorato5dcbc6c2017-08-29 15:13:58 -070042
Joe Onorato2cbc2cc2017-08-30 17:03:23 -070043 virtual status_t dump(int fd, const Vector<String16>& args);
44
45 virtual status_t command(FILE* in, FILE* out, FILE* err, Vector<String8>& args);
46
47 virtual Status systemRunning();
Joe Onorato5dcbc6c2017-08-29 15:13:58 -070048};
49
50#endif // STATS_SERVICE_H