KDEsu
stub.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __Stub_h_Included__
00012 #define __Stub_h_Included__
00013
00014 #include <QtCore/QByteRef>
00015 #include <QtCore/QList>
00016
00017 #include "process.h"
00018
00019 #include <kdesu/kdesu_export.h>
00020
00021 namespace KDESu {
00022
00023 namespace KDESuPrivate { class KCookie; }
00024
00025
00032 class KDESU_EXPORT StubProcess: public PtyProcess
00033 {
00034 public:
00035 StubProcess();
00036 ~StubProcess();
00037
00041 void setCommand(const QByteArray &command);
00042
00046 void setUser(const QByteArray &user);
00047
00051 void setXOnly(bool xonly);
00052
00058 void setPriority(int prio);
00059
00064 enum Scheduler { SchedNormal, SchedRealtime };
00065
00069 void setScheduler(int sched);
00070
00071 protected:
00072
00076 int ConverseStub(int check);
00077
00082 virtual QByteArray display();
00083 #ifdef Q_WS_X11
00084
00087 virtual QByteArray displayAuth();
00088 #endif
00089 bool m_bXOnly;
00090 int m_Priority;
00091 int m_Scheduler;
00092 QByteArray m_Command;
00093 QByteArray m_User;
00094 KDESuPrivate::KCookie *m_pCookie;
00095
00096 private:
00097 QByteArray commaSeparatedList(const QList<QByteArray> &);
00098
00099 protected:
00100 virtual void virtual_hook( int id, void* data );
00101 private:
00102 class StubProcessPrivate;
00103 StubProcessPrivate * const d;
00104 };
00105
00106 }
00107
00108 #endif // __Stub_h_Included__