1
/**************************************************************************/
3
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
5
/* NXCOMP, NX protocol compression and NX extensions to this software */
6
/* are copyright of NoMachine. Redistribution and use of the present */
7
/* software is allowed according to terms specified in the file LICENSE */
8
/* which comes in the source distribution. */
10
/* Check http://www.nomachine.com/licensing.html for applicability. */
12
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
14
/* All rights reserved. */
16
/**************************************************************************/
24
// Set the verbosity level.
30
class ClientProxy : public Proxy
34
ClientProxy(int proxyFD);
36
virtual ~ClientProxy();
38
virtual void handleDisplayConfiguration(const char *xServerDisplay, int xServerAddrFamily,
39
sockaddr *xServerAddr, unsigned int xServerAddrLength);
41
virtual void handlePortConfiguration(int cupsServerPort, int smbServerPort, int mediaServerPort,
42
int httpServerPort, const char *fontServerPort);
47
// Create a new channel.
50
virtual int handleNewConnection(T_channel_type type, int clientFd);
52
virtual int handleNewConnectionFromProxy(T_channel_type type, int channelId);
54
virtual int handleNewAgentConnection(Agent *agent);
56
virtual int handleNewXConnection(int clientFd);
58
virtual int handleNewXConnectionFromProxy(int channelId);
61
// Implement persistence according
65
virtual int handleLoad(T_load_type type);
66
virtual int handleSave();
68
virtual int handleAsyncEvents();
70
virtual int handleLoadFromProxy();
71
virtual int handleSaveFromProxy();
73
virtual int handleSaveAllStores(ostream *cachefs, md5_state_t *md5StateStream,
74
md5_state_t *md5StateClient) const;
76
virtual int handleLoadAllStores(istream *cachefs, md5_state_t *md5StateStream) const;
79
// Utility function used to realize
85
virtual int checkLocalChannelMap(int channelId)
87
if (control -> isProtoStep7() == 1)
89
return ((channelId & control -> ChannelMask) != 0);
98
// Ports where to forward extended services'
104
char *fontServerPort_;
108
#endif /* ClientProxy_H */