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

📄 exampleapp.h

📁 这是Symbian平台实现流媒体的通信的协议应该模型.
💻 H
字号:
// ExampleApp.h
//
// Copyright (c) Symbian Software Ltd 2005. All rights reserved.
//


#ifndef __EXAMPLEAPP_H__
#define __EXAMPLEAPP_H__

#include <e32test.h>
#include <bacline.h>
#include "RtpFileStreamer.h"

_LIT(KTitle,"RTCP App" );
_LIT(KDestAddr,"2130706433" );
_LIT(KDestPort,"9000" ); 
_LIT(KLocalPort,"9000" ); 
_LIT(KsFileName,"source.dat" ); 
_LIT(KdFileName,"target.dat" );
_LIT(KSize,"100" );

/**
RTP active console observer
*/
class MActiveConsoleNotify
	{
public:
	virtual void KeyPressed(TChar aKey) =0;
	};
/**
RTP active console
*/
class CActiveConsole : public CActive
	{
	public:
		static CActiveConsole* NewL(MActiveConsoleNotify& aNotify,const TDesC& aTitle,const TSize& aSize);
		void RequestKey();		
		inline CConsoleBase& Console() const 
			{
			return *iConsole;
			};
		~CActiveConsole();
	private:
		void RunL();
		void DoCancel();
		void DrawCursor();
		CActiveConsole(MActiveConsoleNotify& aNotify);
		void ConstructL(const TDesC& aTitle,const TSize& aSize);
	private:
		CConsoleBase*			iConsole;
		MActiveConsoleNotify&	iNotify;
	};
/**
RTP example application	
*/
class CExampleApp : public CBase, public MActiveConsoleNotify, public MFileStreamerObserver
	{
public:
	static CExampleApp* NewL();

	void StartL();
	void Stop();
	~CExampleApp();
	void KeyPressed(TChar aKey);
	void ReadError(TInt aError);
public:
	virtual void NotifyPacketSent();
	virtual void NotifyPacketReceived();
	virtual void NotifyComplete();
	virtual void NotifyError();
private:
	CExampleApp();
	void ConstructL();
	void DrawMonitor();
private:
	CActiveConsole*			iActiveConsole;
	CActiveConsole*			iMonitorConsole;
	TInt					iSent;
	TInt					iRecv;
	CRtpFileStreamer*		iStreamer;
	RSocketServ				iSockServ;
	};

#endif // __EXAMPLEAPP_H__

⌨️ 快捷键说明

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