blob: e2b396ec7b1c826b2347c9194312fc93e45d33a0 [file] [log] [blame]
Jesse Hallfc038bd2016-03-26 22:20:22 -07001/*
2 * Copyright 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 ANDROID_GPUSERVICE_H
18#define ANDROID_GPUSERVICE_H
19
Peiyong Lin2c37e202018-11-01 10:34:57 -070020#include <vector>
21
Jesse Hallfc038bd2016-03-26 22:20:22 -070022#include <binder/IInterface.h>
23#include <cutils/compiler.h>
24
25namespace android {
26
27/*
28 * This class defines the Binder IPC interface for GPU-related queries and
29 * control.
30 */
31class IGpuService : public IInterface {
32public:
33 DECLARE_META_INTERFACE(GpuService);
34};
35
36class BnGpuService: public BnInterface<IGpuService> {
37protected:
38 virtual status_t shellCommand(int in, int out, int err,
Peiyong Lin2c37e202018-11-01 10:34:57 -070039 std::vector<String16>& args) = 0;
Jesse Hallfc038bd2016-03-26 22:20:22 -070040
Peiyong Lin2c37e202018-11-01 10:34:57 -070041 status_t onTransact(uint32_t code, const Parcel& data,
Jesse Hallfc038bd2016-03-26 22:20:22 -070042 Parcel* reply, uint32_t flags = 0) override;
43};
44
Peiyong Lin2c37e202018-11-01 10:34:57 -070045class GpuService : public BnGpuService {
Jesse Hallfc038bd2016-03-26 22:20:22 -070046public:
47 static const char* const SERVICE_NAME ANDROID_API;
48
49 GpuService() ANDROID_API;
50
51protected:
Peiyong Lin2c37e202018-11-01 10:34:57 -070052 status_t shellCommand(int in, int out, int err,
53 std::vector<String16>& args) override;
Jesse Hallfc038bd2016-03-26 22:20:22 -070054};
55
56} // namespace android
57
58#endif // ANDROID_GPUSERVICE_H