?? rvwpt.h
字號(hào):
/*************************************************************************
* Name : rvwpt.h
*
* Type : C header file
*
* Description : Structures, variables and typedefs required by
* wrapper interface functions.
*
* Date : 2004-03-20
*
*************************************************************************/
#ifndef __RVWPT_H__
#define __RVWPT_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "rvtypes.h"
#include "cm.h"
/*#include "bp8805_version.h"*/
/*#ifdef INCLUDE_RV_RTP*/
#include "rvrtp.h"
/*#endif*/
/*#ifdef H323_DEBUG
#define WTRACE printf("FILE:%s(%d)", __FILE__, __LINE__);printf
#else
#define WTRACE
#endif
*/
#include <windows.h>
#define WM_MSG WM_USER+101
#define WM_WPMSG WM_USER+102
/*#define TRACE printf("%s(%d)", __FILE__, __LINE__);printf*/
#define MAX_CONCURRENT_CALL_NUM 2 /* Max number of simultaneous calls */
#define MAX_CONCURRENT_CHAN_NUM 3 /* Max number of concurrent channels */
#define H245_SEND_PORT 1720
#define H245_LISTEN_PORT 1720
#define BANDWIDTH 2400 /* 384 kbit/s */
#define FIRST_RTP_PORT 30000 /* Local rtp port starts from 30000 */
#define MAX_RTP_PORT 31000 /* Max local rtp port */
#define MAX_DISPLAY_LENGTH 32
#define MAX_H323ID_LENGTH 32
#define MAX_E164NUM_LENGTH 32
#define PRODUCT_IDENTIFIER "BroadEasy IP Phone"
#define PRODUCT_VERSION 1.0/*APP_VERSION_NUMBER*/
#define COUNTRY_CODE 0x26
#define MANUFACTURER_CODE 61
#define REROUTE_TYPE_E164 1
#define REROUTE_TYPE_IPADDR 2
#define MAX_FORWARD_NUMBER_LIST 5
/* Codec timestamp interval */
#define G711_TIMESTAMP_INTERVAL 160
#define G729_TIMESTAMP_INTERVAL 160
#define G723_TIMESTAMP_INTERVAL 240
#ifndef AUDIO_CODEC_NUM
#define AUDIO_CODEC_NUM 4
#endif
#define RV_INT32_MAX RvInt32Const(2147483647)
/*************************************************************************
* Structure: Message ID
*
* Description: ID of messages between the Wrapper and the Application.
* Application -> Wrapper: SEND message
* Application <- Wrapper: REC(receive) message
*
*************************************************************************/
typedef enum
{
WP_SEND_QUERY_AVA, /* send query availability */
WP_SEND_CONN, /* send connect, answer the incoming call */
WP_SEND_TERM, /* send terminate */
WP_SEND_AVA, /* send alerting */
WP_SEND_NOTAVA, /* send not available */
WP_SEND_REGISTER, /* send H323 register request */
WP_SEND_UNREGISTER, /* send H323 un-register request */
WP_REC_QUERY_AVA, /* receive query availability */
WP_REC_CONN, /* receive connection */
WP_REC_TERM, /* receive terminate */
WP_REC_AVA, /* receive available */
WP_REC_NOTAVA, /* receive not available */
WP_REC_ALARM, /* receive alarm */
WP_REC_ERROR, /* receive other errors */
WP_REC_PAUSE, /* 3rd-pty pause begin */
WP_REC_UNPAUSE, /* 3rd-pty pause end */
WP_REC_REGISTER_SUCC, /* receive H323 register success */
WP_REC_REGISTER_FAIL, /* receive H323 register failure */
WP_REC_ARJ, /* reveive H323 Admissioin reject */
WP_REC_REGISTER_TIMEOUT, /* receive H323 register timeout */
WP_REC_UNREGISTER_SUCC, /* receive H323 un-register success */
WP_REC_UNREGISTER_FAIL, /* receive H323 un-register failure */
WP_REC_USER_INPUT, /* received User Input Indication msgs */
WP_CALL_TRANSFER, /* incoming call transfer request */
WP_CALL_TRANSFER_IDENTIFY, /* call transfer identify request (to party 'C') */
WP_REC_CT_IDENTIFY, /* received call transfer identify request (to party 'C') */
WP_SEND_CTIDENT_RR, /* for sending a Call Transfer Identify Return Result */
WP_CT_IDENT_RESULT_RCVD, /* call transfer identify result received */
WP_CT_IDENT_ERROR_RCVD, /* call transfer identify error received */
WP_INITIATE_CALL_TRANSFER, /* for sending a Call Transfer Init */
WP_SEND_CALL_TRANSFER_SETUP,/* for sending a Call Transfer Setup */
WP_CALL_TRANSFER_ABANDON, /* call transfer abandon request */
WP_REC_CT_ABANDON, /* received call transfer abandon */
WP_CT_INIT_RESULT_RCVD, /* call transfer initiate return result received */
WP_CT_INIT_ERROR_RCVD, /* call transfer initiate error received */
WP_SET_CT_IDLE, /* set call transfer state back to IDLE */
WP_SEND_TERM_CTI_RR, /* send terminate with CallTransferInitiate ReturnResult */
WP_SEND_TERM_CTS_RE, /* send terminate with CallTransferSetup ReturnError */
WP_SEND_TERM_REJ, /* send terminate to clear call, with an H.450 Reject message */
WP_SEND_CALL_FORWARD, /* send a Call Forward H.450.3 message */
WP_CALL_FORWARD_RCVD, /* call forward (call reroute) message received */
WP_SEND_USERINPUT, /* send user input indication */
WP_REC_NO_CAPACITY /*receive audio codec not match*/
} WpMsgId;
/* Alow recursive use of these structs */
typedef struct CallInfo_tag CallInfo;
typedef struct ChannelInfo_tag ChannelInfo;
typedef struct AudioInfo_tag AudioInfo;
typedef HANDLE RvSemaphore;
/*************************************************************************
* Structure: CallInfo
*
* Description: This struct includes all the call parameters that
* will be used in the call state.
*
*************************************************************************/
typedef struct OutParam
{
char localShow[MAX_DISPLAY_LENGTH+1];
char localE164[MAX_E164NUM_LENGTH+1];
int gkstatus;
char localId[MAX_H323ID_LENGTH+1];
char password[16];
}OutParam;
extern OutParam AppParam;
struct MD5Context
{
unsigned long buf[4];
unsigned long bits[2];
unsigned char in[64];
};
typedef struct MD5Context MD5_CTX;
struct CallInfo_tag
{
HCALL hsCall; /* Call handle in the CM for this call */
HCHAN hsChan; /* handle of the outgoing channel */
RvBool isIncoming; /* If the call is a incoming call */
RvBool isFastConnect; /* If the incoming call is fast start */
RvBool isForwarded; /* If we are forwarded or transferred */
RvBool isTransferring; /* If we have transferred the current call */
RvUint16 rtpPort; /* RTP port of the incoming fast start */
RvUint32 ip; /* RTP ip address of the remote end */
RvBool isConnected; /* If the call has been connected */
RvBool isCallDroped; /* If the call has been droped */
RvBool needOLC; /* If need open logical channel once more */
RvInt txcodeIndex; /* Codec index in the wpCodecList of the
outgoing OpenLogicalChannel */
RvInt rxcodeIndex; /* Codec index in the wpCodecList of the
incoming OpenLogicalChannel */
RvInt payload;
#ifdef INCLUDE_RV_RTP
HRTPSESSION rtpSession;
HRTCPSESSION rtcpSession;
#endif
};
/*************************************************************************
* Structure: ChannelInfo
*
* Description: This struct holds the application's information about a channel.
*
*************************************************************************/
struct ChannelInfo_tag
{
HCHAN hsChan; /* CM Handle for the channel */
};
/*************************************************************************
* Structure: WpCallTransfer
*
* Description: This struct holds the application's information about call transfer.
*
*************************************************************************/
typedef struct WpCallTransfer_tag
{
RvChar callIdentity[8]; /* Should be a string of 0-4 numeric characters */
RvChar transferToNumber[40];/* Transferred to number */
RvUint16 transferToAddrType;
RvUint16 transferToAddrLen;
RvChar transferringNumber[40];/* Transferring number */
RvUint16 transferringAddrType;
RvUint16 transferringAddrLen;
RvUint32 codec; /* WpCodecPref pointer */
RvUint16 InvokeID;
RvUint16 ErrCode;
} WpCallTransfer;
/*************************************************************************
* Structure: WpBaseInfo
*
* Description: This struct holds some basic information about a call.
*
*************************************************************************/
typedef struct WpBaseInfo_tag
{
RvUint8 callIndex; /* Call index, 0 to MAX_CONCURRENT_CALL_NUM - 1 */
RvChar localH323Id[MAX_H323ID_LENGTH + 1]; /* Local H323 Id */
RvChar localE164Num[MAX_E164NUM_LENGTH + 1]; /* Local E164 Num */
RvUint32 remoteIpAddr; /* Remote IP address */
RvChar remoteH323Id[MAX_H323ID_LENGTH + 1]; /* Remote H323 Id */
RvChar remoteE164Num[MAX_E164NUM_LENGTH + 1];/* Remote E164 Num */
RvChar display[MAX_DISPLAY_LENGTH + 1]; /* Display string */
} WpBaseInfo;
/*************************************************************************
* Structure: WpRegister
*
* Description: This struct holds the information about registering to GK.
*
*************************************************************************/
typedef struct WpRegister_tag
{
RvInt ttlTime;
} WpRegister;
/*************************************************************************
* Structure: WpCallForward
*
* Description: This struct holds application's information about call forward.
*
*************************************************************************/
typedef struct WpCallForward_tag
{
RvChar ForwardToNumber[40];
RvInt32 ForwardToAddrType;
RvInt32 ForwardToAddrLen;
RvBool hasCycle; /* If there is a cycle in the call history */
} WpCallForward;
/*************************************************************************
* Structure: WpAlarm
*
* Description: This struct holds the alarm information.
*
*************************************************************************/
typedef struct WpAlarm_tag
{
int errnum;
} WpAlarm;
typedef enum WpCodex_tag
{
AUDIO_G723, /* G.723.1 */
AUDIO_G729AB, /* AnnexA & AnnexB */
AUDIO_G729B, /* AnnexB */
AUDIO_G729A, /* AnnexA */
AUDIO_G729,
AUDIO_G726_32, /* 32 kbps (T8300 only) */
AUDIO_G722, /* do not use */
AUDIO_G711U, /* G.711 u-law */
AUDIO_G711A, /* G.711 A-law */
AUDIO_CODEC_MAX, /* used to mark end of valid codec choices */
} WpCodex;
typedef struct WpCodec_tag
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -