author | mickeyl <mickeyl> | 2004-01-13 19:19:34 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-01-13 19:19:34 (UTC) |
commit | 399cf645e63e53043975fa2b26768d8db6d83ee4 (patch) (unidiff) | |
tree | d6138ca3bab8edc6b8fd02b134ae2d8e395cee33 | |
parent | 061ccf5b9d384b1f24d203e96f1f04ccf1dcf133 (diff) | |
download | opie-399cf645e63e53043975fa2b26768d8db6d83ee4.zip opie-399cf645e63e53043975fa2b26768d8db6d83ee4.tar.gz opie-399cf645e63e53043975fa2b26768d8db6d83ee4.tar.bz2 |
comments should go into the header file
-rw-r--r-- | libopie2/opiecore/ostorageinfo.cpp | 11 | ||||
-rw-r--r-- | libopie2/opiecore/ostorageinfo.h | 21 |
2 files changed, 19 insertions, 13 deletions
diff --git a/libopie2/opiecore/ostorageinfo.cpp b/libopie2/opiecore/ostorageinfo.cpp index a45fcb6..aa8d2fc 100644 --- a/libopie2/opiecore/ostorageinfo.cpp +++ b/libopie2/opiecore/ostorageinfo.cpp | |||
@@ -1,92 +1,85 @@ | |||
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 | OStorageInfo::OStorageInfo( QObject *parent ) | 32 | OStorageInfo::OStorageInfo( QObject *parent ) |
33 | : StorageInfo( parent ) | 33 | : StorageInfo( parent ) |
34 | { | 34 | { |
35 | } | 35 | } |
36 | 36 | ||
37 | OStorageInfo::~OStorageInfo() | 37 | OStorageInfo::~OStorageInfo() |
38 | { | 38 | { |
39 | } | 39 | } |
40 | 40 | ||
41 | QString OStorageInfo::cfPath()const | 41 | QString OStorageInfo::cfPath()const |
42 | { | 42 | { |
43 | QString r = ""; | 43 | QString r = ""; |
44 | 44 | ||
45 | for (QListIterator<FileSystem> i( fileSystems() ); i.current(); ++i) | 45 | for (QListIterator<FileSystem> i( fileSystems() ); i.current(); ++i) |
46 | { | 46 | { |
47 | if ( (*i)->disk().left( 8 ) == "/dev/hda" ) | 47 | if ( (*i)->disk().left( 8 ) == "/dev/hda" ) |
48 | { | 48 | { |
49 | r = (*i)->path(); | 49 | r = (*i)->path(); |
50 | break; | 50 | break; |
51 | } | 51 | } |
52 | } | 52 | } |
53 | return r; | 53 | return r; |
54 | } | 54 | } |
55 | 55 | ||
56 | /*! | ||
57 | * @brief returns the Mount-Path of Sd Card | ||
58 | * | ||
59 | */ | ||
60 | QString OStorageInfo::sdPath()const | 56 | QString OStorageInfo::sdPath()const |
61 | { | 57 | { |
62 | QString r = ""; | 58 | QString r = ""; |
63 | 59 | ||
64 | for (QListIterator<FileSystem> i( fileSystems() ); i.current(); ++i) | 60 | for (QListIterator<FileSystem> i( fileSystems() ); i.current(); ++i) |
65 | { | 61 | { |
66 | if ( (*i)->disk().left( 9 ) == "/dev/mmcd" ) | 62 | if ( (*i)->disk().left( 9 ) == "/dev/mmcd" ) |
67 | { | 63 | { |
68 | r = (*i)->path(); | 64 | r = (*i)->path(); |
69 | break; | 65 | break; |
70 | } | 66 | } |
71 | } | 67 | } |
72 | return r; | 68 | return r; |
73 | } | 69 | } |
74 | 70 | ||
75 | /*! | ||
76 | * @brief returns the Mount-Path of Mmc Card | ||
77 | * | ||
78 | */ | ||
79 | QString OStorageInfo::mmcPath()const | 71 | QString OStorageInfo::mmcPath()const |
80 | { | 72 | { |
81 | QString r = ""; | 73 | QString r = ""; |
82 | 74 | ||
83 | for (QListIterator<FileSystem> i( fileSystems() ); i.current(); ++i) | 75 | for (QListIterator<FileSystem> i( fileSystems() ); i.current(); ++i) |
84 | { | 76 | { |
85 | if ( (*i)->disk().left( 14 ) == "/dev/mmc/part1" ) | 77 | if ( (*i)->disk().left( 14 ) == "/dev/mmc/part1" ) |
86 | { | 78 | { |
87 | r = (*i)->path(); | 79 | r = (*i)->path(); |
88 | break; | 80 | break; |
89 | } | 81 | } |
90 | } | 82 | } |
91 | return r; | 83 | return r; |
92 | } | 84 | } |
85 | |||
diff --git a/libopie2/opiecore/ostorageinfo.h b/libopie2/opiecore/ostorageinfo.h index 9b61a2e..740fa85 100644 --- a/libopie2/opiecore/ostorageinfo.h +++ b/libopie2/opiecore/ostorageinfo.h | |||
@@ -1,49 +1,62 @@ | |||
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 | #ifndef OSTORAGE_H | 30 | #ifndef OSTORAGE_H |
31 | #define OSTORAGE_H | 31 | #define OSTORAGE_H |
32 | 32 | ||
33 | #include <qpe/storage.h> | 33 | #include <qpe/storage.h> |
34 | 34 | ||
35 | class OStorageInfo : public StorageInfo | 35 | class OStorageInfo : public StorageInfo |
36 | { | 36 | { |
37 | Q_OBJECT | 37 | Q_OBJECT |
38 | 38 | ||
39 | public: | 39 | public: |
40 | public: | 40 | |
41 | OStorageInfo( QObject *parent=0 ); | 41 | OStorageInfo( QObject *parent=0 ); |
42 | ~OStorageInfo(); | 42 | ~OStorageInfo(); |
43 | 43 | ||
44 | QString cfPath()const; | 44 | /** |
45 | QString sdPath()const; | 45 | * @returns the mount path of the CF (Compact Flash) card |
46 | QString mmcPath()const; | 46 | * |
47 | **/ | ||
48 | QString cfPath() const; | ||
49 | /** | ||
50 | * @returns the mount path of the SD (Secure Digital) card | ||
51 | * | ||
52 | **/ | ||
53 | QString sdPath() const; | ||
54 | /** | ||
55 | * @returns the mount path of the MMC (MultiMedia) card | ||
56 | * | ||
57 | **/ | ||
58 | QString mmcPath() const; | ||
47 | }; | 59 | }; |
48 | 60 | ||
49 | #endif // OSTORAGE_H | 61 | #endif // OSTORAGE_H |
62 | |||