24 #ifndef _NXCLIENTLIB_H_
25 #define _NXCLIENTLIB_H_
28 #include "nxsession.h"
57 virtual void write (
string msg) {}
58 virtual void write (
int num,
string msg) {}
59 virtual void error (
string msg) {}
60 virtual void debug (
string msg) {}
61 virtual void stdoutSignal (
string msg) {}
62 virtual void stderrSignal (
string msg) {}
63 virtual void stdinSignal (
string msg) {}
64 virtual void resumeSessionsSignal (list<NXResumeData>) {}
65 virtual void noSessionsSignal (
void) {}
66 virtual void serverCapacitySignal (
void) {}
67 virtual void connectedSuccessfullySignal (
void) {}
87 virtual void setIsFinished (
bool status) {}
88 virtual void processParseStdout (
void) {}
89 virtual void processParseStderr (
void) {}
90 virtual void loginFailed (
void) {}
91 virtual void readyproxy (
void) {}
92 virtual void doneAuth (
void) {}
122 void startedSignal (
string name);
123 void errorSignal (
int error);
124 void processFinishedSignal (
string name);
125 void readyReadStandardOutputSignal (
void);
126 void readyReadStandardErrorSignal (
void);
132 void noSessionsSignal (
void);
133 void loginFailedSignal (
void);
134 void readyForProxySignal (
void);
135 void authenticatedSignal (
void);
136 void sessionsSignal (list<NXResumeData>);
174 void invokeNXSSH (
string publicKey =
"supplied",
175 string serverHost =
"",
176 bool encryption =
true,
186 void write (
string data);
193 this->customPath = path;
199 void allowSSHConnect (
bool auth);
204 void invokeProxy (
void);
213 string parseSSH (
string message);
229 bool chooseResumable (
int n);
239 bool terminateSession (
int n);
241 void runSession (
void);
243 void startX11 (
string resolution,
string name);
245 bool needX11Probe (
void)
252 void doneAuth (
void);
253 void loginFailed (
void);
257 dbgln (
"Finishing up on signal"); this->isFinished =
true;
260 void readyproxy (
void)
262 dbgln (
"ready for nxproxy"); this->readyForProxy =
true;
266 void processParseStdout (
void);
267 void processParseStderr (
void);
274 void requestConfirmation (
string msg);
285 this->session.setUsername (this->nxuser);
294 this->session.setPassword (this->nxpass);
297 void setResolution (
int x,
int y)
299 this->session.setResolution(x, y);
302 void setDepth (
int depth)
304 this->session.setDepth(depth);
307 void setRender (
bool render)
309 this->session.setRender(render);
312 void setSessionData (NXSessionData *);
314 notQProcess* getNXSSHProcess (
void)
316 return this->nxsshProcess;
319 notQProcess* getNXProxyProcess (
void)
321 return this->nxproxyProcess;
324 notQProcess* getX11Process (
void)
326 return this->x11Process;
329 notQProcess* getNXAuthProcess (
void)
331 return this->nxauthProcess;
334 bool getIsFinished (
void)
336 return this->isFinished;
339 bool getReadyForProxy (
void)
341 return this->readyForProxy;
344 NXSession* getSession (
void)
346 return &this->session;
349 void setIsFinished (
bool status)
351 this->isFinished = status;
354 void setExternalCallbacks (NXClientLibExternalCallbacks * cb)
356 this->externalCallbacks = cb;
359 bool getSessionRunning (
void)
361 return this->sessionRunning;
375 string getPath (
string prog);
415 notQProcess* nxsshProcess;
419 notQProcess* nxproxyProcess;
423 notQProcess* x11Process;
427 notQProcess* nxauthProcess;
433 NXClientLibCallbacks callbacks;
437 notQTemporaryFile *keyFile;