Saurabh Shah | 56f610d | 2012-08-07 15:27:06 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 The Android Open Source Project |
Saurabh Shah | 86c1729 | 2013-02-08 15:24:13 -0800 | [diff] [blame] | 3 | * Copyright (C) 2012-2013, The Linux Foundation. All rights reserved. |
Saurabh Shah | 56f610d | 2012-08-07 15:27:06 -0700 | [diff] [blame] | 4 | * |
| 5 | * Not a Contribution, Apache license notifications and license are |
| 6 | * retained for attribution purposes only. |
| 7 | |
| 8 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | * you may not use this file except in compliance with the License. |
| 10 | * You may obtain a copy of the License at |
| 11 | * |
| 12 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | * |
| 14 | * Unless required by applicable law or agreed to in writing, software |
| 15 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | * See the License for the specific language governing permissions and |
| 18 | * limitations under the License. |
| 19 | */ |
| 20 | |
| 21 | #ifndef ANDROID_IQSERVICE_H |
| 22 | #define ANDROID_IQSERVICE_H |
| 23 | |
| 24 | #include <stdint.h> |
| 25 | #include <sys/types.h> |
| 26 | #include <utils/Errors.h> |
| 27 | #include <utils/RefBase.h> |
| 28 | #include <binder/IInterface.h> |
Saurabh Shah | 86c1729 | 2013-02-08 15:24:13 -0800 | [diff] [blame] | 29 | #include <binder/IBinder.h> |
| 30 | #include <IQClient.h> |
Saurabh Shah | 56f610d | 2012-08-07 15:27:06 -0700 | [diff] [blame] | 31 | |
| 32 | namespace qService { |
| 33 | // ---------------------------------------------------------------------------- |
| 34 | class IQService : public android::IInterface |
| 35 | { |
| 36 | public: |
| 37 | DECLARE_META_INTERFACE(QService); |
| 38 | enum { |
Saurabh Shah | 86c1729 | 2013-02-08 15:24:13 -0800 | [diff] [blame] | 39 | // Hardware securing start/end notification |
| 40 | SECURING = android::IBinder::FIRST_CALL_TRANSACTION, |
Saurabh Shah | 56f610d | 2012-08-07 15:27:06 -0700 | [diff] [blame] | 41 | UNSECURING, // Hardware unsecuring start/end notification |
Saurabh Shah | 86c1729 | 2013-02-08 15:24:13 -0800 | [diff] [blame] | 42 | CONNECT, |
Jeykumar Sankaran | 9f59a76 | 2013-02-28 10:45:56 -0800 | [diff] [blame] | 43 | SCREEN_REFRESH, |
Arun Kumar K.R | ffef748 | 2013-04-10 14:17:22 -0700 | [diff] [blame] | 44 | EXTERNAL_ORIENTATION, |
Arun Kumar K.R | fb5bfa6 | 2013-07-25 03:10:51 -0700 | [diff] [blame] | 45 | BUFFER_MIRRORMODE, |
Naseer Ahmed | 58780b9 | 2013-07-29 17:41:40 -0400 | [diff] [blame] | 46 | //VPU command codes - list is defined in vpu.h |
| 47 | VPU_COMMAND_LIST_START = 100, |
| 48 | VPU_COMMAND_LIST_END = 200, |
Saurabh Shah | 56f610d | 2012-08-07 15:27:06 -0700 | [diff] [blame] | 49 | }; |
| 50 | enum { |
| 51 | END = 0, |
| 52 | START, |
| 53 | }; |
| 54 | virtual void securing(uint32_t startEnd) = 0; |
| 55 | virtual void unsecuring(uint32_t startEnd) = 0; |
Saurabh Shah | 86c1729 | 2013-02-08 15:24:13 -0800 | [diff] [blame] | 56 | virtual void connect(const android::sp<qClient::IQClient>& client) = 0; |
Jeykumar Sankaran | 9f59a76 | 2013-02-28 10:45:56 -0800 | [diff] [blame] | 57 | virtual android::status_t screenRefresh() = 0; |
Arun Kumar K.R | ffef748 | 2013-04-10 14:17:22 -0700 | [diff] [blame] | 58 | virtual void setExtOrientation(uint32_t orientation) = 0; |
Arun Kumar K.R | fb5bfa6 | 2013-07-25 03:10:51 -0700 | [diff] [blame] | 59 | virtual void setBufferMirrorMode(uint32_t enable) = 0; |
Naseer Ahmed | 58780b9 | 2013-07-29 17:41:40 -0400 | [diff] [blame] | 60 | virtual android::status_t vpuCommand(uint32_t command, uint32_t setting) = 0; |
Saurabh Shah | 56f610d | 2012-08-07 15:27:06 -0700 | [diff] [blame] | 61 | }; |
| 62 | |
| 63 | // ---------------------------------------------------------------------------- |
| 64 | |
| 65 | class BnQService : public android::BnInterface<IQService> |
| 66 | { |
| 67 | public: |
| 68 | virtual android::status_t onTransact( uint32_t code, |
| 69 | const android::Parcel& data, |
| 70 | android::Parcel* reply, |
| 71 | uint32_t flags = 0); |
| 72 | }; |
| 73 | |
| 74 | // ---------------------------------------------------------------------------- |
| 75 | }; // namespace qService |
| 76 | |
| 77 | #endif // ANDROID_IQSERVICE_H |