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

📄 sessioncontainer.h

📁 Windows CE .Net 下面 VOIP编程的经典实例。对于初学Windows 平台下VOIP编程技术的程序员颇具借鉴意义!
💻 H
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/*************************************************************************


  Disclaimer:

    This code and information is provided "as is" without warranty of
    any kind, either expressed or implied, including but not limited to
    the implied warranties of merchantability and/or fitness for a
    particular purpose.

Module Name:

	SessionContainer.h

Abstract:
	
	Definitions for the CSessionContainer class (IRTCSession -> CSession
	map storage object)

Notes:
	
	The CSessonContainer object allows us to store CSession objects into a
	array-accessible structure via an IRTCSession pointer.  This allows us
	to map events to the internal CSession object (which is a wrapper for 
	the IRTCSession and related information).

**************************************************************************/

#ifndef _SESSIONCONTAINER_H_
#define _SESSIONCONTAINER_H_

#include <windows.h>
#include "ht.h"
	
// prototype classes
class CSession;

#ifndef IRTCSession
struct IRTCSession;
#endif
/************************************************************************************************

  This class abstracts worrying about memory allocation and storage of the session objects

 ************************************************************************************************/

class CSessionContainer
{
public:
				CSessionContainer();
				~CSessionContainer();
	
	HANDLE		Add( IN HANDLE, IN CSession*);

	CSession*	operator[] ( IN HANDLE hKey ) { return Access(hKey); }
	CSession*	Access( IN HANDLE );	
	
	BOOL		Exist( IN HANDLE );

	void		Remove( IN HANDLE );
	
	void		Clear();	

private:
	CHashTable<CSession*> m_ht;

};

#endif _SESSIONCONTAINER_H_

⌨️ 快捷键说明

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