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

📄 connparams.h

📁 vncviewer_source_1.0
💻 H
字号:
/* Copyright (C) 2006 Lucas Gomez  All Rights Reserved.
 * 
 * This is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this software; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
 * USA.
 */

#ifndef __CONNPARAMS_H__
#define __CONNPARAMS_H__

// INCLUDES
#include <e32def.h>

#include "PixelFormat.h"

// ENUMERATIONS
enum TEncodings
{
	EEncodingRaw = 0,
	EEncodingCopyRect = 1,
	EEncodingRRE = 2,
	EEncodingCoRRE = 4,
	EEncodingHextile = 5,
	EEncodingZRLE = 16,

	EEncodingMax = 255,

	EEncodingPseudoEncodingCursor = 0xffffff11,
	EEncodingPseudoEncodingDesktopSize = 0xffffff21
};

// CONSTANTES
_LIT(KEncodingRaw,"raw");
_LIT(KEncodingCopyRect,"copyRect");
_LIT(KEncodingRRE,"RRE");
_LIT(KEncodingCoRRE,"coRRE");
_LIT(KEncodingHextile,"hextile");
_LIT(KEncodingZRLE,"ZRLE");

// CLASS DECLARATION

/**
* CConnParams application class.
*/
class CConnParams
{
public: // Constructors and destructor
   
    /**
    * ~CConnParams
    * Virtual Destructor.
    */
    virtual ~CConnParams();

public: // Constructors

    /**
    * CConnParams.
    * C++ default constructor.
    */
    CConnParams();
    
public:	// class methods
	TBool ReadVersion(InStream* aIS);
	
	void WriteVersion(OutStream* aOS);
	
	void SetVersion(TInt aMajor,TInt aMinor);
	
	TBool IsVersion(TInt aMajor,TInt aMinor);
	
	TBool BeforeVersion(TInt aMajor,TInt aMinor);
	
	TBool AfterVersion(TInt aMajor,TInt aMinor);
	
	CPixelFormat* GetPF();
	
	void SetPF(CPixelFormat* aPF);
	
	TEncodings GetCurrentEncoding();
	
	TInt GetNEncodings();
	
	static TInt EncodingNum(TDesC& aName);
	
	static const TDesC& EncodingName(TEncodings aEncoding);
	
	RArray<TEncodings> GetEncodings();
	
	void SetEncodings(TInt aNEncodings,RArray<TEncodings>& aEncodings);
	
	inline TInt GetWidth() {return iWidth;}
	
	inline TInt GetHeight() {return iHeight;}
	
	inline void SetWidth(TInt aWidth) {iWidth=aWidth;}
	
	inline void SetHeight(TInt aHeight) {iHeight=aHeight;}
	
	inline const TDesC& GetName() {return iName;}
	
	inline void SetName(TDesC8& aName) {iName.Copy(aName);}
	
	inline TInt GetMajorVersion() {return iMajorVersion;}
	
	inline TInt GetMinorVersion() {return iMinorVersion;}
	
	inline TBool GetSupportsLocalCursor() {return iSupportsLocalCursor;}
	
	inline TBool GetSupportsDesktopResize() {return iSupportsDesktopResize;}
	
	inline void SetSupportsLocalCursor(TBool aSupportsLocalCursor) {iSupportsLocalCursor=aSupportsLocalCursor;}
	
	inline void SetSupportsDesktopResize(TBool aSupportsDesktopResize) {iSupportsDesktopResize=aSupportsDesktopResize;}
    
private:	// member variables
	TInt iMajorVersion;
	TInt iMinorVersion;
	
	TInt iWidth;
	TInt iHeight;

	TBool iUseCopyRect;
	TBool iSupportsLocalCursor;
	TBool iSupportsDesktopResize;
	TBuf<50> iName;

	CPixelFormat* iPF;
	TInt iNEncodings;
	TEncodings iCurrentEncoding;
	RArray<TEncodings> iEncodings;
};

#endif // __CONNPARAMS_H__


⌨️ 快捷键说明

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