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

📄 rvmdmpkg.h

📁 h.248协议源码
💻 H
📖 第 1 页 / 共 2 页
字号:
/******************************************************************************
Filename   : rvmdmpkg.h
Description: Package,event and signal information for Media Device 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:1.9.01$
$Author: D.Elbert$
******************************************************************************/

/* Synopsis 
struct RvMdmPackage;
methods:

RegisterPkg(id)

registerTermStateProperty(name,value)
registerLocalControlProperty(name,value)
registerStatistic(name)

registerEvent
EventData(id)
registerEventDescrParam(name,value,function)

registerSignal
SignalData(id,type)
setTimeout()
registerParam(name,value)

registerDigitMapInfo
*/
#ifndef RV_MDMPKG_H
#define RV_MDMPKG_H

#include "rvalloc.h"
#include "rvmap.h"
#include "rvstring.h"
#include "rvmegacoobjects.h"
#include "rvmdmalias.h"

/* Forward declarations */
struct RvMdmTerm_;
struct RvMdmTermMgr_;
struct RvMdmError_;

typedef void RvMdmMediaStream;

/*------------------------------------------------------------------------------*/
/*$
{callback:
	{name: RvMdmEventParamCB}	
	{include: rvmdm.h}
	{description:
		{p: Called to process parameters associated with a requested event.}
		{p: The MGC set this parameters to customize the generated events.}
	}
	{proto: RvBool (*RvMdmEventParamCB)(RvMdmTerm* term,const char* pkg,const char* name,
										RvMdmMediaStream* mediaStream,
										const RvMdmParameterList* parameters,
										RvMdmError* errorInfo);}
	{params:
		{param: {n:term} {d:The termination where the event is requested.}}
		{param: {n:pkg}  {d:The package to which the event belongs.}}
		{param: {n:name} {d:The event id.}}
		{param: {n:mediaStream} {d:The media stream where this event is expected or NULL
							 if the event is not related to a particular media stream.}}
		{param: {n:parameters} {d:The list of parameter.}}
		{param: {n:errorInfo} {d:(Optional) Use to set error information.}}
	}
	{returns: 
		Return "rvFalse" if the MG cannot currently produce this event. 
		In this case errorInfo can be set. If is not set, a default error value will be assigned.
	}
	{notes:
		{note: 
			This callback allows the application to execute a specific behaviour when a 
			particular event is requested, according to parametrization given by the MGC.
		}
		{note: 
			Example (MEGACO):
			The setting of the "strict" parameter for the al/on event will cause the application
			to either return an error or immediatly generate an al/on event.
		}
		{note: 
			Example (MEGACO):
			The setting of the "mindur" parameter for the al/fl event will be saved by the application
			to determine the minimal duration of a valid flash event in the termination.
		}
		{note: 
			MEGACO: Implement only for events which define EventDescriptor parameters.
		}
	}
}
$*/
typedef RvBool (*RvMdmEventParamCB)(struct RvMdmTerm_* term,const char* pkg,const char* name,
									RvMdmMediaStream* mediaStream,
									const RvMdmParameterList* parameters,struct RvMdmError_* error);

/*------------------------------------------------------------------------------*/
/*$
{callback:
	{name: RvMdmTermEnableDetectEventCB}	
	{include: rvmdm.h}
	{description:
		{p: Called to enable detection of this event.}
		{p: The MG set this callback if it needs to specifically enable the detection
		    of this event when is required.}
	}
	{proto: void (*RvMdmTermEnableDetectEventCB)(RvMdmTerm* term,const char* pkg,
											   const char* name);}
	{params:
		{param: {n:term} {d:The termination where the event is requested.}}
		{param: {n:pkg}  {d:The package to which the event belongs.}}
		{param: {n:name} {d:The event id.}}
	}
	{notes:
		{note: 
			Register this callback only if the application needs to specifically be told
			when to detect some event (for example, may need to load DSP resources to 
			detect DTMF events).
		}
		{note: 
			In Megaco, detection of DTMF events is associated with the "ce" event.
		}
	}
}
$*/
typedef void (*RvMdmTermEnableDetectEventCB)(struct RvMdmTerm_* term,const char* pkg,
			    						 const char* name);


RvBool rvMdmHookEventProcessParams(struct RvMdmTerm_* term,const char* pkg,const char* name,
							   		  RvBool onHook, const RvMdmParameterList* parameters,
									  struct RvMdmError_* errorInfo);

/*------------------------------------------------------------------------------*/
/*$
{type:
	{name: RvMdmEventData}
	{include: rvmdm.h}
	{description: {p: Describes the characteristics of an event.}
				  {p: Use to register an event with a package.}
	}
	{methods:
		{method: void rvMdmEventDataConstruct(RvMdmEventData* x,const char* id);}
		{method: void rvMdmEventDataDestruct(RvMdmEventData* x);}
		{method: void rvMdmEventDataAddParameter(RvMdmEventData* x,
												 const char* name,
												 const RvMegacoParameterValue* value);}
	}
}
$*/

typedef struct RvMdmEventData_ {
	RvString id;
	RvMdmParameterList		args;
/*	RvMdmEventParamCB			paramF; */
} RvMdmEventData;


void rvMdmEventDataConstruct(RvMdmEventData* x,const char* id);
void rvMdmEventDataConstructA(RvMdmEventData* x,const char* id,RvAlloc* a);
void rvMdmEventDataDestruct(RvMdmEventData* x);
void rvMdmEventDataAddParameter(RvMdmEventData* x,const char* name, const RvMegacoParameterValue* value,RvMdmEventParamCB func);

/*------------------------------------------------------------------------------*/
/*$
{type:
	{name: RvMdmSignalData}
	{include: rvmdm.h}
	{description: {p: Describes the characteristics of a signal.}
				   {p: Use to register a signal with a package.}}
	{methods:
		{method: void rvMdmSignalDataConstruct(RvMdmSignalData* x,const char* id,RvMdmSignalType type);}
		{method: void rvMdmSignalDataDestruct(RvMdmSignalData* x);}
		{method: void rvMdmSignalDataSetTimeout(RvMdmSignalData* x,RvMilliseconds timeout);}
		{method: void rvMdmSignalDataAddParameter(RvMdmSignalData* x,const char* name, const RvMegacoParameterValue* value);}
	}
}
$*/

typedef struct RvMdmSignalData_ {
	RvString id;
	RvMdmParameterList args;
	RvMdmSignalType type;
	unsigned int timeout;
} RvMdmSignalData;


void rvMdmSignalDataConstruct(RvMdmSignalData* x,const char* id,RvMdmSignalType type);
void rvMdmSignalDataConstructA(RvMdmSignalData* x,const char* id,RvMdmSignalType type,RvAlloc* a);
void rvMdmSignalDataDestruct(RvMdmSignalData* x);
void rvMdmSignalDataSetTimeout(RvMdmSignalData* x,RvMilliseconds timeout);
void rvMdmSignalDataAddParameter(RvMdmSignalData* x,const char* name, const RvMegacoParameterValue* value);

/*------------------------------------------------------------------------------*/
/* Definitions used to register packages supporting digit maps and to generate  */
/* completion events                                                            */
/*------------------------------------------------------------------------------*/

/*------------------------------------------------------------------------------*/
/*$
{callback:
	{name: RvMdmDigitMapBuildCompletionEvCB}	
	{include: rvmdm.h}
	{description:

⌨️ 快捷键说明

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