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

📄 mainframe.h

📁 三汇CTI示例程序源码
💻 H
字号:

#pragma once

#include "ChildView.h"
#include "LeftView.h"

class MainFrame : public CFrameWnd
{
DECLARE_DYNAMIC(MainFrame)

public:
	void OnDestroy();
	BOOL DestroyWindow();
	BOOL PreCreateWindow(CREATESTRUCT& cs);
	BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
	BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
	LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
	CSplitterWnd wndSplitter;
	void OnTimer(UINT nIDEvent);
protected: 
	CStatusBar wndStatusBar;
	int OnCreate(LPCREATESTRUCT lpCreateStruct);


DECLARE_MESSAGE_MAP()
};

enum StateChannel
{
	CH_IDLE,
	CH_TALK,
	CH_WAIT_TALK,
	CH_INVITEUSER
};

enum StateConference
{
	CO_IDLE,
	CO_IN_CONFERENCE,
	CO_CREATE_OR_JOIN,			/* Alias: WAIT_1 */
	CO_HOW_TO_JOIN,				/* Alias: WAIT_2 */
	CO_WHO_TO_TALK_SECURELY,	/* Alias: WAIT_3 */
	CO_INVITE_OTHER
};

// Eng: User's Messages
// Chs: 用户消息
enum
{
	TO_START = WM_USER + 0x40 /* Synway reserved */,
	TO_END,
};

// ENG: Tag for master channel.
// 主持人通道状态标识
enum MasterType
{
	NOT,
	MASTER_BUSY,
	MASTER_IDLE
};


class Channel
{
public:
	StateChannel state_channel; // ENG: See channel flowchart
								// CHS: 参见通道状态流图
	StateConference state_conference;	// ENG: See conference flowchart
										// CHS: 参见会议状态流图
	int type;	// ENG: Channel type
				// CHS: 通道状态
	string dtmf_str;	// ENG: My own dtmf buffer, never use system's buffer when you are in the event mode
						// CHS: 自己的 DTMF 缓冲区,在事件模式中不要使用系统的缓冲区。
	int conf_to_join;	// ENG: Store conf_id temporarily before joining
						// CHS: 在加入会议之前,保存临时的会议号
	MasterType master;	// ENG: Whether being reserved for master
						// CHS: 是否保留给主持人使用
	bool creater;	// ENG: Creator? 
					// CHS: 创建者?
	bool BgSoundEnabled;	// ENG: Play background sound, for master only;
							// CHS: 播放背景音
	int BgSoundVolume;		// ENG: Background sound volume, for master only;
							// CHS: 背景音音量
	bool IsPlayingBgSound;	// ENG: Whether playing background sound;
							// CHS: 是否正在播放背景音
	WORD last_join_mode;	// ENG: Used to support talk securely;
							// CHS: 用于在密谈中使用
	int ch_to_talk_securely;	// ENG: Used to support talk securely;
								// CHS: 用于在密谈中使用
};


extern Channel *channels;

int get_master(int conf);

⌨️ 快捷键说明

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