• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdesu
 

kdesu

  • kdesu
client.h
1 /* vi: ts=8 sts=4 sw=4
2  *
3  * $Id$
4  *
5  * This file is part of the KDE project, module kdesu.
6  * Copyright (C) 1999,2000 Geert Jansen <jansen@kde.org>
7  *
8  * This is free software; you can use this library under the GNU Library
9  * General Public License, version 2. See the file "COPYING.LIB" for the
10  * exact licensing terms.
11  *
12  * client.h: client to access kdesud.
13  */
14 
15 #ifndef __KDE_su_Client_h_Included__
16 #define __KDE_su_Client_h_Included__
17 
18 #include <tqglobal.h>
19 #include <kdelibs_export.h>
20 
21 #ifdef Q_OS_UNIX
22 
23 #include <sys/types.h>
24 #include <sys/socket.h>
25 #include <sys/un.h>
26 
27 #include <tqcstring.h>
28 #include <tqvaluelist.h>
29 
30 typedef TQValueList<TQCString> QCStringList;
31 
50 class KDESU_EXPORT KDEsuClient {
51 public:
52  KDEsuClient();
53  ~KDEsuClient();
54 
65  int exec(const TQCString &command, const TQCString &user, const TQCString &options=0, const QCStringList &env=QCStringList());
66 
71  int exitCode();
72 
80  int setPass(const char *pass, int timeout);
81 
85  int setHost(const TQCString &host);
86 
90  int setPriority(int priority);
91 
95  int setScheduler(int scheduler);
96 
103  int delCommand(const TQCString &command, const TQCString &user);
104 
114  int setVar(const TQCString &key, const TQCString &value, int timeout=0, const TQCString &group=0);
115 
121  TQCString getVar(const TQCString &key);
122 
128  TQValueList<TQCString> getKeys(const TQCString &group);
129 
137  bool findGroup(const TQCString &group);
138 
144  int delVar(const TQCString &key);
145 
161  int delVars(const TQCString &special_key);
162 
169  int delGroup(const TQCString &group);
170 
175  int ping();
176 
180  int stopServer();
181 
185  int startServer();
186 
190  bool isServerSGID();
191 
192 private:
193  int connect();
194 
195  int sockfd;
196  TQCString sock;
197 
198  int command(const TQCString &cmd, TQCString *result=0L);
199  TQCString escape(const TQCString &str);
200 
201  class KDEsuClientPrivate;
202  KDEsuClientPrivate *d;
203 };
204 
205 #endif //Q_OS_UNIX
206 
207 #endif //__KDE_su_Client_h_Included__

kdesu

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

kdesu

Skip menu "kdesu"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdesu by doxygen 1.8.3.1
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |