Diffstat (limited to 'libopie2/opiecore/ostorageinfo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/ostorageinfo.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libopie2/opiecore/ostorageinfo.cpp b/libopie2/opiecore/ostorageinfo.cpp index aa8d2fc..8fcf5fc 100644 --- a/libopie2/opiecore/ostorageinfo.cpp +++ b/libopie2/opiecore/ostorageinfo.cpp | |||
@@ -1,85 +1,87 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) 2004 Andreas 'ar' Richter <ar@oszine.de> | 3 | Copyright (C) 2004 Andreas 'ar' Richter <ar@oszine.de> |
4 | =. | 4 | =. |
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <opie2/ostorageinfo.h> | 30 | #include <opie2/ostorageinfo.h> |
31 | 31 | ||
32 | using namespace Opie::Core; | ||
33 | |||
32 | OStorageInfo::OStorageInfo( QObject *parent ) | 34 | OStorageInfo::OStorageInfo( QObject *parent ) |
33 | : StorageInfo( parent ) | 35 | : StorageInfo( parent ) |
34 | { | 36 | { |
35 | } | 37 | } |
36 | 38 | ||
37 | OStorageInfo::~OStorageInfo() | 39 | OStorageInfo::~OStorageInfo() |
38 | { | 40 | { |
39 | } | 41 | } |
40 | 42 | ||
41 | QString OStorageInfo::cfPath()const | 43 | QString OStorageInfo::cfPath()const |
42 | { | 44 | { |
43 | QString r = ""; | 45 | QString r = ""; |
44 | 46 | ||
45 | for (QListIterator<FileSystem> i( fileSystems() ); i.current(); ++i) | 47 | for (QListIterator<FileSystem> i( fileSystems() ); i.current(); ++i) |
46 | { | 48 | { |
47 | if ( (*i)->disk().left( 8 ) == "/dev/hda" ) | 49 | if ( (*i)->disk().left( 8 ) == "/dev/hda" ) |
48 | { | 50 | { |
49 | r = (*i)->path(); | 51 | r = (*i)->path(); |
50 | break; | 52 | break; |
51 | } | 53 | } |
52 | } | 54 | } |
53 | return r; | 55 | return r; |
54 | } | 56 | } |
55 | 57 | ||
56 | QString OStorageInfo::sdPath()const | 58 | QString OStorageInfo::sdPath()const |
57 | { | 59 | { |
58 | QString r = ""; | 60 | QString r = ""; |
59 | 61 | ||
60 | for (QListIterator<FileSystem> i( fileSystems() ); i.current(); ++i) | 62 | for (QListIterator<FileSystem> i( fileSystems() ); i.current(); ++i) |
61 | { | 63 | { |
62 | if ( (*i)->disk().left( 9 ) == "/dev/mmcd" ) | 64 | if ( (*i)->disk().left( 9 ) == "/dev/mmcd" ) |
63 | { | 65 | { |
64 | r = (*i)->path(); | 66 | r = (*i)->path(); |
65 | break; | 67 | break; |
66 | } | 68 | } |
67 | } | 69 | } |
68 | return r; | 70 | return r; |
69 | } | 71 | } |
70 | 72 | ||
71 | QString OStorageInfo::mmcPath()const | 73 | QString OStorageInfo::mmcPath()const |
72 | { | 74 | { |
73 | QString r = ""; | 75 | QString r = ""; |
74 | 76 | ||
75 | for (QListIterator<FileSystem> i( fileSystems() ); i.current(); ++i) | 77 | for (QListIterator<FileSystem> i( fileSystems() ); i.current(); ++i) |
76 | { | 78 | { |
77 | if ( (*i)->disk().left( 14 ) == "/dev/mmc/part1" ) | 79 | if ( (*i)->disk().left( 14 ) == "/dev/mmc/part1" ) |
78 | { | 80 | { |
79 | r = (*i)->path(); | 81 | r = (*i)->path(); |
80 | break; | 82 | break; |
81 | } | 83 | } |
82 | } | 84 | } |
83 | return r; | 85 | return r; |
84 | } | 86 | } |
85 | 87 | ||