/* * Copyright (C) 2024 Amlogic Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef BINDER_CLIENT_H #define BINDER_CLIENT_H #include #include #include #include "MesonTypes.h" using namespace android; class BinderClient : public BBinder { public: BinderClient(); int createLayer(int32_t displayId, int32_t *layerId); int destroyLayer(int32_t displayId, int32_t layerId); int setTunnelId(int32_t displayId, int32_t layerId, int32_t tunnelId); int setLayerIndex(int32_t displayId, int32_t layerId, int32_t index); int setLayerZorder(int32_t displayId, int32_t layerId, int32_t zorder); int setSourceCrop(int32_t displayId, int32_t layerId, struct rect crop); int setDisplayFrame(int32_t displayId, int32_t layerId, struct rect frame); int getDelayLatency(int32_t displayId, int32_t layerId); int setToMainPlane(int32_t displayId); int getUiSize(int32_t displayId, int32_t &width, int32_t &height); private: sp mServicebinder; virtual status_t onTransact(uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags = 0); }; class BinderFactory { public: static BinderClient& getInstance() { static BinderClient instance; return instance; } }; #endif