• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEsu

client.h

Go to the documentation of this file.
00001 /* vi: ts=8 sts=4 sw=4
00002  *
00003  * This file is part of the KDE project, module kdesu.
00004  * Copyright (C) 1999,2000 Geert Jansen <jansen@kde.org>
00005  *
00006  * This is free software; you can use this library under the GNU Library
00007  * General Public License, version 2. See the file "COPYING.LIB" for the
00008  * exact licensing terms.
00009  *
00010  * client.h: client to access kdesud.
00011  */
00012 
00013 #ifndef __KDE_su_Client_h_Included__
00014 #define __KDE_su_Client_h_Included__
00015 
00016 #include <QtCore/QBool>
00017 #include <QtCore/QList>
00018 #include <kdesu/kdesu_export.h>
00019 
00020 #ifdef Q_OS_UNIX
00021 
00022 #include <sys/types.h>
00023 #include <sys/socket.h>
00024 #include <sys/un.h>
00025 
00026 #include <QtCore/QByteArray>
00027 
00028 namespace KDESu {
00029 
00048 class KDESU_EXPORT KDEsuClient {
00049 public:
00050     KDEsuClient();
00051     ~KDEsuClient();
00052 
00063     int exec(const QByteArray &command, const QByteArray &user, const QByteArray &options=0, const QList<QByteArray> &env=QList<QByteArray>());
00064 
00069     int exitCode();
00070 
00078     int setPass(const char *pass, int timeout);
00079 
00083     int setHost(const QByteArray &host);
00084 
00088     int setPriority(int priority);
00089 
00093     int setScheduler(int scheduler);
00094 
00101     int delCommand(const QByteArray &command, const QByteArray &user);
00102 
00112     int setVar(const QByteArray &key, const QByteArray &value, int timeout=0, const QByteArray &group=0);
00113 
00119     QByteArray getVar(const QByteArray &key);
00120 
00126     QList<QByteArray> getKeys(const QByteArray &group);
00127 
00135     bool findGroup(const QByteArray &group);
00136 
00142     int delVar(const QByteArray &key);
00143 
00159     int delVars(const QByteArray &special_key);
00160 
00167     int delGroup(const QByteArray &group);
00168 
00173     int ping();
00174 
00178     int stopServer();
00179 
00183     int startServer();
00184 
00188     bool isServerSGID();
00189 
00190 private:
00191     int connect();
00192 
00193     int command(const QByteArray &cmd, QByteArray *result=0L);
00194     QByteArray escape(const QByteArray &str);
00195 
00196     class KDEsuClientPrivate;
00197     KDEsuClientPrivate* const d;
00198 };
00199 
00200 } //END namespace KDESu
00201 
00202 #endif //Q_OS_UNIX
00203 
00204 #endif //__KDE_su_Client_h_Included__

KDEsu

Skip menu "KDEsu"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal