16dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent/*
26dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent * Copyright (C) 2011 The Android Open Source Project
36dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent *
46dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent * Licensed under the Apache License, Version 2.0 (the "License");
56dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent * you may not use this file except in compliance with the License.
66dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent * You may obtain a copy of the License at
76dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent *
86dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent *      http://www.apache.org/licenses/LICENSE-2.0
96dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent *
106dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent * Unless required by applicable law or agreed to in writing, software
116dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent * distributed under the License is distributed on an "AS IS" BASIS,
126dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
136dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent * See the License for the specific language governing permissions and
146dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent * limitations under the License.
156dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent */
166dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent
176dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent#ifndef ANDROID_IPOWERMANAGER_H
186dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent#define ANDROID_IPOWERMANAGER_H
196dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent
206dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent#include <utils/Errors.h>
216dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent#include <binder/IInterface.h>
226dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent
236dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurentnamespace android {
246dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent
256dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent// ----------------------------------------------------------------------------
266dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent
276dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent// must be kept in sync with interface defined in IPowerManager.aidl
286dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurentclass IPowerManager : public IInterface
296dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent{
306dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurentpublic:
316dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent    DECLARE_META_INTERFACE(PowerManager);
326dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent
336dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent    virtual status_t acquireWakeLock(int flags, const sp<IBinder>& lock, const String16& tag) = 0;
346dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent    virtual status_t releaseWakeLock(const sp<IBinder>& lock, int flags) = 0;
356dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent};
366dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent
376dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent// ----------------------------------------------------------------------------
386dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent
396dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent}; // namespace android
406dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent
416dbdc40e9a317488fc5f6e14cf9e699bce9a9387Eric Laurent#endif // ANDROID_IPOWERMANAGER_H
42