1fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall/* 2fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall * Copyright 2016 The Android Open Source Project 3fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall * 4fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall * Licensed under the Apache License, Version 2.0 (the "License"); 5fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall * you may not use this file except in compliance with the License. 6fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall * You may obtain a copy of the License at 7fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall * 8fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall * http://www.apache.org/licenses/LICENSE-2.0 9fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall * 10fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall * Unless required by applicable law or agreed to in writing, software 11fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall * distributed under the License is distributed on an "AS IS" BASIS, 12fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall * See the License for the specific language governing permissions and 14fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall * limitations under the License. 15fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall */ 16fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall 17fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall#ifndef ANDROID_GPUSERVICE_H 18fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall#define ANDROID_GPUSERVICE_H 19fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall 20fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall#include <binder/IInterface.h> 21fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall#include <cutils/compiler.h> 22fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall 23fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hallnamespace android { 24fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall 25fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall/* 26fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall * This class defines the Binder IPC interface for GPU-related queries and 27fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall * control. 28fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall */ 29fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hallclass IGpuService : public IInterface { 30fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hallpublic: 31fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall DECLARE_META_INTERFACE(GpuService); 32fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall}; 33fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall 34fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hallclass BnGpuService: public BnInterface<IGpuService> { 35fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hallprotected: 36fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall virtual status_t shellCommand(int in, int out, int err, 37fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall Vector<String16>& args) = 0; 38fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall 39fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall virtual status_t onTransact(uint32_t code, const Parcel& data, 40fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall Parcel* reply, uint32_t flags = 0) override; 41fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall}; 42fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall 43fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hallclass GpuService : public BnGpuService 44fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall{ 45fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hallpublic: 46fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall static const char* const SERVICE_NAME ANDROID_API; 47fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall 48fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall GpuService() ANDROID_API; 49fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall 50fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hallprotected: 51fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall virtual status_t shellCommand(int in, int out, int err, 52fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall Vector<String16>& args) override; 53fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall}; 54fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall 55fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall} // namespace android 56fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall 57fc038bd8fc77998a436d43027919f4500c4291e6Jesse Hall#endif // ANDROID_GPUSERVICE_H 58