⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vncserver.h

📁 Web VNC samples delphi
💻 H
📖 第 1 页 / 共 2 页
字号:
	virtual BOOL GetBeepConnect() {return m_beepConnect;};
	virtual void SetBeepDisconnect(BOOL beepDisconn) {m_beepDisconnect = beepDisconn;};
	virtual BOOL GetBeepDisconnect() {return m_beepDisconnect;};

	// Handling of per-client connection authorisation
	virtual void SetAuthHosts(const char *hostlist);
	virtual char *AuthHosts();
	enum AcceptQueryReject {aqrAccept, aqrQuery, aqrReject};
	virtual AcceptQueryReject VerifyHost(const char *hostname);
	virtual AcceptQueryReject AdjustVerification(AcceptQueryReject host);

	// Blacklisting of machines which fail connection attempts too often
	// Such machines will fail VerifyHost for a short period
	virtual void AddAuthHostsBlacklist(const char *machine);
	virtual void RemAuthHostsBlacklist(const char *machine);

	// Connection querying settings
	virtual void SetQuerySetting(const UINT setting) {m_querysetting = setting;};
	virtual UINT QuerySetting() {return m_querysetting;};
	virtual void SetQueryTimeout(const UINT setting) {m_querytimeout = setting;};
	virtual UINT QueryTimeout() {return m_querytimeout;};
	virtual void SetQueryAccept(const BOOL setting) {m_queryaccept = setting;};
	virtual BOOL QueryAccept() {return m_queryaccept;};
	virtual void SetQueryAllowNoPass(const BOOL setting) {m_queryallownopass = setting;};
	virtual BOOL QueryAllowNoPass() {return m_queryallownopass;};

	// Whether or not to allow incoming HTTP connections
	virtual BOOL SetHttpdEnabled(BOOL enable_httpd, BOOL enable_params);
	virtual BOOL HttpdEnabled() {return m_httpd_enabled;};
	virtual BOOL HttpdParamsEnabled() {return m_httpd_params_enabled;};

	// Whether or not to allow connections from the local machine
	virtual void SetLoopbackOk(BOOL ok) {m_loopback_allowed = ok;};
	virtual BOOL LoopbackOk() {return m_loopback_allowed;};

	// Whether or not to shutdown or logoff when the last client leaves
	virtual void SetLockSettings(int ok) {m_lock_on_exit = ok;};
	virtual int LockSettings() {return m_lock_on_exit;};

	// Timeout for automatic disconnection of idle connections
	virtual void SetAutoIdleDisconnectTimeout(const UINT timeout) {m_idle_timeout = timeout;};
	virtual UINT AutoIdleDisconnectTimeout() {return m_idle_timeout;};

	// Removal of desktop wallpaper, etc
	virtual void EnableRemoveWallpaper(const BOOL enable) {m_remove_wallpaper = enable;};
	virtual BOOL RemoveWallpaperEnabled() {return m_remove_wallpaper;};

	virtual void SetBlankScreen(const BOOL enable) {m_blank_screen = enable;};
	virtual BOOL GetBlankScreen() {return m_blank_screen;};

	// Whether or not to allow file transfers
	virtual void EnableFileTransfers(const BOOL enable) {m_enable_file_transfers = enable;}
	virtual BOOL FileTransfersEnabled() {return m_enable_file_transfers;}

    // Patrial desktop sharing
    virtual void WindowShared(BOOL enable) { m_WindowShared = enable; }
    virtual BOOL WindowShared() { return m_WindowShared; }
    virtual void SetMatchSizeFields(int left, int top, int right, int bottom);
	virtual RECT GetScreenAreaRect() { return m_screenarea_rect; }
	virtual void SetWindowShared(HWND hWnd);
    virtual HWND GetWindowShared() { return m_hwndShared; }
	virtual RECT GetSharedRect () { return m_shared_rect; }
	virtual void SetSharedRect (RECT rect) { m_shared_rect = rect; }
	virtual BOOL FullScreen() { return m_full_screen; }
	virtual void FullScreen(BOOL enable) { m_full_screen = enable; }
	virtual BOOL ScreenAreaShared() { return m_screen_area; }
	virtual void ScreenAreaShared(BOOL enable) { m_screen_area = enable; }
	virtual BOOL PrimaryDisplayOnlyShared() { return m_primary_display_only_shared; }
	virtual void PrimaryDisplayOnlyShared(BOOL enable) { m_primary_display_only_shared = enable; }

	virtual void SetNewFBSize(BOOL sendnewfb);
	virtual BOOL FullRgnRequested();
	virtual BOOL IncrRgnRequested();
	virtual	void UpdateLocalFormat();
	                                                                                     
	// Blocking remote input
	virtual void LocalInputPriority(BOOL enable);
	virtual BOOL LocalInputPriority() { return m_local_input_priority; }
	virtual void SetKeyboardCounter(int count);
	virtual int KeyboardCounter() { return m_remote_keyboard; }
	virtual void SetMouseCounter(int count, POINT &cursor_pos, BOOL mousemove);
	virtual int MouseCounter() { return m_remote_mouse; }
	virtual UINT DisableTime() { return m_disable_time; }
	virtual void SetDisableTime(UINT disabletime) { m_disable_time = disabletime; }
	virtual UINT GetPollingCycle() { return m_polling_cycle; }
	virtual void SetPollingCycle(UINT msec);
	virtual BOOL PollingCycleChanged() { return m_polling_cycle_changed; }
	virtual void PollingCycleChanged(BOOL change) { m_polling_cycle_changed = change; }

  BOOL checkPointer(vncClient *pClient);

	virtual void ClearWallpaperWait() { m_wallpaper_wait = FALSE; }
	virtual BOOL WallpaperWait() { return m_wallpaper_wait; }

	// Internal stuffs
