display.h

来自「linux下的终端管理工具源码」· C头文件 代码 · 共 97 行

H
97
字号
/***************************************************************************//*                                                                         *//* Copyright (c) 2005, 2006 2X Software Ltd, http://www.2X.com., NoMachine *//*                                                                         *//* NXCOMP, NX protocol compression and NX extensions to this software      *//* are copyright of Nomachine. Redistribution and use of the present       *//* software is allowed according to terms specified in the file LICENSE    *//* which comes in the source distribution.                                 *//*                                                                         *//* NX and NoMachine are trademarks of Medialogic S.p.A.                    *//*                                                                         *//* 2X is a trademark of 2X Software Ltd.                                   *//*                                                                         *//* All rights reserved.                                                    *//*                                                                         *//***************************************************************************/#ifndef Display_H#define Display_H#include "Timestamp.h"class Display{  public:  Display();  ~Display();  public:  int setDisplay(const char *display);  int setHost(const char *host);  int setPort(int port);  const char *getDisplay()  {    return display_;  }  const char *getHost()  {    return host_;  }  int getPort()  {    return port_;  }  int canBind()  {    return (canBindTcp() == 1 &&                canBindUnix() == 1);  }  int canBindTcp();  int canBindUnix();  int canConnect();  int setAuthority(const char *file);  const char *getAuthority();  int setCookie(const char *cookie);  const char *getCookie();  int setTimeout(const T_timestamp timeout);  char *generateCookie();  private:  int connectTcp();  int connectUnix();  int checkCookie(int fd);  int saveHost(const char *host, int length);  int savePort(int port);  int saveDisplay();  const char *authCommand();  int  port_;  char *host_;  char *display_;  char *authority_;  char *cookie_;  T_timestamp timeout_;};#endif /* Display_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?