• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDEsu

  • kdesu
client.h
Go to the documentation of this file.
1/* vi: ts=8 sts=4 sw=4
2 *
3 * This file is part of the KDE project, module kdesu.
4 * Copyright (C) 1999,2000 Geert Jansen <jansen@kde.org>
5 *
6 * This is free software; you can use this library under the GNU Library
7 * General Public License, version 2. See the file "COPYING.LIB" for the
8 * exact licensing terms.
9 *
10 * client.h: client to access kdesud.
11 */
12
13#ifndef __KDE_su_Client_h_Included__
14#define __KDE_su_Client_h_Included__
15
16#include <QtCore/QBool>
17#include <QtCore/QList>
18#include <kdesu/kdesu_export.h>
19
20#ifdef Q_OS_UNIX
21
22#include <sys/types.h>
23#include <sys/socket.h>
24#include <sys/un.h>
25
26#include <QtCore/QByteArray>
27
28namespace KDESu {
29
48class KDESU_EXPORT KDEsuClient {
49public:
50 KDEsuClient();
51 ~KDEsuClient();
52
63 int exec(const QByteArray &command, const QByteArray &user, const QByteArray &options=0, const QList<QByteArray> &env=QList<QByteArray>());
64
69 int exitCode();
70
78 int setPass(const char *pass, int timeout);
79
83 int setHost(const QByteArray &host);
84
88 int setPriority(int priority);
89
93 int setScheduler(int scheduler);
94
101 int delCommand(const QByteArray &command, const QByteArray &user);
102
112 int setVar(const QByteArray &key, const QByteArray &value, int timeout=0, const QByteArray &group=0);
113
119 QByteArray getVar(const QByteArray &key);
120
126 QList<QByteArray> getKeys(const QByteArray &group);
127
135 bool findGroup(const QByteArray &group);
136
142 int delVar(const QByteArray &key);
143
159 int delVars(const QByteArray &special_key);
160
167 int delGroup(const QByteArray &group);
168
173 int ping();
174
178 int stopServer();
179
183 int startServer();
184
188 bool isServerSGID();
189
190private:
191 int connect();
192
193 int command(const QByteArray &cmd, QByteArray *result=0L);
194 QByteArray escape(const QByteArray &str);
195
196 class KDEsuClientPrivate;
197 KDEsuClientPrivate* const d;
198};
199
200} //END namespace KDESu
201
202#endif //Q_OS_UNIX
203
204#endif //__KDE_su_Client_h_Included__
KDESu::KDEsuClient
A client class to access kdesud, the KDE su daemon.
Definition: client.h:48
QList
kdesu_export.h
timeout
int timeout
KDESu
Definition: client.cpp:41
group
group
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEsu

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal