extractSuppSvcs.h
资源名称:h323.zip [点击查看]
上传用户:hnnddl
上传日期:2007-01-06
资源大小:3580k
文件大小:7k
源码类别:
IP电话/视频会议
开发平台:
WINDOWS
- /*
- * $Revision: 1.2 $
- * $Date: 1998/12/21 16:50:13 $
- */
- #ifndef INCLUDED_EXTRACTSUPPSVCS_H
- #define INCLUDED_EXTRACTSUPPSVCS_H
- #define MAX_ROS 4
- #define MAXOUTSTR 40
- #define MAXSTRLEN(len) ((len < (MAXOUTSTR-1)) ? len : (MAXOUTSTR-1))
- #define MAXBUF 512
- // Prototypes
- char *sprint_sockaddr(sockaddr *addr, char *str);
- char *sprint_string(unsigned char *ustr, int len, char *retstr);
- struct extractedFacilityExt {
- int isSet;
- int SrcEntity;
- int DstEntity;
- H450AliasAddress *SrcAliasAddr; // delete SrcAliasAddr
- H450AliasAddress *DstAliasAddr; // delete DstAliasAddr
- };
- struct extractedError {
- int type; // See H450ErrorType
- int error; // See H450ErrorList
- int code; // local only
- };
- struct extractedArg {
- int type; // See H450ArgumentType
- // Extension Sequence
- int NumExtension;
- H4501Extension *Extension; // delete [] Extension
- // Non Standard Parameter
- H450NonStdParam *NonStdParam; // delete NonStdParam
- // Endpoint Address
- H4501EndpointAddr *EndpointAddr; // delete EndpointAddr
- // Call Identifier
- char CallID[5];
- // redirectionInfo/connectedInfo
- int lenInfo;
- unsigned short *pInfo;
- // Basic Call Info Elements
- H4501H225IE *H225IE; // delete H225IE
- // Subaddress Transfer
- H4501PartySubaddress *PartySubaddress; // delete PartySubaddress
- // End Designation
- int EndType; // See H4502EndType
- // Call Status
- int CallStatus; // See H4502CallStatusType
- };
- struct extractedRes {
- int type; // See H450ResultType
- // Extension Sequence
- int NumExtension;
- H4501Extension *Extension; // delete [] Extension
- // Non Standard Parameter
- H450NonStdParam *NonStdParam; // delete NonStdParam
- // Endpoint Address
- H4501EndpointAddr *EndpointAddr; // delete EndpointAddr
- // Call Identifier
- char CallID[5];
- };
- struct extractedProblem {
- int type; // See H4501ProblemType
- // See H4501GeneralProblem
- // H4501InvokeProblem
- // H4501ReturnResultProblem
- // H4501ReturnErrorProblem
- // H4501RejectProblem
- int Problem;
- };
- struct extractedROS {
- int type;
- int InvokeId;
- int code; // local only
- struct extractedError error;
- struct extractedArg Arg;
- struct extractedRes Res;
- struct extractedProblem Problem;
- int LinkedId;
- };
- class extractedSS
- {
- public:
- struct extractedFacilityExt ssFacilityExt;
- int ssInterpAPDU;
- int ssNumROSs;
- int *ssROSTypes;
- struct extractedROS ssROS[MAX_ROS];
- extractedSS() {
- initExtractedSS();
- };
- ~extractedSS() {
- for(int i = 0; i < ssNumROSs; i++) {
- delete [] ssROS[i].Arg.Extension;
- delete ssROS[i].Arg.NonStdParam;
- delete ssROS[i].Arg.EndpointAddr;
- delete ssROS[i].Arg.H225IE;
- delete ssROS[i].Arg.PartySubaddress;
- delete [] ssROS[i].Res.Extension;
- delete ssROS[i].Res.NonStdParam;
- delete ssROS[i].Res.EndpointAddr;
- }
- delete ssFacilityExt.SrcAliasAddr;
- delete ssFacilityExt.DstAliasAddr;
- delete [] ssROSTypes;
- };
- void initExtractedSS() {
- ssFacilityExt.isSet = FALSE;
- ssFacilityExt.SrcEntity = ENTT_INVALID;
- ssFacilityExt.DstEntity = ENTT_INVALID;
- ssFacilityExt.SrcAliasAddr = NULL;
- ssFacilityExt.DstAliasAddr = NULL;
- ssInterpAPDU = IAPDU_INVALID;
- ssNumROSs = 0;
- ssROSTypes = NULL;
- for(int i = 0; i < MAX_ROS; i++) {
- ssROS[i].type = ROS_INVALID;
- ssROS[i].InvokeId = -1;
- ssROS[i].code = CTOT_INVALID;
- ssROS[i].error.type = ERRT_INVALID;
- ssROS[i].error.error = -1;
- ssROS[i].error.code = -1;
- ssROS[i].Arg.type = ARGT_INVALID;
- ssROS[i].Arg.NumExtension = 0;
- ssROS[i].Arg.Extension = NULL;
- ssROS[i].Arg.NonStdParam = NULL;
- ssROS[i].Arg.EndpointAddr = NULL;
- ssROS[i].Arg.CallID[0] = ' ';
- ssROS[i].Arg.lenInfo = 0;
- ssROS[i].Arg.pInfo = NULL;
- ssROS[i].Arg.H225IE = NULL;
- ssROS[i].Arg.PartySubaddress = NULL;
- ssROS[i].Arg.EndType = ETP_INVALID;
- ssROS[i].Arg.CallStatus = CST_INVALID;
- ssROS[i].Res.type = REST_INVALID;
- ssROS[i].Res.NumExtension = 0;
- ssROS[i].Res.Extension = NULL;
- ssROS[i].Res.NonStdParam = NULL;
- ssROS[i].Res.EndpointAddr = NULL;
- ssROS[i].Res.CallID[0] = ' ';
- ssROS[i].Problem.type = PROB_INVALID;
- ssROS[i].Problem.Problem = GPROB_INVALID;
- ssROS[i].LinkedId = 0;
- }
- };
- // Methods
- boolean tH4501SuppService(H4501SuppService *pSuppService);
- private:
- int *pssCode;
- struct extractedROS *pssROS;
- struct extractedError *pssError;
- struct extractedArg *pssArg;
- struct extractedRes *pssRes;
- struct extractedProblem *pssProblem;
- struct extractedFacilityExt *pssFac;
- boolean tItemExt(void *pItemExt, int derivedclass, int indent);
- boolean tItemCallId(void *pItemCallId, int derivedclass, int indent);
- boolean tItemNumber(void *pItemNumber, int derivedclass, int indent);
- boolean tItemInfo(void *pItemInfo, int derivedclass, int indent);
- boolean tItemElements(void *pItemElements, int derivedclass, int indent);
- boolean tH4501FacilityExt(H4501FacilityExt *pFacilityExt, int indent);
- boolean tH4501Invoke(H4501Invoke *pInvoke, int indent);
- boolean tH4501ReturnResult(H4501ReturnResult *pReturnResult, int indent);
- boolean tH4501ReturnError(H4501ReturnError *pReturnError, int indent);
- boolean tH4501Reject(H4501Reject *pReject, int indent);
- boolean tH450Arg(void *pArg, int argtype, int indent);
- boolean tH450Res(void *pRes, int restype, int indent);
- boolean tH4502DummyRes(H4502DummyRes *pDummyRes, int indent);
- boolean tH4502CTIdentifyRes(H4502CTIdentifyRes *pCTIdentifyRes, int indent);
- boolean tH4502DummyArg(H4502DummyArg *pDummyArg, int indent);
- boolean tH4502CTInitiateArg(H4502CTInitiateArg *pCTInitiateArg, int indent);
- boolean tH4502CTSetupArg(H4502CTSetupArg *pCTSetupArg, int indent);
- boolean tH4502CTUpdateArg(H4502CTUpdateArg *pCTUpdateArg, int indent);
- boolean tH4502CTSubaddressArg(H4502CTSubaddressArg *pCTSubaddressArg, int indent);
- boolean tH4502CTCompleteArg(H4502CTCompleteArg *pCTCompleteArg, int indent);
- boolean tH4502CTActiveArg(H4502CTActiveArg *pCTActiveArg, int indent);
- boolean tH4501Extension(H4501Extension *pExtension, int indent);
- boolean tH4501Code(H4501Code *pCode, int indent);
- boolean tH450ErrorParameter(void *pErrorParameter, int paramtype, int indent);
- boolean tH4502UnspecifiedParam(H4502UnspecifiedParam *pUnspecifiedParam, int indent);
- boolean tH450Error(H450Error *pError, int indent);
- boolean tH4501Problem(H4501Problem *pProblem, int indent);
- boolean tH4501H225IE(H4501H225IE *pH225IE, int indent);
- boolean tH4501UserSubaddress(H4501UserSubaddress *pUserSubaddress, int indent);
- boolean tH4501PartySubaddress(H4501PartySubaddress *pPartySubaddress, int indent);
- boolean tH4501EndpointAddr(H4501EndpointAddr *pEndpointAddr, int indent);
- boolean tH450NonStdParam(H450NonStdParam *pNonStdParam, int indent);
- boolean tH450AliasAddress(H450AliasAddress *pAliasAddress, int indent);
- };
- void test_extractedSS(extractedSS *extSS, int count);
- #endif // INCLUDED_EXTRACTSUPPSVCS_H