blob: d0821bb9c2e6ff522447f5cc802332fafc43b6f5 [file] [log] [blame]
Dees_Troy51a0e822012-09-05 15:24:24 -04001/* Partition Management classes for TWRP
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
15 * 02110-1301, USA.
16 *
17 * The code was written from scratch by Dees_Troy dees_troy at
18 * yahoo
19 *
20 * Copyright (c) 2012
21 */
22
23#include <stdio.h>
24#include <stdlib.h>
25#include <string.h>
26#include <sys/stat.h>
27#include <sys/vfs.h>
28#include <unistd.h>
29
30#include "variables.h"
31#include "common.h"
32#include "partitions.hpp"
33
34int TWPartitionManager::Process_Fstab(string Fstab_Filename, bool Display_Error) {
35 LOGI("STUB TWPartitionManager::Process_Fstab, Fstab_Filename: '%s', Display_Error: %i\n", Fstab_Filename.c_str(), Display_Error);
36 return 1;
37}
38
39int TWPartitionManager::Mount_By_Path(string Path, bool Display_Error) {
40 LOGI("STUB TWPartitionManager::Mount_By_Path, Path: '%s', Display_Error: %i\n", Path.c_str(), Display_Error);
41 return 1;
42}
43
44int TWPartitionManager::Mount_By_Block(string Block, bool Display_Error) {
45 LOGI("STUB TWPartitionManager::Mount_By_Block, Block: '%s', Display_Error: %i\n", Block.c_str(), Display_Error);
46 return 1;
47}
48
49int TWPartitionManager::Mount_By_Name(string Name, bool Display_Error) {
50 LOGI("STUB TWPartitionManager::Mount_By_Path, Name: '%s', Display_Error: %i\n", Name.c_str(), Display_Error);
51 return 1;
52}
53
54int TWPartitionManager::UnMount_By_Path(string Path, bool Display_Error) {
55 LOGI("STUB TWPartitionManager::UnMount_By_Path, Path: '%s', Display_Error: %i\n", Path.c_str(), Display_Error);
56 return 1;
57}
58
59int TWPartitionManager::UnMount_By_Block(string Block, bool Display_Error) {
60 LOGI("STUB TWPartitionManager::UnMount_By_Block, Block: '%s', Display_Error: %i\n", Block.c_str(), Display_Error);
61 return 1;
62}
63
64int TWPartitionManager::UnMount_By_Name(string Name, bool Display_Error) {
65 LOGI("STUB TWPartitionManager::UnMount_By_Name, Name: '%s', Display_Error: %i\n", Name.c_str(), Display_Error);
66 return 1;
67}
68
69int TWPartitionManager::Is_Mounted_By_Path(string Path) {
70 LOGI("STUB TWPartitionManager::Is_Mounted_By_Path, Path: '%s'\n", Path.c_str());
71 return 1;
72}
73
74int TWPartitionManager::Is_Mounted_By_Block(string Block) {
75 LOGI("STUB TWPartitionManager::Is_Mounted_By_Block, Block: '%s'\n", Block.c_str());
76 return 1;
77}
78
79int TWPartitionManager::Is_Mounted_By_Name(string Name) {
80 LOGI("STUB TWPartitionManager::Is_Mounted_By_Name, Name: '%s'\n", Name.c_str());
81 return 1;
82}
83
84int TWPartitionManager::Mount_Current_Storage(void) {
85 LOGI("STUB TWPartitionManager::Mount_Current_Storage\n");
86 return 1;
87}
88
89/**TWPartition TWPartitionManager::Find_Partition_By_Path(string Path) {
90 LOGI("STUB TWPartitionManager::Find_Partition_By_Path, Path: '%s'\n", Path.c_str());
91 return NULL;
92}
93
94*TWPartition TWPartitionManager::Find_Partition_By_Block(string Block) {
95 LOGI("STUB TWPartitionManager::Find_Partition_By_Block, Block: '%s'\n", Block.c_str());
96 return NULL;
97}*/
98
99int TWPartitionManager::Run_Backup(string Backup_Name) {
100 LOGI("STUB TWPartitionManager::Run_Backup, Backup_Name: '%s'\n", Backup_Name.c_str());
101 return 1;
102}
103
104int TWPartitionManager::Run_Restore(string Restore_Name) {
105 LOGI("STUB TWPartitionManager::Run_Restore, Restore_Name: '%s'\n", Restore_Name.c_str());
106 return 1;
107}
108
109void TWPartitionManager::Set_Restore_Files(string Restore_Name) {
110 LOGI("STUB TWPartitionManager::Set_Restore_Files\n");
111 return;
112}
113
114int TWPartitionManager::Wipe_By_Path(string Path) {
115 LOGI("STUB TWPartitionManager::Wipe_By_Path, Path: '%s'\n", Path.c_str());
116 return 1;
117}
118
119int TWPartitionManager::Wipe_By_Block(string Block) {
120 LOGI("STUB TWPartitionManager::Wipe_By_Block, Block: '%s'\n", Block.c_str());
121 return 1;
122}
123
124int TWPartitionManager::Wipe_By_Name(string Name) {
125 LOGI("STUB TWPartitionManager::Wipe_By_Name, Name: '%s'\n", Name.c_str());
126 return 1;
127}
128
129int TWPartitionManager::Factory_Reset(void) {
130 LOGI("STUB TWPartitionManager::Factory_Reset\n");
131 return 1;
132}
133
134void TWPartitionManager::Refresh_Sizes(void) {
135 LOGI("STUB TWPartitionManager::Refresh_Sizes\n");
136 return;
137}
138
139void TWPartitionManager::Update_System_Details(void) {
140 LOGI("STUB TWPartitionManager::Update_System_Details\n");
141 return;
142}
143
144int TWPartitionManager::Decrypt_Device(string Password) {
145 LOGI("STUB TWPartitionManager::Decrypt_Device, Password: '%s'\n", Password.c_str());
146 return 1;
147}