summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/oglobal.cpp
authorzecke <zecke>2004-03-13 19:51:45 (UTC)
committer zecke <zecke>2004-03-13 19:51:45 (UTC)
commit6d08277737e22b7a1527124623f3571969073ddf (patch) (unidiff)
tree4129e674e21df767b31299e873dd44e33a308e1b /libopie2/opiecore/oglobal.cpp
parent8e28911f7199f4450ac5eef09482069f9b9caea2 (diff)
downloadopie-6d08277737e22b7a1527124623f3571969073ddf.zip
opie-6d08277737e22b7a1527124623f3571969073ddf.tar.gz
opie-6d08277737e22b7a1527124623f3571969073ddf.tar.bz2
Move XML class to internal PIM
Add namespaces!!! Opie::Core and Opie::Core::Private Opie::Net and Opie::Net::Private Opie::Ui and Opie::Ui::Private Opie::MM and Opie::MM::Private Opie::DB and Opie::DB::Private PIM classes are not yet converted because we will do other work on it as well
Diffstat (limited to 'libopie2/opiecore/oglobal.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/oglobal.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libopie2/opiecore/oglobal.cpp b/libopie2/opiecore/oglobal.cpp
index 1aa206e..ea02058 100644
--- a/libopie2/opiecore/oglobal.cpp
+++ b/libopie2/opiecore/oglobal.cpp
@@ -35,12 +35,14 @@
35#include <qpe/qpeapplication.h> 35#include <qpe/qpeapplication.h>
36#include <qpe/storage.h> 36#include <qpe/storage.h>
37 37
38#include <unistd.h> 38#include <unistd.h>
39#include <sys/types.h> 39#include <sys/types.h>
40 40
41using namespace Opie::Core;
42
41static const char Base64EncMap[64] = 43static const char Base64EncMap[64] =
42{ 44{
43 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 45 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
44 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 46 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50,
45 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 47 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58,
46 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 48 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66,
@@ -309,24 +311,24 @@ QByteArray OGlobal::decodeBase64( const QByteArray& in) {
309 311
310 return out; 312 return out;
311} 313}
312 314
313bool OGlobal::isAppLnkFileName( const QString& str ) 315bool OGlobal::isAppLnkFileName( const QString& str )
314{ 316{
315 if (str.length()==0||str.at(str.length()-1)==QDir::separator()) return false; 317 if (str.isEmpty()||str.at(str.length()-1)==QDir::separator()) return false;
316 return str.startsWith(MimeType::appsFolderName()+QDir::separator()); 318 return str.startsWith(MimeType::appsFolderName()+QDir::separator());
317} 319}
318 320
319/* ToDo: 321/* ToDo:
320 * This fun should check the document-path value for the mounted media 322 * This fun should check the document-path value for the mounted media
321 * which has to be implemented later. this moment we just check for a 323 * which has to be implemented later. this moment we just check for a
322 * mounted media name. 324 * mounted media name.
323 */ 325 */
324bool OGlobal::isDocumentFileName( const QString& file ) 326bool OGlobal::isDocumentFileName( const QString& file )
325{ 327{
326 if (file.length()==0||file.at(file.length()-1)==QDir::separator()) return false; 328 if (file.isEmpty()||file.at(file.length()-1)==QDir::separator()) return false;
327 if (file.startsWith(QPEApplication::documentDir()+QDir::separator())) return true; 329 if (file.startsWith(QPEApplication::documentDir()+QDir::separator())) return true;
328 StorageInfo si; 330 StorageInfo si;
329 QList< FileSystem > fl = si.fileSystems(); 331 QList< FileSystem > fl = si.fileSystems();
330 FileSystem*fs; 332 FileSystem*fs;
331 for (fs = fl.first();fs!=0;fs=fl.next()) { 333 for (fs = fl.first();fs!=0;fs=fl.next()) {
332 if (fs->isRemovable()&&file.startsWith(fs->name()+QDir::separator())) 334 if (fs->isRemovable()&&file.startsWith(fs->name()+QDir::separator()))