protected:
	// Connection servers
	vncSockConnect		*m_socketConn;
	vncCorbaConnect		*m_corbaConn;
	vncHTTPConnect		*m_httpConn;

	// The desktop handler
	vncDesktop			*m_desktop;

	// General preferences
	UINT				m_port;
	UINT				m_port_http;
	RECT			    m_shared_rect;
	RECT			    m_screenarea_rect;
	BOOL				m_autoportselect;
	char				m_password[MAXPWLEN];
	BOOL				m_password_set;
	char				m_password_viewonly[MAXPWLEN];
	BOOL				m_password_viewonly_set;
	BOOL				m_passwd_required;
	BOOL				m_loopback_allowed;
	BOOL				m_httpd_enabled;
	BOOL				m_httpd_params_enabled;
	BOOL				m_loopbackOnly;
	BOOL				m_disableTrayIcon;
	char				*m_auth_hosts;
	BOOL				m_enable_remote_inputs;
	BOOL				m_disable_local_inputs;
	int					m_lock_on_exit;
	int					m_connect_pri;
	BOOL				m_beepConnect;
	BOOL				m_beepDisconnect;
	UINT				m_querysetting;
	UINT				m_querytimeout;
	BOOL				m_queryaccept;
	BOOL				m_queryallownopass;
	BOOL				m_clients_disabled;
	UINT				m_idle_timeout;
	UINT				m_disable_time;

	BOOL				m_remove_wallpaper;
	BOOL				m_blank_screen;
	BOOL				m_enable_file_transfers;

	// Polling preferences
	BOOL				m_poll_fullscreen;
	BOOL				m_poll_foreground;
	BOOL				m_poll_undercursor;

	BOOL				m_poll_oneventonly;
	BOOL				m_poll_consoleonly;

	BOOL				m_dont_set_hooks;
	BOOL				m_dont_use_driver;
	BOOL				m_driver_direct_access_en;
// NOTE that it only has a status of preference;
// the effective status of direct access option is
// vncVideoDriver::m_fDirectAccessInEffect

	// screen area sharing preferences                                                   
	BOOL				m_shared_oneapplionly;               
	HWND				m_hwndShared;  
	BOOL				m_WindowShared;                      
	BOOL				m_full_screen;                       
	BOOL				m_screen_area;                       
	BOOL				m_primary_display_only_shared;

	// local event priority stuff                                        
	BOOL				m_local_input_priority;                    
	INT					m_remote_mouse;              
	INT					m_remote_keyboard;           
	POINT				m_cursor_pos;

	UINT				m_polling_cycle;
	BOOL				m_polling_cycle_changed;

	// Make sure to remove wallpaper _before_ the first update
	BOOL				m_wallpaper_wait;

	// Name of this desktop
	char				*m_name;

	// Blacklist structures
	struct BlacklistEntry {
		BlacklistEntry *_next;
		char *_machineName;
		LARGE_INTEGER _lastRefTime;
		UINT _failureCount;
		BOOL _blocked;
	};
	BlacklistEntry		*m_blacklist;
	
	// The client lists - list of clients being authorised and ones
	// already authorised
	vncClientList		m_unauthClients;
	vncClientList		m_authClients;
	vncClient			*m_clientmap[MAX_CLIENTS];
	vncClientId			m_nextid;

	// Lock to protect the client list from concurrency - lock when reading/updating client list
	omni_mutex			m_clientsLock;
	// Lock to protect the desktop object from concurrency - lock when updating client list
	omni_mutex			m_desktopLock;

	// Signal set when a client removes itself
	omni_condition		*m_clientquitsig;

	// Set of windows to send notifications to
	vncNotifyList		m_notifyList;

	// The value that would be returned by ValidPasswordsSet(). This variable has correct
	// authentic value only if m_valid_passwords_set_cached is true. Maintaining this variable
	// prevents from decoding passwords each time ValidPasswordsSet() is called.
	BOOL				m_valid_passwords_set;

	// This variable set to true means that the value of m_valid_passwords_set is authentic.
	BOOL				m_valid_passwords_set_cached;

	// The value that would be returned by ValidPasswordsEmpty(). This variable has correct
	// authentic value only if m_valid_passwords_empty_cached is true. Maintaining this variable
	// prevents from decoding passwords each time ValidPasswordsEmpty() is called.
	BOOL				m_valid_passwords_empty;

	// This variable set to true means that the value of m_valid_passwords_empty is authentic.
	BOOL				m_valid_passwords_empty_cached;

	// A short function to invalidate both m_valid_passwords_set and m_valid_passwords_empty.
	void inline ResetPasswordsValidityInfo() {
		m_valid_passwords_set_cached = m_valid_passwords_empty_cached = FALSE;
	}
};

BOOL IsWinNT();
BOOL IsWinVerOrHigher(ULONG mj, ULONG mn);

RECT GetScreenRect();

#endif

⌨️ 快捷键说明

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