Jesse Hall | fc038bd | 2016-03-26 22:20:22 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 20 | #include <binder/IInterface.h> |
| 21 | #include <cutils/compiler.h> |
| 22 | |
| 23 | namespace android { |
| 24 | |
| 25 | /* |
| 26 | * This class defines the Binder IPC interface for GPU-related queries and |
| 27 | * control. |
| 28 | */ |
| 29 | class IGpuService : public IInterface { |
| 30 | public: |
| 31 | DECLARE_META_INTERFACE(GpuService); |
| 32 | }; |
| 33 | |
| 34 | class BnGpuService: public BnInterface<IGpuService> { |
| 35 | protected: |
| 36 | virtual status_t shellCommand(int in, int out, int err, |
| 37 | Vector<String16>& args) = 0; |
| 38 | |
| 39 | virtual status_t onTransact(uint32_t code, const Parcel& data, |
| 40 | Parcel* reply, uint32_t flags = 0) override; |
| 41 | }; |
| 42 | |
| 43 | class GpuService : public BnGpuService |
| 44 | { |
| 45 | public: |
| 46 | static const char* const SERVICE_NAME ANDROID_API; |
| 47 | |
| 48 | GpuService() ANDROID_API; |
| 49 | |
| 50 | protected: |
| 51 | virtual status_t shellCommand(int in, int out, int err, |
| 52 | Vector<String16>& args) override; |
| 53 | }; |
| 54 | |
| 55 | } // namespace android |
| 56 | |
| 57 | #endif // ANDROID_GPUSERVICE_H |