1231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu/* 2231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu * Copyright 2015 The Android Open Source Project 3231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu * 4231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu * Licensed under the Apache License, Version 2.0 (the "License"); 5231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu * you may not use this file except in compliance with the License. 6231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu * You may obtain a copy of the License at 7231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu * 8231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu * http://www.apache.org/licenses/LICENSE-2.0 9231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu * 10231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu * Unless required by applicable law or agreed to in writing, software 11231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu * distributed under the License is distributed on an "AS IS" BASIS, 12231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu * See the License for the specific language governing permissions and 14231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu * limitations under the License. 15231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu */ 16231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu 17231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu#ifndef ANDROID_IRESOURCEMANAGERCLIENT_H 18231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu#define ANDROID_IRESOURCEMANAGERCLIENT_H 19231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu 20231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu#include <utils/RefBase.h> 218f9dd872366f54b6260506c75c3d0cc3f9f73f81Ronghua Wu#include <utils/String8.h> 22231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu#include <binder/IInterface.h> 23231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu#include <binder/Parcel.h> 24231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu 25231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wunamespace android { 26231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu 27231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wuclass IResourceManagerClient: public IInterface 28231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu{ 29231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wupublic: 30231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu DECLARE_META_INTERFACE(ResourceManagerClient); 31231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu 32231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu virtual bool reclaimResource() = 0; 338f9dd872366f54b6260506c75c3d0cc3f9f73f81Ronghua Wu virtual String8 getName() = 0; 34231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu}; 35231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu 36231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu// ---------------------------------------------------------------------------- 37231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu 38231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wuclass BnResourceManagerClient: public BnInterface<IResourceManagerClient> 39231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu{ 40231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wupublic: 41231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu virtual status_t onTransact(uint32_t code, 42231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu const Parcel &data, 43231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu Parcel *reply, 44231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu uint32_t flags = 0); 45231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu}; 46231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu 47231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu}; // namespace android 48231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu 49231c3d169ad029689f9d688b68179af7e96b8d78Ronghua Wu#endif // ANDROID_IRESOURCEMANAGERCLIENT_H 50