blob: e04c0a76cc3bc3a5e449397ffb881b4a4a71d74f [file] [log] [blame]
Dees_Troy51a0e822012-09-05 15:24:24 -04001/*
2 * Copyright (C) 2007 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 REBOOT_H_
18#define REBOOT_H_
19
20typedef enum
21{
22 rb_current = 0,
23 rb_system,
24 rb_recovery,
25 rb_poweroff,
26 rb_bootloader, // May also be fastboot
27 rb_download,
28} RebootCommand;
29
30// tw_isRebootCommandSupported: Return 1 if command is supported, 0 if the command is not supported, -1 on error
31int tw_isRebootCommandSupported(RebootCommand command);
32
33// tw_setRebootMode: Set the reboot state (without rebooting). Return 0 on success, -1 on error or unsupported
34int tw_setRebootMode(RebootCommand command);
35
36// tw_reboot: Reboot the system. Return -1 on error, no return on success
37int tw_reboot(RebootCommand command);
38
39#endif // REBOOT_H_
40
41
42