| Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 1 | /* | 
 | 2 |  * Copyright (C) 2013 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_INPUT_FLINGER_H | 
 | 18 | #define ANDROID_INPUT_FLINGER_H | 
 | 19 |  | 
 | 20 | #include <stdint.h> | 
 | 21 | #include <sys/types.h> | 
 | 22 |  | 
| Michael Wright | 6f78360 | 2015-02-13 17:35:16 -0800 | [diff] [blame] | 23 | #include "InputHost.h" | 
 | 24 |  | 
| Chris Ye | 0783e99 | 2020-06-02 21:34:49 -0700 | [diff] [blame] | 25 | #include <android/os/BnInputFlinger.h> | 
 | 26 | #include <android/os/ISetInputWindowsListener.h> | 
 | 27 | #include <binder/Binder.h> | 
| Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 28 | #include <cutils/compiler.h> | 
| Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 29 | #include <utils/String16.h> | 
| Chris Ye | 0783e99 | 2020-06-02 21:34:49 -0700 | [diff] [blame] | 30 | #include <utils/String8.h> | 
| Michael Wright | 6f78360 | 2015-02-13 17:35:16 -0800 | [diff] [blame] | 31 | #include <utils/StrongPointer.h> | 
| Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 32 |  | 
| Chris Ye | 0783e99 | 2020-06-02 21:34:49 -0700 | [diff] [blame] | 33 | using android::os::BnInputFlinger; | 
 | 34 | using android::os::ISetInputWindowsListener; | 
 | 35 |  | 
| Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 36 | namespace android { | 
 | 37 |  | 
 | 38 | class InputFlinger : public BnInputFlinger { | 
 | 39 | public: | 
 | 40 |     static char const* getServiceName() ANDROID_API { | 
 | 41 |         return "inputflinger"; | 
 | 42 |     } | 
 | 43 |  | 
 | 44 |     InputFlinger() ANDROID_API; | 
 | 45 |  | 
| Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 46 |     virtual status_t dump(int fd, const Vector<String16>& args); | 
| Chris Ye | 0783e99 | 2020-06-02 21:34:49 -0700 | [diff] [blame] | 47 |     binder::Status setInputWindows(const std::vector<InputWindowInfo>&, | 
 | 48 |                                    const sp<ISetInputWindowsListener>&) { | 
 | 49 |         return binder::Status::ok(); | 
 | 50 |     } | 
 | 51 |     binder::Status registerInputChannel(const InputChannelInfo&) { return binder::Status::ok(); } | 
 | 52 |     binder::Status unregisterInputChannel(const InputChannelInfo&) { return binder::Status::ok(); } | 
| Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 53 |  | 
| Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 54 | private: | 
 | 55 |     virtual ~InputFlinger(); | 
 | 56 |  | 
 | 57 |     void dumpInternal(String8& result); | 
| Michael Wright | 6f78360 | 2015-02-13 17:35:16 -0800 | [diff] [blame] | 58 |  | 
 | 59 |     sp<InputHostInterface> mHost; | 
| Jeff Brown | 40c9e0a | 2013-07-15 13:27:05 -0700 | [diff] [blame] | 60 | }; | 
 | 61 |  | 
 | 62 | } // namespace android | 
 | 63 |  | 
 | 64 | #endif // ANDROID_INPUT_FLINGER_H |