KDECore
kshell.h
Go to the documentation of this file.00001 /* 00002 This file is part of the KDE libraries 00003 00004 Copyright (c) 2003 Oswald Buddenhagen <ossi@kde.org> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 */ 00021 #ifndef _KSHELL_H 00022 #define _KSHELL_H 00023 00024 #include <qstring.h> 00025 #include <qstringlist.h> 00026 #include "kdelibs_export.h" 00027 00035 namespace KShell { 00036 00040 enum Options { 00041 NoOptions = 0, 00042 00046 TildeExpand = 1, 00047 00058 AbortOnMeta = 2 00059 }; 00060 00064 enum Errors { 00068 NoError = 0, 00069 00073 BadQuoting, 00074 00079 FoundMeta 00080 }; 00081 00093 KDECORE_EXPORT QStringList splitArgs( const QString &cmd, int flags = 0, int *err = 0 ); 00094 00101 KDECORE_EXPORT QString joinArgs( const QStringList &args ); 00102 00113 KDECORE_EXPORT QString joinArgsDQ( const QStringList &args ); 00114 00124 KDECORE_EXPORT QString joinArgs( const char * const *argv, int argc = -1 ); 00125 00133 KDECORE_EXPORT QString tildeExpand( const QString &path ); 00134 00142 KDECORE_EXPORT QString homeDir( const QString &user ); 00143 00144 } 00145 00146 00147 #endif /* _KSHELL_H */