author | tille <tille> | 2002-05-01 14:00:09 (UTC) |
---|---|---|
committer | tille <tille> | 2002-05-01 14:00:09 (UTC) |
commit | e729a9bdd9f37f4bd610d10122f002a0540c93ed (patch) (unidiff) | |
tree | a23696d8742a36b57256281dc7e2f7848407be61 /noncore/unsupported/oipkg/package.cpp | |
parent | 7e5615473c1d103db66f42ae60bf9ed57d52566c (diff) | |
download | opie-e729a9bdd9f37f4bd610d10122f002a0540c93ed.zip opie-e729a9bdd9f37f4bd610d10122f002a0540c93ed.tar.gz opie-e729a9bdd9f37f4bd610d10122f002a0540c93ed.tar.bz2 |
added ipkgfind remote query
Diffstat (limited to 'noncore/unsupported/oipkg/package.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/package.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp index 0499e19..6bb53a9 100644 --- a/noncore/unsupported/oipkg/package.cpp +++ b/noncore/unsupported/oipkg/package.cpp | |||
@@ -28,6 +28,7 @@ void Package::init( PackageManagerSettings *s ) | |||
28 | _desc = ""; | 28 | _desc = ""; |
29 | _name = ""; | 29 | _name = ""; |
30 | _toProcess = false; | 30 | _toProcess = false; |
31 | _useFileName = false; | ||
31 | _status = ""; | 32 | _status = ""; |
32 | _dest = settings->getDestinationName(); | 33 | _dest = settings->getDestinationName(); |
33 | _link = settings->createLinks(); | 34 | _link = settings->createLinks(); |
@@ -48,7 +49,8 @@ Package::Package( QString n, PackageManagerSettings *s ) | |||
48 | }else{ | 49 | }else{ |
49 | parseIpkgFile( n ); | 50 | parseIpkgFile( n ); |
50 | _toProcess = true; | 51 | _toProcess = true; |
51 | _packageName = QString( n ); | 52 | _useFileName = true; |
53 | _fileName = QString( n ); | ||
52 | } | 54 | } |
53 | } | 55 | } |
54 | 56 | ||
@@ -90,7 +92,7 @@ void Package::setValue( QString n, QString t ) | |||
90 | 92 | ||
91 | }else if ( n == "Filename") | 93 | }else if ( n == "Filename") |
92 | { | 94 | { |
93 | 95 | _fileName = t; | |
94 | }else if ( n == "Size") | 96 | }else if ( n == "Size") |
95 | { | 97 | { |
96 | 98 | ||
@@ -118,6 +120,13 @@ QString Package::name() | |||
118 | return _name; | 120 | return _name; |
119 | } | 121 | } |
120 | 122 | ||
123 | |||
124 | QString Package::installName() | ||
125 | { | ||
126 | if (_useFileName) return _fileName; | ||
127 | else return _name; | ||
128 | } | ||
129 | |||
121 | bool Package::installed() | 130 | bool Package::installed() |
122 | { | 131 | { |
123 | return _status.contains("installed"); | 132 | return _status.contains("installed"); |
@@ -331,8 +340,13 @@ void Package::parseIpkgFile( QString file) | |||
331 | 340 | ||
332 | } | 341 | } |
333 | 342 | ||
334 | QString Package::getPackageName() | 343 | //QString Package::getPackageName() |
344 | //{ | ||
345 | //if ( _packageName.isEmpty() ) return _name; | ||
346 | //else return _packageName; | ||
347 | //} | ||
348 | |||
349 | void Package::instalFromFile(bool iff) | ||
335 | { | 350 | { |
336 | if ( _packageName.isEmpty() ) return _name; | 351 | _useFileName = iff; |
337 | else return _packageName; | ||
338 | } | 352 | } |