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

📄 cmctrl.h

📁 基于h323协议的软phone
💻 H
📖 第 1 页 / 共 4 页
字号:
/***********************************************************************
        Copyright (c) 2002 RADVISION Ltd.
************************************************************************
NOTICE:
This document contains information that is confidential and proprietary
to RADVISION Ltd.. No part of this document may be reproduced in any
form whatsoever without written prior approval by RADVISION Ltd..

RADVISION Ltd. reserve the right to revise this publication and make
changes without obligation to notify any person of such revisions or
changes.
***********************************************************************/

#ifndef CMCTRL_H
#define CMCTRL_H

#ifdef __cplusplus
extern "C" {
#endif

#ifndef CM_H
#error cmctrl.h included improperly. Use #include <cm.h> instead.
#else

#include "transpcap.h"



RV_DECLARE_HANDLE(HAPPCHAN);
RV_DECLARE_HANDLE(HCHAN);


/* This type is here only for backward compatibility */
typedef
int (*cmNewProtocolEH)(void);



typedef enum
{
    cmChannelStateDialtone,
    cmChannelStateRingBack,
    cmChannelStateConnected,
    cmChannelStateDisconnected,
    cmChannelStateIdle,
    cmChannelStateOffering
} cmChannelState_e;

typedef enum
{
    cmChannelStateModeOn,
    cmChannelStateModeOff,

    cmChannelStateModeDisconnectedLocal,
    cmChannelStateModeDisconnectedRemote,
    cmChannelStateModeDisconnectedMasterSlaveConflict,
    cmChannelStateModeDuplex,

    cmChannelStateModeDisconnectedReasonUnknown,
    cmChannelStateModeDisconnectedReasonReopen,
    cmChannelStateModeDisconnectedReasonReservationFailure

} cmChannelStateMode_e;



typedef enum
{
  cmCapReceive=1,
  cmCapTransmit=2,
  cmCapReceiveAndTransmit=3
} cmCapDirection;


typedef enum
{
  cmCapEmpty=0,
  cmCapAudio=1,
  cmCapVideo=2,
  cmCapData=3,
  cmCapNonStandard=4,
  cmCapUserInput=5,
  cmCapConference=6,
  cmCapH235=7,
  cmCapMaxPendingReplacementFor=8,
  cmCapGeneric=9,
  cmCapMultiplexedStream=10,
  cmCapAudioTelephonyEvent=11,
  cmCapAudioTone=12
} cmCapDataType;



typedef struct
{
  char*             name;
  RvInt32           capabilityId; /* capabilityTableEntryNumber */
  int               capabilityHandle; /* capability item message tree (video/audio/data/nonStandard) */
  cmCapDirection    direction;
  cmCapDataType     type;
} cmCapStruct;


typedef enum
{
  cmCapAccept=1,
  cmCapReject
} cmCapStatus;


typedef enum
{
  cmMSSlave=1,
  cmMSMaster,
  cmMSError
} cmMSStatus;



typedef enum
{
  cmRequestCloseRequest, /* Received request to close channel */
  cmRequestCloseConfirm, /* Request to close this channel is confirmed */
  cmRequestCloseReject   /* Request to close this channel is rejected */
} cmRequestCloseStatus;


typedef enum
{
  cmMediaLoopRequest,    /* Received request for a media loop on a channel */
  cmMediaLoopConfirm,    /* Media loop confirmed */
  cmMediaLoopOff         /* Media loop on channel is canceled */
} cmMediaLoopStatus;



typedef struct
{
  char* data; /* general string formatted data (4 bytes/char) */
  int   length; /* in bytes */
} cmUserInputData;


typedef enum
{
  /* path in paranthesis indicates the nodeId syntax */
  cmReqModeRequest,    /* request mode (requestMode.requestedModes) */
  cmReqModeAccept,     /* request acknoledged (requestModeAck.response) */
  cmReqModeReject,     /* request rejected (requestModeReject.cause) */
  cmReqModeReleaseOut, /* Outgoing request released due to timeout (N/A) */
  cmReqModeReleaseIn   /* Incoming request released due to timeout (N/A) */
} cmReqModeStatus;


typedef enum
{
  cmMiscMpOn,  /* multipoint mode command is on (set) */
  cmMiscMpOff  /* multipoint mode command is off (cancel) */
} cmMiscStatus;


typedef struct
{
  char  name[32];
  RvInt32 entryId; /* ModeElement node id */
} cmReqModeEntry;

typedef struct
{
  RvUint8 mcuNumber; /* constraint: 0..192 */
  RvUint8 terminalNumber; /* constraint: 0..192 */
} cmTerminalLabel;


typedef enum
{
  cmControlStateConnected,
  cmControlStateConference,
  cmControlStateTransportConnected,
  cmControlStateTransportDisconnected,
  cmControlStateFastStart,
  cmControlStateFastStartComplete
} cmControlState;


typedef enum
{
  cmControlStateModeNull
} cmControlStateMode;


typedef enum
{
  cmIssueJoin   =0,
  cmIssueQueryAndJoin,
  cmIssueCreate ,
  cmIssueInvite ,
  cmWaitForInvite,
  cmOriginateCall,
  cmWaitForCall,
  cmIssueQuery
} cmT120SetupProcedure;


typedef enum
{
  cmCloseReasonUnknown=0,
  cmCloseReasonReopen   ,
  cmCloseReasonReservationFailure,
  cmCloseReasonNormal /* for request close only */
} cmCloseLcnReason;


typedef enum
{
  cmRejectReasonUnspecified=0,
  cmRejectReasonUnsuitableReverseParameters,
  cmRejectReasonDataTypeNotSupported,
  cmRejectReasonDataTypeNotAvailable,
  cmRejectReasonUnknownDataType,
  cmRejectReasonDataTypeALCombinationNotSupported,
  cmRejectReasonMulticastChannelNotAllowed,
  cmRejectReasonInsufficientBandwidth,
  cmRejectReasonSeparateStackEstablishmentFailed,
  cmRejectReasonInvalidSessionID,
  cmRejectReasonMasterSlaveConflict,
  cmRejectReasonWaitForCommunicationMode,
  cmRejectReasonInvalidDependentChannel,
  cmRejectReasonReplacementForRejected
} cmRejectLcnReason;


typedef struct
{
  int redundancyEncodingMethodId;
  int secondaryEncodingId;
} cmRedundancyEncoding;

typedef enum
{
    cmVideoFreezePicture=0,
    cmVideoSendSyncEveryGOB,
    cmVideoSendSyncEveryGOBCancel,
    cmSwitchReceiveMediaOff,
    cmSwitchReceiveMediaOn,
    cmVideoFastUpdatePicture
} cmMiscellaneousCommand;


/* Enumeration of messages supported by cmEvCallControlMessage callback function */
typedef enum
{
    h245rqConferenceRequest=1,
    h245reConferenceResponse,
    /* Conference Indications */
    h245ciSbeNumber,
    h245ciTerminalJoinedConference,
    h245ciTerminalLeftConference,
    h245ciSeenByAtLeastOneOther,
    h245ciCancelSeenByAtLeastOneOther,
    h245ciSeenByAll,
    h245ciCancelSeenByAll,
    h245ciTerminalYouAreSeeing,
    h245ciRequestForFloor,
    h245ciWithdrawChairToken,
    h245ciFloorRequested,
    h245ciTerminalYouAreSeeingInSubPictureNumber,
    h245ciVideoIndicateCompose,
    /* Conference Commands */
    h245ccBroadcastMyLogicalChannel,
    h245ccCancelBroadcastMyLogicalChannel,
    h245ccMakeTerminalBroadcaster,
    h245ccCancelMakeTerminalBroadcaster,
    h245ccSendThisSource,
    h245ccCancelSendThisSource,
    h245ccDropConference,
    h245ccSubstituteConferenceIDCommand,
    /* Miscellaneous Command */
    h245mcEqualiseDelay,
    h245mcZeroDelay,
    h245mcMaxH223MUXPDUsize,
    h245mcEncryptionUpdate,
    h245mcEncryptionUpdateRequest,
    h245mcProgressiveRefinementStart,
    h245mcProgressiveRefinementAbortOne,
    h245mcProgressiveRefinementAbortContinuous,
    h245mcVideoBadMBs,
    h245mcLostPicture,
    h245mcLostPartialPicture,
    h245mcRecoveryReferencePicture,
    /* Indication */
    h245iJitterIndication,
    h245iH223SkewIndication,
    h245iFunctionNotSupported,
    h245iFlowControlIndication,
    /* Miscellaneous Indication */
    h245miMultipointZeroComm,
    h245miCancelMultipointZeroComm,
    h245miMultipointSecondaryStatus,
    h245miCancelMultipointSecondaryStatus,
    h245miVideoIndicateReadyToActivate,
    h245miVideoNotDecodedMBs
} cmH245MessageType;


#ifndef _FAST_START_H
#include <faststart.h>
#endif
#ifndef _REDENCOD_H
#include <redencod.h>
#endif
#ifndef _USER_INPUT_H
#include <userinput.h>
#endif

/* Callback function prototypes____________________________________________________________________________*/






/* --- Control session callback functions --- */

typedef int
    (RVCALLCONV *cmEvCallCapabilitiesT)(
        IN      HAPPCALL            haCall,
        IN      HCALL               hsCall,
        IN      cmCapStruct*        capabilities[]);

typedef int
    (RVCALLCONV *cmEvCallCapabilitiesExtT)(
        IN      HAPPCALL            haCall,
        IN      HCALL               hsCall,
        IN      cmCapStruct***      capabilities[]);

typedef int
    (RVCALLCONV *cmEvCallNewChannelT)(
        IN      HAPPCALL            haCall,
        IN      HCALL               hsCall,
        IN      HCHAN               hsChan,
        OUT     LPHAPPCHAN          lphaChan);

typedef int
    (RVCALLCONV *cmEvCallCapabilitiesResponseT)(
        IN      HAPPCALL            haCall,
        IN      HCALL               hsCall,
        IN      RvUint32            status);

typedef int
    (RVCALLCONV *cmEvCallMasterSlaveStatusT)(
        IN      HAPPCALL            haCall,
        IN      HCALL               hsCall,
        IN      RvUint32            status);

typedef int
    (RVCALLCONV *cmEvCallRoundTripDelayT)(
        IN      HAPPCALL            haCall,
        IN      HCALL               hsCall,
        IN      RvInt32             delay); /* positive: msec delay, negative: expiration */

typedef int
    (RVCALLCONV *cmEvCallUserInputT)(
        IN      HAPPCALL            haCall,
        IN      HCALL               hsCall,
        IN      RvInt32             userInputId /* user input node id */
        );

typedef int
    (RVCALLCONV *cmEvCallRequestModeT)(
         /* Request to transmit the following modes preferences */
        IN      HAPPCALL            haCall,
        IN      HCALL               hsCall,
        IN      cmReqModeStatus     status,
        IN      RvInt32             nodeId /* pvt nodeId handle according to status */
        );


typedef int
    (RVCALLCONV *cmEvCallMiscStatusT)(
        IN      HAPPCALL            haCall,
        IN      HCALL               hsCall,
        IN      cmMiscStatus        status);


typedef int
    (RVCALLCONV *cmEvCallControlStateChangedT)(

⌨️ 快捷键说明

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