📄 msgwriter.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 __MSGWRITER_H__
#define __MSGWRITER_H__
// INCLUDES
#include <e32base.h>
#include <e32std.h>
#include "ConnParams.h"
// NAMESPACE
namespace MsgType
{
// server to client
const TInt KFramebufferUpdate = 0;
const TInt KSetColourMapEntries = 1;
const TInt KBell = 2;
const TInt KServerCutText = 3;
// client to server
const TInt KSetPixelFormat = 0;
const TInt KFixColourMapEntries = 1;
const TInt KSetEncodings = 2;
const TInt KFramebufferUpdateRequest = 3;
const TInt KKeyEvent = 4;
const TInt KPointerEvent = 5;
const TInt KClientCutText = 6;
};
// CONSTANTES
// CLASS DECLARATION
/**
* CMsgWriter application class.
*/
class CMsgWriter
{
public: // Constructors and destructor
/**
* ~CMsgWriter
* Virtual Destructor.
*/
virtual ~CMsgWriter();
protected:
/**
* CMsgWriter.
* C++ default constructor.
*/
CMsgWriter(CConnParams* aCP,OutStream* aOS);
public: // class methods
virtual void WriteClientInit(TBool aShared)=0;
void WriteSetPixelFormat(CPixelFormat* aPF);
void WriteSetEncodings(TInt aNEncodings,RArray<TEncodings>& aEncodings);
void WriteSetEncodings(TEncodings aPreferredEncoding,TBool aUseCopyRect);
void WriteFramebufferUpdateRequest(TInt aX,TInt aY,TInt aW,TInt aH,TBool aIncremental);
void WriteKeyEvent(TInt aKey,TBool aDown);
void WritePointerEvent(TInt aX,TInt aY,TInt aButtonMask);
void WriteClientCutText(TDesC& aText);
virtual void StartMsg(TInt aType)=0;
virtual void EndMsg()=0;
void SetOutStream(OutStream* aOS);
CConnParams* GetConnParams();
OutStream* GetOutStream();
protected: // member variables
CConnParams* iCP;
OutStream* iOS;
};
class CMsgWriterV3 : public CMsgWriter
{
public: // Constructors and destructor
/**
* ~CMsgWriterV3
* Virtual Destructor.
*/
virtual ~CMsgWriterV3();
public:
/**
* CMsgWriterV3.
* C++ default constructor.
*/
CMsgWriterV3(CConnParams* aCP,OutStream* aOS);
public: // class methods
void WriteClientInit(TBool aShared);
void StartMsg(TInt aType);
void EndMsg();
private: // member variables
};
#endif // __MSGWRITER_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -