Diffstat (limited to 'core/launcher/launcherglobal.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/launcher/launcherglobal.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/core/launcher/launcherglobal.cpp b/core/launcher/launcherglobal.cpp index 84caa93..9abcae9 100644 --- a/core/launcher/launcherglobal.cpp +++ b/core/launcher/launcherglobal.cpp @@ -1,57 +1,53 @@ /* * GPLv2 only * * TT 2002-2002,2003 */ -#include <qstring.h> -#include <qcstring.h> -#include <qwidget.h> -#include <qguardedptr.h> #include <qfile.h> #include <qtextstream.h> #include <qtopia/mimetype.h> #include "launcherglobal.h" bool Opie::Global::isAppLnkFileName( const QString& file ) { if ( file.right(1) == "/" ) return FALSE; return file.find(MimeType::appsFolderName()+"/")==0; } QString Opie::Global::tempDir() { return QString::fromLatin1("/tmp/"); } Global::Command* Opie::Global::builtinCommands() { return builtin; } QGuardedPtr<QWidget>* Opie::Global::builtinRunning() { return running; } QString Opie::Global::uuid() { QFile file( "/proc/sys/kernel/random/uuid" ); if (!file.open(IO_ReadOnly ) ) return QString::null; QTextStream stream(&file); return "{" + stream.read().stripWhiteSpace() + "}"; } QByteArray Opie::Global::encodeBase64(const QByteArray& origData ) { // follows simple algorithm from rsync code uchar *in = (uchar*)origData.data(); int inbytes = origData.size(); int outbytes = ((inbytes * 8) + 5) / 6; int padding = 4-outbytes%4; if ( padding == 4 ) padding = 0; QByteArray outbuf(outbytes+padding); uchar* out = (uchar*)outbuf.data(); const char *b64 = |