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

📄 rvmegacocontext.h

📁 h.248协议源码
💻 H
字号:
/******************************************************************************
Filename   : rvmegacocontext.h
Description: Header file for MEGACO Context (part of Termination Manager)
******************************************************************************
                Copyright (c) 1999 RADVision Inc.
************************************************************************
NOTICE:
This document contains information that is proprietary to RADVision LTD.
No part of this publication may be reproduced in any form whatsoever 
without written prior approval by RADVision LTD..

RADVision LTD. reserves the right to revise this publication and make 
changes without obligation to notify any person of such revisions or 
changes.
******************************************************************************
$Revision:$
$Date:11.15.00$
$Author: D.Elbert$
******************************************************************************/
#ifndef RV_MEGACOCONTEXT_H
#define RV_MEGACOCONTEXT_H

#include "rvlist.h"
#include "rvgraph.h"
#include "rvmdm.h"
#include "rvmegacoobjects.h"
#include "rvmegacoterm.h"
#include "rvmegacotopology.h"

typedef struct RvMegacoContext_ {
	/* Termination manager the context belongs to */
	struct RvMegacoTermMgr_ * termMgr;  
	/* Context id */
	RvUint32	 id;
	/* Context allocator */
	RvAlloc*     alloc;

	/* Holds all the terminations,media and topology in the 
	   context */
	RvMegacoTopology topology;
	void*            userData;
	/* Hold the selected termination, for topology */
	struct RvMegacoTerm_*			chosenTerm;
	const RvMegacoTerminationId*    chooseId;
	/* The current topology descriptor */
	const RvMegacoTopologyDescriptor* topologyDescr;

	/* Flags */
	RvBool           isEmergency;
	unsigned int     priority;

	/* The mutex */
	RvMutex          mutex;
} RvMegacoContext;

void     rvMegacoContextConstruct(RvMegacoContext * x,RvUint32 id,struct RvMegacoTermMgr_ * mgr,RvAlloc * alloc);
void     rvMegacoContextDestruct(RvMegacoContext * x);
RvUint32 rvMegacoContextGetId(RvMegacoContext * x);
RvBool   rvMegacoContextMatchId(RvMegacoContext * x,RvUint32 id);

struct RvMegacoTerm_ * rvMegacoContextAddNewTerm(RvMegacoContext * x,const char * id);

void rvMegacoContextRemove(RvMegacoContext * x,struct RvMegacoTerm_ * term,
						   RvMegacoCommandReply * commReply,RvBool isDelete,RvBool getStats);

struct RvMegacoTerm_ * rvMegacoContextGetTerm(RvMegacoContext * x,const char * id);
struct RvMegacoTerm_ * rvMegacoContextGetTermInNull(RvMegacoContext * x,const char * id);


RvBool rvMegacoContextProcessAction(RvMegacoContext * x,const RvMegacoAction * action,
									RvMegacoTransactionReply * transReply,
									RvBool contextAll);

void rvMegacoContextSetWildError(RvMegacoTransactionReply* reply,RvAlloc* alloc);


/* User data */
void   rvMegacoContextSetUserData(RvMegacoContext * x,void* userData);
void*  rvMegacoContextGetUserData(RvMegacoContext * x);

/* Send messages */
void rvMegacoContextSendNotify(RvMegacoContext * x,const char * termId,RvMegacoObservedEventsDescriptor * obsDescr);

void rvMegacoContextSendNotifyOrError(RvMegacoContext * x,const char * termId,
									RvMegacoObservedEventsDescriptor * obsDescr,RvMegacoErrorDescriptor* errorDescr);

/* Process terminations in context */
RvBool	rvMegacoContextForEachTerm(RvMegacoContext* x,RvMdmProcessEachTermCB func,void* data);

/* Flags */
#define rvMegacoContextIsEmergency(x) ((x)->isEmergency)
#define rvMegacoContextSetEmergency(x,e) ((x)->isEmergency = (e) )
#define rvMegacoContextGetPriority(x) ((x)->priority)
#define rvMegacoContextSetPriority(x,p) ((x)->priority = (p) )

#endif /* RV_MEGCONTEXT_H */

⌨️ 快捷键说明

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