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
17package com.android.server.lights;
18
19public abstract class Light {
20    public static final int LIGHT_FLASH_NONE = 0;
21    public static final int LIGHT_FLASH_TIMED = 1;
22    public static final int LIGHT_FLASH_HARDWARE = 2;
23
24    /**
25     * Light brightness is managed by a user setting.
26     */
27    public static final int BRIGHTNESS_MODE_USER = 0;
28
29    /**
30     * Light brightness is managed by a light sensor.
31     */
32    public static final int BRIGHTNESS_MODE_SENSOR = 1;
33
34    /**
35     * Low-persistence light mode.
36     */
37    public static final int BRIGHTNESS_MODE_LOW_PERSISTENCE = 2;
38
39    public abstract void setBrightness(int brightness);
40    public abstract void setBrightness(int brightness, int brightnessMode);
41    public abstract void setColor(int color);
42    public abstract void setFlashing(int color, int mode, int onMS, int offMS);
43    public abstract void pulse();
44    public abstract void pulse(int color, int onMS);
45    public abstract void turnOff();
46}
47