nkk71 | 71c6c50 | 2017-01-05 23:55:05 +0200 | [diff] [blame] | 1 | /* |
| 2 | Copyright 2017 TeamWin |
| 3 | This file is part of TWRP/TeamWin Recovery Project. |
| 4 | |
| 5 | TWRP is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by |
| 7 | the Free Software Foundation, either version 3 of the License, or |
| 8 | (at your option) any later version. |
| 9 | |
| 10 | TWRP is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | GNU General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU General Public License |
| 16 | along with TWRP. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ |
| 18 | |
| 19 | #ifndef _VOLD_DECRYPT_H |
| 20 | #define _VOLD_DECRYPT_H |
| 21 | |
| 22 | #include <string> |
| 23 | |
nkk71 | 7d1222a | 2017-11-06 17:27:21 +0200 | [diff] [blame] | 24 | // -_- |
| 25 | enum { |
| 26 | VD_SUCCESS = 0, |
| 27 | VD_ERR_DECRYPTION_FAILED = -1, |
| 28 | VD_ERR_UNABLE_TO_MOUNT_SYSTEM = -2, |
| 29 | VD_ERR_MISSING_VOLD = -3, |
| 30 | VD_ERR_MISSING_VDC = -4, |
| 31 | VD_ERR_VDC_FAILED_TO_CONNECT = -5, |
| 32 | VD_ERR_VOLD_FAILED_TO_START = -6, |
| 33 | VD_ERR_VOLD_UNEXPECTED_RESPONSE = -7, |
| 34 | VD_ERR_VOLD_OPERATION_TIMEDOUT = -8, |
| 35 | VD_ERR_FORK_EXECL_ERROR = -9, |
| 36 | VD_ERR_PASSWORD_EMPTY = -10, |
nijel8 | 2c821a8 | 2018-12-29 04:56:41 -0500 | [diff] [blame] | 37 | VD_ERR_UNABLE_TO_MOUNT_EXTRA = -11, |
nkk71 | 7d1222a | 2017-11-06 17:27:21 +0200 | [diff] [blame] | 38 | }; |
| 39 | |
| 40 | |
| 41 | int vold_decrypt(const std::string& Password); |
nkk71 | 71c6c50 | 2017-01-05 23:55:05 +0200 | [diff] [blame] | 42 | |
| 43 | #endif // _VOLD_DECRYPT_H |