blob: ff034be350a76d6712cbd98f5bb5ae1540f9c20d [file] [log] [blame]
Saurabh Shah56f610d2012-08-07 15:27:06 -07001/*
2 * Copyright (C) 2010 The Android Open Source Project
Saurabh Shah86c17292013-02-08 15:24:13 -08003 * Copyright (C) 2012-2013, The Linux Foundation. All rights reserved.
Saurabh Shah56f610d2012-08-07 15:27:06 -07004 *
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 Shah86c17292013-02-08 15:24:13 -080029#include <binder/IBinder.h>
30#include <IQClient.h>
Saurabh Shah56f610d2012-08-07 15:27:06 -070031
32namespace qService {
33// ----------------------------------------------------------------------------
34class IQService : public android::IInterface
35{
36public:
37 DECLARE_META_INTERFACE(QService);
38 enum {
Saurabh Shah86c17292013-02-08 15:24:13 -080039 // Hardware securing start/end notification
40 SECURING = android::IBinder::FIRST_CALL_TRANSACTION,
Saurabh Shah56f610d2012-08-07 15:27:06 -070041 UNSECURING, // Hardware unsecuring start/end notification
Saurabh Shah86c17292013-02-08 15:24:13 -080042 CONNECT,
Jeykumar Sankaran9f59a762013-02-28 10:45:56 -080043 SCREEN_REFRESH,
Arun Kumar K.Rffef7482013-04-10 14:17:22 -070044 EXTERNAL_ORIENTATION,
Saurabh Shah56f610d2012-08-07 15:27:06 -070045 };
46 enum {
47 END = 0,
48 START,
49 };
50 virtual void securing(uint32_t startEnd) = 0;
51 virtual void unsecuring(uint32_t startEnd) = 0;
Saurabh Shah86c17292013-02-08 15:24:13 -080052 virtual void connect(const android::sp<qClient::IQClient>& client) = 0;
Jeykumar Sankaran9f59a762013-02-28 10:45:56 -080053 virtual android::status_t screenRefresh() = 0;
Arun Kumar K.Rffef7482013-04-10 14:17:22 -070054 virtual void setExtOrientation(uint32_t orientation) = 0;
Saurabh Shah56f610d2012-08-07 15:27:06 -070055};
56
57// ----------------------------------------------------------------------------
58
59class BnQService : public android::BnInterface<IQService>
60{
61public:
62 virtual android::status_t onTransact( uint32_t code,
63 const android::Parcel& data,
64 android::Parcel* reply,
65 uint32_t flags = 0);
66};
67
68// ----------------------------------------------------------------------------
69}; // namespace qService
70
71#endif // ANDROID_IQSERVICE_H