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