extractSuppSvcs.cpp
资源名称:h323.zip [点击查看]
上传用户:hnnddl
上传日期:2007-01-06
资源大小:3580k
文件大小:71k
源码类别:
IP电话/视频会议
开发平台:
WINDOWS
- /*
- * $Revision: 1.4 $
- * $Date: 1998/12/21 16:50:13 $
- */
- #include <stdio.h>
- #include <ctype.h>
- #include "api/h4501suppserv.h"
- #include "exchange.h"
- #include "h450msgs.h"
- // Used for switch statement in tItemXxxx()
- enum derivedclassType
- {
- H4502DUMMYRES = 0,
- H4502DUMMYARG,
- H4502CTSUBADDRESSARG,
- H4502CTIDENTIFYRES,
- H4502CTINITIATEARG,
- H4502CTSETUPARG,
- H4502CTUPDATEARG,
- H4502CTCOMPLETEARG,
- H4502CTACTIVEARG
- };
- char *blanks[] = {" "," "," "," "," ",
- " "," "," ",
- " "," ",
- " "};
- char *printError(ProtReturnCode ret, char *msg);
- #define PRINT_EXT if(config->verbose) printf
- //-------------------------------------
- // Method: H4501SuppService
- //-------------------------------------
- boolean
- extractedSS::tH4501SuppService(H4501SuppService *pSuppService)
- {
- ProtReturnCode ret;
- boolean bret;
- boolean valid;
- int i;
- int indent;
- indent = 0;
- if(!(valid = pSuppService->Valid())) {
- return(valid);
- }
- //
- // Method: GetNetFacExt
- //
- H4501FacilityExt FacilityExt;
- PRINT_EXT("%sGetNetFacExt()n",blanks[indent]);
- ret = pSuppService->GetNetFacExt(FacilityExt);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssFac = &ssFacilityExt;
- bret = tH4501FacilityExt(&FacilityExt, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4501FacilityExt() not setn",blanks[indent]);
- }
- }
- //
- // Method: GetInterpAPDU
- //
- int InterpAPDU;
- PRINT_EXT("%sGetInterpAPDU()n",blanks[indent]);
- ret = pSuppService->GetInterpAPDU(InterpAPDU);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetInterpAPDU() InterpAPDU = %dn",blanks[indent],InterpAPDU);
- ssInterpAPDU = InterpAPDU;
- }
- //
- // Method: GetNumROSs
- //
- int count;
- PRINT_EXT("%sGetNumROSs()n",blanks[indent]);
- ret = pSuppService->GetNumROSs(count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetNumROSs() count = %dn",blanks[indent],count);
- ssNumROSs = count;
- }
- //
- // Method: GetROSTypes
- //
- int *ROSTypes;
- ROSTypes = new int[count];
- PRINT_EXT("%sGetROSTypes()n",blanks[indent]);
- ret = pSuppService->GetROSTypes(ROSTypes, count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- ssROSTypes = new int[count];
- for(i = 0; i < count; i++) {
- ssROSTypes[i] = ROSTypes[i];
- }
- bret = FALSE;
- }
- //
- // Method: GetROS
- //
- for(i = 0; i < count; i++) {
- switch(ROSTypes[i]) {
- case ROS_INVALID:
- {
- ssROS[i].type = ROS_INVALID;
- PRINT_EXT("%sERROR: ROS() type ROS_INVALIDn",blanks[indent]);
- break;
- }
- case ROS_INVOKE:
- {
- H4501Invoke ROS;
- PRINT_EXT("%sGetROS()[%d] type=%dn",blanks[indent],i,ROSTypes[i]);
- ret = pSuppService->GetROS(i, ROS);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssROS = &ssROS[i];
- pssROS->type = ROS_INVOKE;
- PRINT_EXT("%stH4501Invoke()n",blanks[indent]);
- bret = tH4501Invoke(&ROS, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4501Invoke() not setn",blanks[indent]);
- }
- }
- break;
- }
- case ROS_RETURN_RESULT:
- {
- H4501ReturnResult ROS;
- PRINT_EXT("%sGetROS() type=%dn",blanks[indent],ROSTypes[i]);
- ret = pSuppService->GetROS(i, ROS);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssROS = &ssROS[i];
- pssROS->type = ROS_RETURN_RESULT;
- PRINT_EXT("%stH4501ReturnResult()n",blanks[indent]);
- bret = tH4501ReturnResult(&ROS, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4501ReturnResult() not setn",blanks[indent]);
- }
- }
- break;
- }
- case ROS_RETURN_ERROR:
- {
- H4501ReturnError ROS;
- PRINT_EXT("%sGetROS() type=%dn",blanks[indent],ROSTypes[i]);
- ret = pSuppService->GetROS(i, ROS);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssROS = &ssROS[i];
- pssROS->type = ROS_RETURN_ERROR;
- PRINT_EXT("%stH4501ReturnError()n",blanks[indent]);
- bret = tH4501ReturnError(&ROS, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4501ReturnError() not setn",blanks[indent]);
- }
- }
- break;
- }
- case ROS_REJECT:
- {
- H4501Reject ROS;
- PRINT_EXT("%sGetROS() type=%dn",blanks[indent],ROSTypes[i]);
- ret = pSuppService->GetROS(i, ROS);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssROS = &ssROS[i];
- pssROS->type = ROS_REJECT;
- PRINT_EXT("%stH4501Reject()n",blanks[indent]);
- bret = tH4501Reject(&ROS, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4501Reject() not setn",blanks[indent]);
- }
- }
- break;
- }
- default:
- PRINT_EXT("%sERROR: ROS() type is not defined %dn",blanks[indent],ROSTypes[i]);
- break;
- }
- }
- delete [] ROSTypes;
- return(bret);
- }
- //-------------------------------------
- // Method: ItemExt
- //-------------------------------------
- boolean
- extractedSS::tItemExt(void *pItemExt, int derivedclass, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- int type;
- int count;
- int i;
- H4501Extension *Extension;
- H450NonStdParam NonStdParam;
- switch(derivedclass) {
- case H4502DUMMYRES:
- {
- H4502DummyRes *pDummyRes;
- pDummyRes = (H4502DummyRes *)pItemExt;
- type = pDummyRes->GetType();
- if(type == EXTT_EXTENSION_SEQUENCE) {
- PRINT_EXT("%sGetNumExtensions()n",blanks[indent]);
- ret = pDummyRes->GetNumExtensions(count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetNumExtensions() count = %dn",blanks[indent],count);
- Extension = new H4501Extension[count];
- PRINT_EXT("%sGetExtensions()n",blanks[indent]);
- ret = pDummyRes->GetExtensions(Extension, count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssRes->NumExtension = count;
- pssRes->Extension = new H4501Extension[count];
- for(i = 0; i < count; i++) {
- pssRes->Extension[i] = Extension[i];
- }
- }
- delete [] Extension;
- }
- } else if(type == EXTT_NON_STANDARD_DATA) {
- PRINT_EXT("%sGetNonStdData()n",blanks[indent]);
- ret = pDummyRes->GetNonStdData(NonStdParam);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssRes->NonStdParam = new H450NonStdParam;
- *pssRes->NonStdParam = NonStdParam;
- }
- }
- break;
- }
- case H4502DUMMYARG:
- {
- H4502DummyArg *pDummyArg;
- pDummyArg = (H4502DummyArg *)pItemExt;
- type = pDummyArg->GetType();
- if(type == EXTT_EXTENSION_SEQUENCE) {
- PRINT_EXT("%sGetNumExtensions()n",blanks[indent]);
- ret = pDummyArg->GetNumExtensions(count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetNumExtensions() count = %dn",blanks[indent],count);
- Extension = new H4501Extension[count];
- PRINT_EXT("%sGetExtensions()n",blanks[indent]);
- ret = pDummyArg->GetExtensions(Extension, count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssArg->NumExtension = count;
- pssArg->Extension = new H4501Extension[count];
- for(i = 0; i < count; i++) {
- pssArg->Extension[i] = Extension[i];
- }
- }
- delete [] Extension;
- }
- } else if(type == EXTT_NON_STANDARD_DATA) {
- PRINT_EXT("%sGetNonStdData()n",blanks[indent]);
- ret = pDummyArg->GetNonStdData(NonStdParam);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssArg->NonStdParam = new H450NonStdParam;
- *pssArg->NonStdParam = NonStdParam;
- }
- }
- break;
- }
- case H4502CTSUBADDRESSARG:
- {
- H4502CTSubaddressArg *pCTSubaddressArg;
- pCTSubaddressArg = (H4502CTSubaddressArg *)pItemExt;
- type = pCTSubaddressArg->GetType();
- if(type == EXTT_EXTENSION_SEQUENCE) {
- PRINT_EXT("%sGetNumExtensions()n",blanks[indent]);
- ret = pCTSubaddressArg->GetNumExtensions(count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetNumExtensions() count = %dn",blanks[indent],count);
- Extension = new H4501Extension[count];
- PRINT_EXT("%sGetExtensions()n",blanks[indent]);
- ret = pCTSubaddressArg->GetExtensions(Extension, count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssArg->NumExtension = count;
- pssArg->Extension = new H4501Extension[count];
- for(i = 0; i < count; i++) {
- pssArg->Extension[i] = Extension[i];
- }
- }
- delete [] Extension;
- }
- } else if(type == EXTT_NON_STANDARD_DATA) {
- PRINT_EXT("%sGetNonStdData()n",blanks[indent]);
- ret = pCTSubaddressArg->GetNonStdData(NonStdParam);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssArg->NonStdParam = new H450NonStdParam;
- *pssArg->NonStdParam = NonStdParam;
- }
- }
- break;
- }
- case H4502CTIDENTIFYRES:
- {
- H4502CTIdentifyRes *pCTIdentifyRes;
- pCTIdentifyRes = (H4502CTIdentifyRes *)pItemExt;
- type = pCTIdentifyRes->GetType();
- if(type == EXTT_EXTENSION_SEQUENCE) {
- PRINT_EXT("%sGetNumExtensions()n",blanks[indent]);
- ret = pCTIdentifyRes->GetNumExtensions(count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetNumExtensions() count = %dn",blanks[indent],count);
- Extension = new H4501Extension[count];
- PRINT_EXT("%sGetExtensions()n",blanks[indent]);
- ret = pCTIdentifyRes->GetExtensions(Extension, count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssRes->NumExtension = count;
- pssRes->Extension = new H4501Extension[count];
- for(i = 0; i < count; i++) {
- pssRes->Extension[i] = Extension[i];
- }
- }
- delete [] Extension;
- }
- } else if(type == EXTT_NON_STANDARD_DATA) {
- PRINT_EXT("%sGetNonStdData()n",blanks[indent]);
- ret = pCTIdentifyRes->GetNonStdData(NonStdParam);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssRes->NonStdParam = new H450NonStdParam;
- *pssRes->NonStdParam = NonStdParam;
- }
- }
- break;
- }
- case H4502CTINITIATEARG:
- {
- H4502CTInitiateArg *pCTInitiateArg;
- pCTInitiateArg = (H4502CTInitiateArg *)pItemExt;
- type = pCTInitiateArg->GetType();
- if(type == EXTT_EXTENSION_SEQUENCE) {
- PRINT_EXT("%sGetNumExtensions()n",blanks[indent]);
- ret = pCTInitiateArg->GetNumExtensions(count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetNumExtensions() count = %dn",blanks[indent],count);
- Extension = new H4501Extension[count];
- PRINT_EXT("%sGetExtensions()n",blanks[indent]);
- ret = pCTInitiateArg->GetExtensions(Extension, count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssArg->NumExtension = count;
- pssArg->Extension = new H4501Extension[count];
- for(i = 0; i < count; i++) {
- pssArg->Extension[i] = Extension[i];
- }
- }
- delete [] Extension;
- }
- } else if(type == EXTT_NON_STANDARD_DATA) {
- PRINT_EXT("%sGetNonStdData()n",blanks[indent]);
- ret = pCTInitiateArg->GetNonStdData(NonStdParam);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssArg->NonStdParam = new H450NonStdParam;
- *pssArg->NonStdParam = NonStdParam;
- }
- }
- break;
- }
- case H4502CTSETUPARG:
- {
- H4502CTSetupArg *pCTSetupArg;
- pCTSetupArg = (H4502CTSetupArg *)pItemExt;
- type = pCTSetupArg->GetType();
- if(type == EXTT_EXTENSION_SEQUENCE) {
- PRINT_EXT("%sGetNumExtensions()n",blanks[indent]);
- ret = pCTSetupArg->GetNumExtensions(count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetNumExtensions() count = %dn",blanks[indent],count);
- Extension = new H4501Extension[count];
- PRINT_EXT("%sGetExtensions()n",blanks[indent]);
- ret = pCTSetupArg->GetExtensions(Extension, count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssArg->NumExtension = count;
- pssArg->Extension = new H4501Extension[count];
- for(i = 0; i < count; i++) {
- pssArg->Extension[i] = Extension[i];
- }
- }
- delete [] Extension;
- }
- } else if(type == EXTT_NON_STANDARD_DATA) {
- PRINT_EXT("%sGetNonStdData()n",blanks[indent]);
- ret = pCTSetupArg->GetNonStdData(NonStdParam);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssArg->NonStdParam = new H450NonStdParam;
- *pssArg->NonStdParam = NonStdParam;
- }
- }
- break;
- }
- case H4502CTUPDATEARG:
- {
- H4502CTUpdateArg *pCTUpdateArg;
- pCTUpdateArg = (H4502CTUpdateArg *)pItemExt;
- type = pCTUpdateArg->GetType();
- if(type == EXTT_EXTENSION_SEQUENCE) {
- PRINT_EXT("%sGetNumExtensions()n",blanks[indent]);
- ret = pCTUpdateArg->GetNumExtensions(count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetNumExtensions() count = %dn",blanks[indent],count);
- Extension = new H4501Extension[count];
- PRINT_EXT("%sGetExtensions()n",blanks[indent]);
- ret = pCTUpdateArg->GetExtensions(Extension, count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssArg->NumExtension = count;
- pssArg->Extension = new H4501Extension[count];
- for(i = 0; i < count; i++) {
- pssArg->Extension[i] = Extension[i];
- }
- }
- delete [] Extension;
- }
- } else if(type == EXTT_NON_STANDARD_DATA) {
- PRINT_EXT("%sGetNonStdData()n",blanks[indent]);
- ret = pCTUpdateArg->GetNonStdData(NonStdParam);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssArg->NonStdParam = new H450NonStdParam;
- *pssArg->NonStdParam = NonStdParam;
- }
- }
- break;
- }
- case H4502CTCOMPLETEARG:
- {
- H4502CTCompleteArg *pCTCompleteArg;
- pCTCompleteArg = (H4502CTCompleteArg *)pItemExt;
- type = pCTCompleteArg->GetType();
- if(type == EXTT_EXTENSION_SEQUENCE) {
- PRINT_EXT("%sGetNumExtensions()n",blanks[indent]);
- ret = pCTCompleteArg->GetNumExtensions(count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetNumExtensions() count = %dn",blanks[indent],count);
- Extension = new H4501Extension[count];
- PRINT_EXT("%sGetExtensions()n",blanks[indent]);
- ret = pCTCompleteArg->GetExtensions(Extension, count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssArg->NumExtension = count;
- pssArg->Extension = new H4501Extension[count];
- for(i = 0; i < count; i++) {
- pssArg->Extension[i] = Extension[i];
- }
- }
- delete [] Extension;
- }
- } else if(type == EXTT_NON_STANDARD_DATA) {
- PRINT_EXT("%sGetNonStdData()n",blanks[indent]);
- ret = pCTCompleteArg->GetNonStdData(NonStdParam);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssArg->NonStdParam = new H450NonStdParam;
- *pssArg->NonStdParam = NonStdParam;
- }
- }
- break;
- }
- case H4502CTACTIVEARG:
- {
- H4502CTActiveArg *pCTActiveArg;
- pCTActiveArg = (H4502CTActiveArg *)pItemExt;
- type = pCTActiveArg->GetType();
- if(type == EXTT_EXTENSION_SEQUENCE) {
- PRINT_EXT("%sGetNumExtensions()n",blanks[indent]);
- ret = pCTActiveArg->GetNumExtensions(count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetNumExtensions() count = %dn",blanks[indent],count);
- Extension = new H4501Extension[count];
- PRINT_EXT("%sGetExtensions()n",blanks[indent]);
- ret = pCTActiveArg->GetExtensions(Extension, count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssArg->NumExtension = count;
- pssArg->Extension = new H4501Extension[count];
- for(i = 0; i < count; i++) {
- pssArg->Extension[i] = Extension[i];
- }
- }
- delete [] Extension;
- }
- } else if(type == EXTT_NON_STANDARD_DATA) {
- PRINT_EXT("%sGetNonStdData()n",blanks[indent]);
- ret = pCTActiveArg->GetNonStdData(NonStdParam);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssArg->NonStdParam = new H450NonStdParam;
- *pssArg->NonStdParam = NonStdParam;
- }
- }
- break;
- }
- default:
- PRINT_EXT("%sERROR: tItemExt() invalid derivedclass %dn",blanks[indent],derivedclass);
- return(FALSE);
- break;
- }
- if(type == EXTT_EXTENSION_SEQUENCE) {
- for(i = 0; i < count; i++) {
- bret = tH4501Extension(&Extension[i], indent+1);
- if(!bret) {
- PRINT_EXT("%stH4501Extension() Extension[%d] not setn",blanks[indent],i);
- }
- }
- PRINT_EXT("%sGetExtensions() count = %dn",blanks[indent],count);
- } else if(type == EXTT_NON_STANDARD_DATA) {
- bret = tH450NonStdParam(&NonStdParam, indent+1);
- if(!bret) {
- PRINT_EXT("%stH450NonStdParam() not setn",blanks[indent]);
- }
- } else if(type == EXTT_INVALID) {
- PRINT_EXT("%sERROR: ItemExt() type is EXTT_INVALIDn",blanks[indent]);
- bret = FALSE;
- } else {
- PRINT_EXT("%sERROR: ItemExt() type is not defined %dn",blanks[indent],type);
- bret = FALSE;
- }
- return(bret);
- }
- //-------------------------------------
- // Method: ItemCallId
- //-------------------------------------
- boolean
- extractedSS::tItemCallId(void *pItemCallId, int derivedclass, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- int is_arg;
- //
- // Method: GetCallID
- //
- char *char_str;
- //RM char_str = new char[5];
- int length;
- PRINT_EXT("%sGetCallID()n",blanks[indent]);
- is_arg = 1;
- switch(derivedclass) {
- case H4502CTIDENTIFYRES:
- {
- H4502CTIdentifyRes *pCTIdentifyRes;
- pCTIdentifyRes = (H4502CTIdentifyRes *)pItemCallId;
- ret = pCTIdentifyRes->GetCallID(char_str, length);
- is_arg = 0;
- break;
- }
- case H4502CTINITIATEARG:
- {
- H4502CTInitiateArg *pCTInitiateArg;
- pCTInitiateArg = (H4502CTInitiateArg *)pItemCallId;
- ret = pCTInitiateArg->GetCallID(char_str, length);
- break;
- }
- case H4502CTSETUPARG:
- {
- H4502CTSetupArg *pCTSetupArg;
- pCTSetupArg = (H4502CTSetupArg *)pItemCallId;
- ret = pCTSetupArg->GetCallID(char_str, length);
- break;
- }
- default:
- PRINT_EXT("%sERROR: tItemCallId() invalid derivedclass %dn",blanks[indent],derivedclass);
- return(FALSE);
- break;
- }
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- bret = FALSE;
- } else {
- if(is_arg == 1) {
- strncpy(pssArg->CallID,char_str,length);
- } else {
- strncpy(pssRes->CallID,char_str,length);
- }
- char retstr[MAXOUTSTR];
- PRINT_EXT("%sGetCallID() char_str = %sn",blanks[indent],
- sprint_string((unsigned char *)char_str, MAXSTRLEN(length), retstr));
- PRINT_EXT("%sGetCallID() length = %dn",blanks[indent],length);
- bret = TRUE;
- }
- return(bret);
- }
- //-------------------------------------
- // Method: ItemNumber
- //-------------------------------------
- boolean
- extractedSS::tItemNumber(void *pItemNumber, int derivedclass, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- int is_arg;
- //
- // Method: GetNumber
- //
- H4501EndpointAddr EndpointAddr;
- PRINT_EXT("%sGetNumber()n",blanks[indent]);
- is_arg = 1;
- switch(derivedclass) {
- case H4502CTIDENTIFYRES:
- {
- H4502CTIdentifyRes *pCTIdentifyRes;
- pCTIdentifyRes = (H4502CTIdentifyRes *)pItemNumber;
- ret = pCTIdentifyRes->GetNumber(EndpointAddr);
- is_arg = 0;
- break;
- }
- case H4502CTINITIATEARG:
- {
- H4502CTInitiateArg *pCTInitiateArg;
- pCTInitiateArg = (H4502CTInitiateArg *)pItemNumber;
- ret = pCTInitiateArg->GetNumber(EndpointAddr);
- break;
- }
- case H4502CTSETUPARG:
- {
- H4502CTSetupArg *pCTSetupArg;
- pCTSetupArg = (H4502CTSetupArg *)pItemNumber;
- ret = pCTSetupArg->GetNumber(EndpointAddr);
- break;
- }
- case H4502CTUPDATEARG:
- {
- H4502CTUpdateArg *pCTUpdateArg;
- pCTUpdateArg = (H4502CTUpdateArg *)pItemNumber;
- ret = pCTUpdateArg->GetNumber(EndpointAddr);
- break;
- }
- case H4502CTCOMPLETEARG:
- {
- H4502CTCompleteArg *pCTCompleteArg;
- pCTCompleteArg = (H4502CTCompleteArg *)pItemNumber;
- ret = pCTCompleteArg->GetNumber(EndpointAddr);
- break;
- }
- case H4502CTACTIVEARG:
- {
- H4502CTActiveArg *pCTActiveArg;
- pCTActiveArg = (H4502CTActiveArg *)pItemNumber;
- ret = pCTActiveArg->GetNumber(EndpointAddr);
- break;
- }
- default:
- PRINT_EXT("%sERROR: tItemNumber() invalid derivedclass %dn",blanks[indent],derivedclass);
- return(FALSE);
- break;
- }
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- bret = FALSE;
- } else {
- if(is_arg == 1) {
- pssArg->EndpointAddr = new H4501EndpointAddr;
- *pssArg->EndpointAddr = EndpointAddr;
- } else {
- pssRes->EndpointAddr = new H4501EndpointAddr;
- *pssRes->EndpointAddr = EndpointAddr;
- }
- bret = tH4501EndpointAddr(&EndpointAddr, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4501EndpointAddr() not setn",blanks[indent]);
- }
- }
- return(bret);
- }
- //-------------------------------------
- // Method: ItemInfo
- //-------------------------------------
- boolean
- extractedSS::tItemInfo(void *pItemInfo, int derivedclass, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- //
- // Method: GetInfo
- //
- unsigned short *short_str;
- //RM short_str = new unsigned short[128];
- int length;
- PRINT_EXT("%sGetInfo()n",blanks[indent]);
- switch(derivedclass) {
- case H4502CTUPDATEARG:
- {
- H4502CTUpdateArg *pCTUpdateArg;
- pCTUpdateArg = (H4502CTUpdateArg *)pItemInfo;
- ret = pCTUpdateArg->GetInfo(short_str, length);
- break;
- }
- case H4502CTCOMPLETEARG:
- {
- H4502CTCompleteArg *pCTCompleteArg;
- pCTCompleteArg = (H4502CTCompleteArg *)pItemInfo;
- ret = pCTCompleteArg->GetInfo(short_str, length);
- break;
- }
- case H4502CTACTIVEARG:
- {
- H4502CTActiveArg *pCTActiveArg;
- pCTActiveArg = (H4502CTActiveArg *)pItemInfo;
- ret = pCTActiveArg->GetInfo(short_str, length);
- break;
- }
- default:
- PRINT_EXT("%sERROR: tItemCallId() invalid derivedclass %dn",blanks[indent],derivedclass);
- return(FALSE);
- break;
- }
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- bret = FALSE;
- } else {
- pssArg->pInfo = short_str;
- pssArg->lenInfo = length;
- PRINT_EXT("%sGetInfo() short_str = %d,%d,...n",blanks[indent],short_str[0],short_str[1]);
- PRINT_EXT("%sGetInfo() length = %dn",blanks[indent],length);
- bret = TRUE;
- }
- return(bret);
- }
- //-------------------------------------
- // Method: ItemElements
- //-------------------------------------
- boolean
- extractedSS::tItemElements(void *pItemElements, int derivedclass, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- //
- // Method: GetH225IE
- //
- H4501H225IE H225IE;
- PRINT_EXT("%sGetH225IE()n",blanks[indent]);
- switch(derivedclass){
- case H4502CTUPDATEARG:
- {
- H4502CTUpdateArg *pCTUpdateArg;
- pCTUpdateArg = (H4502CTUpdateArg *)pItemElements;
- ret = pCTUpdateArg->GetH225IE(H225IE);
- break;
- }
- case H4502CTCOMPLETEARG:
- {
- H4502CTCompleteArg *pCTCompleteArg;
- pCTCompleteArg = (H4502CTCompleteArg *)pItemElements;
- ret = pCTCompleteArg->GetH225IE(H225IE);
- break;
- }
- case H4502CTACTIVEARG:
- {
- H4502CTActiveArg *pCTActiveArg;
- pCTActiveArg = (H4502CTActiveArg *)pItemElements;
- ret = pCTActiveArg->GetH225IE(H225IE);
- break;
- }
- default:
- PRINT_EXT("%sERROR: tItemCallId() invalid derivedclass %dn",blanks[indent],derivedclass);
- return(FALSE);
- break;
- }
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- bret = FALSE;
- } else {
- pssArg->H225IE = new H4501H225IE;
- *pssArg->H225IE = H225IE;
- bret = tH4501H225IE(&H225IE, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4501H225IE() not setn",blanks[indent]);
- }
- }
- return(bret);
- }
- //-------------------------------------
- // Method: H4501FacilityExt
- //-------------------------------------
- boolean
- extractedSS::tH4501FacilityExt(H4501FacilityExt *pFacilityExt, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- H450AliasAddress AliasAddress;
- if(!(bret = pFacilityExt->Valid())) {
- return(bret);
- }
- //
- // Method: GetSrcEntity
- //
- int SrcEntity;
- PRINT_EXT("%sGetSrcEntity()n",blanks[indent]);
- ret = pFacilityExt->GetSrcEntity(SrcEntity);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetSrcEntity() SrcEntity = %dn",blanks[indent],SrcEntity);
- pssFac->SrcEntity = SrcEntity;
- pssFac->isSet = TRUE;
- }
- //
- // Method: GetSrcEntityAddr
- //
- PRINT_EXT("%sGetSrcEntityAddr()n",blanks[indent]);
- ret = pFacilityExt->GetSrcEntityAddr(AliasAddress);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- bret = tH450AliasAddress(&AliasAddress, indent+1);
- if(!bret) {
- PRINT_EXT("%stH450AliasAddress() not setn",blanks[indent]);
- } else {
- pssFac->isSet = TRUE;
- pssFac->SrcAliasAddr = new H450AliasAddress;
- *pssFac->SrcAliasAddr = AliasAddress;
- }
- }
- //
- // Method: GetDstEntity
- //
- int DstEntity;
- PRINT_EXT("%sGetDstEntity()n",blanks[indent]);
- ret = pFacilityExt->GetDstEntity(DstEntity);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetDstEntity() DstEntity = %dn",blanks[indent],DstEntity);
- pssFac->DstEntity = DstEntity;
- pssFac->isSet = TRUE;
- }
- //
- // Method: GetDstEntityAddr
- //
- PRINT_EXT("%sGetDstEntityAddr()n",blanks[indent]);
- ret = pFacilityExt->GetDstEntityAddr(AliasAddress);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- bret = tH450AliasAddress(&AliasAddress, indent+1);
- if(!bret) {
- PRINT_EXT("%stH450AliasAddress() not setn",blanks[indent]);
- } else {
- pssFac->isSet = TRUE;
- pssFac->DstAliasAddr = new H450AliasAddress;
- *pssFac->DstAliasAddr = AliasAddress;
- }
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4501Invoke
- //-------------------------------------
- boolean
- extractedSS::tH4501Invoke(H4501Invoke *pInvoke, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- if(!(bret = pInvoke->Valid())) {
- return(bret);
- }
- //
- // Method: GetInvokeId
- //
- int InvokeId;
- PRINT_EXT("%sGetInvokeId()n",blanks[indent]);
- ret = pInvoke->GetInvokeId(InvokeId);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetInvokeId() InvokeId = %dn",blanks[indent],InvokeId);
- pssROS->InvokeId = InvokeId;
- }
- //
- // Method: GetCode
- //
- H4501Code Code;
- PRINT_EXT("%sGetCode()n",blanks[indent]);
- ret = pInvoke->GetCode(Code);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssCode = &pssROS->code;
- bret = tH4501Code(&Code, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4501Code() not setn",blanks[indent]);
- }
- }
- //
- // Method: GetArgumentType
- //
- int Argtype;
- PRINT_EXT("%sGetArgumentType()n",blanks[indent]);
- ret = pInvoke->GetArgumentType(Argtype);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssROS->Arg.type = Argtype;
- //
- // Method: GetArg
- //
- H450Arg *Arg;
- PRINT_EXT("%sH450Arg::Factory()n",blanks[indent]);
- ret = H450Arg::Factory(Arg, Argtype);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetArgument() type=%dn",blanks[indent],Argtype);
- ret = pInvoke->GetArgument(*Arg);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssArg = &pssROS->Arg;
- bret = tH450Arg((void *)Arg, Argtype, indent+1);
- if(!bret) {
- PRINT_EXT("%stH450Arg() not setn",blanks[indent]);
- }
- }
- }
- }
- //
- // Method: GetLinkedId
- //
- int LinkedId;
- PRINT_EXT("%sGetLinkedId()n",blanks[indent]);
- ret = pInvoke->GetLinkedId(LinkedId);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetLinkedId() LinkedId = %dn",blanks[indent],LinkedId);
- pssROS->LinkedId = LinkedId;
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4501ReturnResult
- //-------------------------------------
- boolean
- extractedSS::tH4501ReturnResult(H4501ReturnResult *pReturnResult, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- if(!(bret = pReturnResult->Valid())) {
- return(bret);
- }
- //
- // Method: GetInvokeId
- //
- int InvokeId;
- PRINT_EXT("%sGetInvokeId()n",blanks[indent]);
- ret = pReturnResult->GetInvokeId(InvokeId);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetInvokeId() InvokeId = %dn",blanks[indent],InvokeId);
- pssROS->InvokeId = InvokeId;
- }
- //
- // Method: GetResultType
- //
- int Restype;
- PRINT_EXT("%sGetResultType()n",blanks[indent]);
- ret = pReturnResult->GetResultType(Restype);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssROS->Res.type = Restype;
- //
- // Method: GetResult
- //
- H4501Code Code;
- H450Res *Res;
- PRINT_EXT("%sH450Res::Factory()n",blanks[indent]);
- ret = H450Res::Factory(Res, Restype);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetResult() type=%dn",blanks[indent],Restype);
- ret = pReturnResult->GetResult(Code, *Res);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssCode = &pssROS->code;
- bret = tH4501Code(&Code, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4501Code() not setn",blanks[indent]);
- }
- pssRes = &pssROS->Res;
- bret = tH450Res((void *)Res, Restype, indent+1);
- if(!bret) {
- PRINT_EXT("%stH450Res() not setn",blanks[indent]);
- }
- }
- }
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4501ReturnError
- //-------------------------------------
- boolean
- extractedSS::tH4501ReturnError(H4501ReturnError *pReturnError, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- if(!(bret = pReturnError->Valid())) {
- return(bret);
- }
- //
- // Method: GetInvokeId
- //
- int InvokeId;
- PRINT_EXT("%sGetInvokeId()n",blanks[indent]);
- ret = pReturnError->GetInvokeId(InvokeId);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetInvokeId() InvokeId = %dn",blanks[indent],InvokeId);
- pssROS->InvokeId = InvokeId;
- }
- //
- // Method: GetCode
- //
- H4501Code Code;
- PRINT_EXT("%sGetCode()n",blanks[indent]);
- ret = pReturnError->GetCode(Code);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssCode = &pssROS->code;
- bret = tH4501Code(&Code, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4501Code() not setn",blanks[indent]);
- }
- }
- //
- // Method: GetError
- //
- H450Error Error;
- PRINT_EXT("%sGetError()n",blanks[indent]);
- ret = pReturnError->GetError(Error);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssError = &pssROS->error;
- bret = tH450Error(&Error, indent+1);
- if(!bret) {
- PRINT_EXT("%stH450Error() not setn",blanks[indent]);
- }
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4501Reject
- //-------------------------------------
- boolean
- extractedSS::tH4501Reject(H4501Reject *pReject, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- if(!(bret = pReject->Valid())) {
- return(bret);
- }
- //
- // Method: GetInvokeId
- //
- int InvokeId;
- PRINT_EXT("%sGetInvokeId()n",blanks[indent]);
- ret = pReject->GetInvokeId(InvokeId);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetInvokeId() InvokeId = %dn",blanks[indent],InvokeId);
- pssROS->InvokeId = InvokeId;
- }
- //
- // Method: GetProblem
- //
- H4501Problem Problem;
- PRINT_EXT("%sGetProblem()n",blanks[indent]);
- ret = pReject->GetProblem(Problem);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssProblem = &pssROS->Problem;
- bret = tH4501Problem(&Problem, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4501Problem() not setn",blanks[indent]);
- }
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H450Arg
- //-------------------------------------
- boolean
- extractedSS::tH450Arg(void *pArg, int type, int indent)
- {
- boolean bret;
- switch(type) {
- case ARGT_INVALID:
- PRINT_EXT("%sERROR: Arg() type is ARGT_INVALIDn",blanks[indent]);
- break;
- case ARGT_DUMMY:
- H4502DummyArg *pDummyArg;
- pDummyArg = (H4502DummyArg *)pArg;
- PRINT_EXT("%stH4502DummyArg()n",blanks[indent]);
- bret = tH4502DummyArg(pDummyArg, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4502DummyArg() not setn",blanks[indent]);
- }
- delete pDummyArg;
- break;
- case ARGT_INITIATE:
- H4502CTInitiateArg *pCTInitiateArg;
- pCTInitiateArg = (H4502CTInitiateArg *)pArg;
- PRINT_EXT("%stH4502CTInitiateArg()n",blanks[indent]);
- bret = tH4502CTInitiateArg(pCTInitiateArg, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4502CTInitiateArg() not setn",blanks[indent]);
- }
- delete pCTInitiateArg;
- break;
- case ARGT_SETUP:
- H4502CTSetupArg *pCTSetupArg;
- pCTSetupArg = (H4502CTSetupArg *)pArg;
- PRINT_EXT("%stH4502CTSetupArg()n",blanks[indent]);
- bret = tH4502CTSetupArg(pCTSetupArg, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4502CTSetupArg() not setn",blanks[indent]);
- }
- delete pCTSetupArg;
- break;
- case ARGT_UPDATE:
- H4502CTUpdateArg *pCTUpdateArg;
- pCTUpdateArg = (H4502CTUpdateArg *)pArg;
- PRINT_EXT("%stH4502CTUpdateArg()n",blanks[indent]);
- bret = tH4502CTUpdateArg(pCTUpdateArg, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4502CTUpdateArg() not setn",blanks[indent]);
- }
- delete pCTUpdateArg;
- break;
- case ARGT_SUBADDRESS:
- H4502CTSubaddressArg *pCTSubaddressArg;
- pCTSubaddressArg = (H4502CTSubaddressArg *)pArg;
- PRINT_EXT("%stH4502CTSubaddressArg()n",blanks[indent]);
- bret = tH4502CTSubaddressArg(pCTSubaddressArg, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4502CTSubaddressArg() not setn",blanks[indent]);
- }
- delete pCTSubaddressArg;
- break;
- case ARGT_COMPLETE:
- H4502CTCompleteArg *pCTCompleteArg;
- pCTCompleteArg = (H4502CTCompleteArg *)pArg;
- PRINT_EXT("%stH4502CTCompleteArg()n",blanks[indent]);
- bret = tH4502CTCompleteArg(pCTCompleteArg, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4502CTCompleteArg() not setn",blanks[indent]);
- }
- delete pCTCompleteArg;
- break;
- case ARGT_ACTIVE:
- H4502CTActiveArg *pCTActiveArg;
- pCTActiveArg = (H4502CTActiveArg *)pArg;
- PRINT_EXT("%stH4502CTActiveArg()n",blanks[indent]);
- bret = tH4502CTActiveArg(pCTActiveArg, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4502CTActiveArg() not setn",blanks[indent]);
- }
- delete pCTActiveArg;
- break;
- default:
- PRINT_EXT("%sERROR: Arg() type is not defined %dn",blanks[indent],type);
- break;
- }
- return(bret);
- }
- //-------------------------------------
- // Method: H450Res
- //-------------------------------------
- boolean
- extractedSS::tH450Res(void *pRes, int restype, int indent)
- {
- boolean bret;
- switch(restype) {
- case REST_INVALID:
- PRINT_EXT("%sERROR: Arg() type is REST_INVALIDn",blanks[indent]);
- break;
- case REST_DUMMY:
- H4502DummyRes *pDummyRes;
- pDummyRes = (H4502DummyRes *)pRes;
- PRINT_EXT("%stH4502DummyRes()n",blanks[indent]);
- bret = tH4502DummyRes(pDummyRes, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4502DummyRes() not setn",blanks[indent]);
- }
- delete pDummyRes;
- break;
- case REST_IDENTIFY:
- H4502CTIdentifyRes *pCTIdentifyRes;
- pCTIdentifyRes = (H4502CTIdentifyRes *)pRes;
- PRINT_EXT("%stH4502CTIdentifyRes()n",blanks[indent]);
- bret = tH4502CTIdentifyRes(pCTIdentifyRes, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4502CTIdentifyRes() not setn",blanks[indent]);
- }
- delete pCTIdentifyRes;
- break;
- default:
- PRINT_EXT("%sERROR: Res() type is not defined %dn",blanks[indent],restype);
- break;
- }
- return(bret);
- }
- //-------------------------------------
- // Method: H4502DummyRes
- //-------------------------------------
- boolean
- extractedSS::tH4502DummyRes(H4502DummyRes *pDummyRes, int indent)
- {
- boolean bret;
- if(!(bret = pDummyRes->Valid())) {
- return(bret);
- }
- bret = tItemExt((void *)pDummyRes, H4502DUMMYRES, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemExt() not setn",blanks[indent]);
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4502CTIdentifyRes
- //-------------------------------------
- boolean
- extractedSS::tH4502CTIdentifyRes(H4502CTIdentifyRes *pCTIdentifyRes, int indent)
- {
- boolean bret;
- if(!(bret = pCTIdentifyRes->Valid())) {
- return(bret);
- }
- bret = tItemExt((void *)pCTIdentifyRes, H4502CTIDENTIFYRES, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemExt() not setn",blanks[indent]);
- }
- bret = tItemNumber((void *)pCTIdentifyRes, H4502CTIDENTIFYRES, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemNumber() not setn",blanks[indent]);
- }
- bret = tItemCallId((void *)pCTIdentifyRes, H4502CTIDENTIFYRES, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemCallId() not setn",blanks[indent]);
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4502DummyArg
- //-------------------------------------
- boolean
- extractedSS::tH4502DummyArg(H4502DummyArg *pDummyArg, int indent)
- {
- boolean bret;
- if(!(bret = pDummyArg->Valid())) {
- return(bret);
- }
- bret = tItemExt((void *)pDummyArg, H4502DUMMYARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemExt() not setn",blanks[indent]);
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4502CTInitiateArg
- //-------------------------------------
- boolean
- extractedSS::tH4502CTInitiateArg(H4502CTInitiateArg *pCTInitiateArg, int indent)
- {
- boolean bret;
- if(!(bret = pCTInitiateArg->Valid())) {
- return(bret);
- }
- bret = tItemExt((void *)pCTInitiateArg, H4502CTINITIATEARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemExt() not setn",blanks[indent]);
- }
- bret = tItemNumber((void *)pCTInitiateArg, H4502CTINITIATEARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemNumber() not setn",blanks[indent]);
- }
- bret = tItemCallId((void *)pCTInitiateArg, H4502CTINITIATEARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemCallId() not setn",blanks[indent]);
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4502CTSetupArg
- //-------------------------------------
- boolean
- extractedSS::tH4502CTSetupArg(H4502CTSetupArg *pCTSetupArg, int indent)
- {
- boolean bret;
- if(!(bret = pCTSetupArg->Valid())) {
- return(bret);
- }
- bret = tItemExt((void *)pCTSetupArg, H4502CTSETUPARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemExt() not setn",blanks[indent]);
- }
- bret = tItemNumber((void *)pCTSetupArg, H4502CTSETUPARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemNumber() not setn",blanks[indent]);
- }
- bret = tItemCallId((void *)pCTSetupArg, H4502CTSETUPARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemCallId() not setn",blanks[indent]);
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4502CTUpdateArg
- //-------------------------------------
- boolean
- extractedSS::tH4502CTUpdateArg(H4502CTUpdateArg *pCTUpdateArg, int indent)
- {
- boolean bret;
- if(!(bret = pCTUpdateArg->Valid())) {
- return(bret);
- }
- bret = tItemExt((void *)pCTUpdateArg, H4502CTUPDATEARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemExt() not setn",blanks[indent]);
- }
- bret = tItemNumber((void *)pCTUpdateArg, H4502CTUPDATEARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemNumber() not setn",blanks[indent]);
- }
- bret = tItemInfo((void *)pCTUpdateArg, H4502CTUPDATEARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemInfo() not setn",blanks[indent]);
- }
- bret = tItemElements((void *)pCTUpdateArg, H4502CTUPDATEARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemElements not setn",blanks[indent]);
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4502CTSubaddressArg
- //-------------------------------------
- boolean
- extractedSS::tH4502CTSubaddressArg(H4502CTSubaddressArg *pCTSubaddressArg, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- if(!(bret = pCTSubaddressArg->Valid())) {
- return(bret);
- }
- //
- // Method: GetRedirection
- //
- H4501PartySubaddress PartySubaddress;
- PRINT_EXT("%sGetRedirection()n",blanks[indent]);
- ret = pCTSubaddressArg->GetRedirection(PartySubaddress);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssArg->PartySubaddress = new H4501PartySubaddress;
- *pssArg->PartySubaddress = PartySubaddress;
- bret = tH4501PartySubaddress(&PartySubaddress, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4501PartySubaddress() not setn",blanks[indent]);
- }
- }
- bret = tItemExt((void *)pCTSubaddressArg, H4502CTSUBADDRESSARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemExt() not setn",blanks[indent]);
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4502CTCompleteArg
- //-------------------------------------
- boolean
- extractedSS::tH4502CTCompleteArg(H4502CTCompleteArg *pCTCompleteArg, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- if(!(bret = pCTCompleteArg->Valid())) {
- return(bret);
- }
- //
- // Method: GetEndType
- //
- int EndType;
- PRINT_EXT("%sGetEndType()n",blanks[indent]);
- ret = pCTCompleteArg->GetEndType(EndType);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssArg->EndType = EndType;
- PRINT_EXT("%sGetEndType() EndType = %dn",blanks[indent],EndType);
- }
- //
- // Method: GetCallStatus
- //
- int CallStatus;
- PRINT_EXT("%sGetCallStatus()n",blanks[indent]);
- ret = pCTCompleteArg->GetCallStatus(CallStatus);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssArg->CallStatus = CallStatus;
- PRINT_EXT("%sGetCallStatus() CallStatus = %dn",blanks[indent],CallStatus);
- }
- bret = tItemExt((void *)pCTCompleteArg, H4502CTCOMPLETEARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemExt() not setn",blanks[indent]);
- }
- bret = tItemNumber((void *)pCTCompleteArg, H4502CTCOMPLETEARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemNumber() not setn",blanks[indent]);
- }
- bret = tItemInfo((void *)pCTCompleteArg, H4502CTCOMPLETEARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemInfo() not setn",blanks[indent]);
- }
- bret = tItemElements((void *)pCTCompleteArg, H4502CTCOMPLETEARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemElements not setn",blanks[indent]);
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4502CTActiveArg
- //-------------------------------------
- boolean
- extractedSS::tH4502CTActiveArg(H4502CTActiveArg *pCTActiveArg, int indent)
- {
- boolean bret;
- if(!(bret = pCTActiveArg->Valid())) {
- return(bret);
- }
- bret = tItemExt((void *)pCTActiveArg, H4502CTACTIVEARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemExt() not setn",blanks[indent]);
- }
- bret = tItemNumber((void *)pCTActiveArg, H4502CTACTIVEARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemNumber() not setn",blanks[indent]);
- }
- bret = tItemInfo((void *)pCTActiveArg, H4502CTACTIVEARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemInfo() not setn",blanks[indent]);
- }
- bret = tItemElements((void *)pCTActiveArg, H4502CTACTIVEARG, indent+1);
- if(!bret) {
- PRINT_EXT("%stItemElements not setn",blanks[indent]);
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4501Extension
- //-------------------------------------
- boolean
- extractedSS::tH4501Extension(H4501Extension *pExtension, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- if(!(bret = pExtension->Valid())) {
- return(bret);
- }
- //
- // Method: GetObjectID
- //
- unsigned long *long_str;
- int length;
- //RM long_str = new unsigned long[length];
- PRINT_EXT("%sGetObjectID()n",blanks[indent]);
- ret = pExtension->GetObjectID(long_str, length);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetObjectID() long_str = %d,%d,...n",blanks[indent],long_str[0],long_str[1]);
- PRINT_EXT("%sGetObjectID() length = %dn",blanks[indent],length);
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4501Code
- //-------------------------------------
- boolean
- extractedSS::tH4501Code(H4501Code *pCode, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- int type;
- int length;
- if(!(bret = pCode->Valid())) {
- return(bret);
- }
- //
- // Method: GetType
- //
- PRINT_EXT("%sGetType()n",blanks[indent]);
- type = pCode->GetType();
- if(type == CDT_LOCAL_CODE) {
- //
- // Method: GetLocalCode
- //
- int LocalCode;
- PRINT_EXT("%sGetLocalCode()n",blanks[indent]);
- ret = pCode->GetLocalCode(LocalCode);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetLocalCode() LocalCode = %dn",blanks[indent],LocalCode);
- *pssCode = LocalCode;
- }
- } else if(type == CDT_GLOBAL_CODE) {
- //
- // Method: GetGlobalCode
- //
- unsigned long *long_str;
- //RM long_str = new unsigned long[length];
- PRINT_EXT("%sGetGlobalCode()n",blanks[indent]);
- ret = pCode->GetGlobalCode(long_str, length);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetGlobalCode() long_str = %d,%d,...n",blanks[indent],long_str[0],long_str[1]);
- PRINT_EXT("%sGetGlobalCode() length = %dn",blanks[indent],length);
- }
- } else if(type == CDT_INVALID) {
- PRINT_EXT("%sERROR: tH4501Code() type is CDT_INVALIDn",blanks[indent]);
- } else {
- PRINT_EXT("%sERROR: tH4501Code() type is not defined %dn",blanks[indent],type);
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H450ErrorParameter
- //-------------------------------------
- boolean
- extractedSS::tH450ErrorParameter(void *pErrorParameter, int paramtype, int indent)
- {
- boolean bret;
- if(paramtype == ERRPT_CT_UNSPECIFIED) {
- H4502UnspecifiedParam *pUnspecifiedParam;
- pUnspecifiedParam = (H4502UnspecifiedParam *)pErrorParameter;
- bret = tH4502UnspecifiedParam(pUnspecifiedParam, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4502UnspecifiedParam() not setn",blanks[indent]);
- }
- } else if(paramtype == CDT_INVALID) {
- PRINT_EXT("%sERROR: tH450ErrorParameter() type is ERRPT_INVALIDn",blanks[indent]);
- } else {
- PRINT_EXT("%sERROR: tH450ErrorParameter() type is not defined %dn",blanks[indent],paramtype);
- }
- return(bret);
- }
- //-------------------------------------
- // Method: H4502UnspecifiedParam
- //-------------------------------------
- boolean
- extractedSS::tH4502UnspecifiedParam(H4502UnspecifiedParam *pUnspecifiedParam, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- int type;
- if(!(bret = pUnspecifiedParam->Valid())) {
- return(bret);
- }
- //
- // Method: GetType
- //
- PRINT_EXT("%sGetType()n",blanks[indent]);
- type = pUnspecifiedParam->GetType();
- if(type == UNPT_EXTENSION) {
- //
- // Method: GetExtension
- //
- H4501Extension Extension;
- PRINT_EXT("%sGetExtension()n",blanks[indent]);
- ret = pUnspecifiedParam->GetExtension(Extension);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- bret = tH4501Extension(&Extension, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4501Extension() not setn",blanks[indent]);
- }
- }
- } else if(type == UNPT_NON_STANDARD_DATA) {
- //
- // Method: GetNonStd
- //
- H450NonStdParam NonStdParam;
- PRINT_EXT("%sGetNonStdData()n",blanks[indent]);
- ret = pUnspecifiedParam->GetNonStdData(NonStdParam);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- bret = tH450NonStdParam(&NonStdParam, indent+1);
- if(!bret) {
- PRINT_EXT("%stH450NonStdParam() not setn",blanks[indent]);
- }
- }
- } else if(type == UNPT_INVALID) {
- PRINT_EXT("%sERROR: tH4502UnspecifiedParam() type is UNPT_INVALIDn",blanks[indent]);
- } else {
- PRINT_EXT("%sERROR: tH4502UnspecifiedParam() type is not defined %dn",blanks[indent],type);
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H450Error
- //-------------------------------------
- boolean
- extractedSS::tH450Error(H450Error *pError, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- int type;
- if(!(bret = pError->Valid())) {
- return(bret);
- }
- //
- // Method: GetType
- //
- PRINT_EXT("%sGetType()n",blanks[indent]);
- type = pError->GetType();
- if(type == ERRT_UNPARAMETERIZED) {
- //
- // Method: GetH450Error
- //
- int Error;
- PRINT_EXT("%sGetH450Error()n",blanks[indent]);
- ret = pError->GetH450Error(Error);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetH450Error() Error = %dn",blanks[indent],Error);
- pssError->type = ERRT_UNPARAMETERIZED;
- pssError->error = Error;
- }
- } else if(type == ERRT_PARAMETERIZED) {
- //
- // Method: GetParameterType
- //
- int Paramtype;
- PRINT_EXT("%sGetParameterType()n",blanks[indent]);
- ret = pError->GetParameterType(Paramtype);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- }
- //
- // Method: GetParameter
- //
- H450ErrorParameter *ErrorParameter;
- PRINT_EXT("%sH450ErrorParameter::Factory()n",blanks[indent]);
- ret = H450ErrorParameter::Factory(ErrorParameter, Paramtype);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- }
- PRINT_EXT("%sGetParameter()n",blanks[indent]);
- ret = pError->GetParameter(*ErrorParameter);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- bret = tH450ErrorParameter((void *)ErrorParameter, Paramtype, indent+1);
- if(!bret) {
- PRINT_EXT("%stH450ErrorParameter() not setn",blanks[indent]);
- }
- }
- } else if(type == ERRT_INVALID) {
- PRINT_EXT("%sERROR: tH450Error() type is ERRT_INVALIDn",blanks[indent]);
- } else {
- PRINT_EXT("%sERROR: tH450Error() type is not defined %dn",blanks[indent],type);
- }
- //
- // Method: GetCode
- //
- H4501Code Code;
- PRINT_EXT("%sGetCode()n",blanks[indent]);
- ret = pError->GetCode(Code);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- pssCode = &pssError->code;
- bret = tH4501Code(&Code, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4501Code() not setn",blanks[indent]);
- }
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4501Problem
- //-------------------------------------
- boolean
- extractedSS::tH4501Problem(H4501Problem *pProblem, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- int type;
- if(!(bret = pProblem->Valid())) {
- return(bret);
- }
- //
- // Method: GetType
- //
- PRINT_EXT("%sGetType()n",blanks[indent]);
- type = pProblem->GetType();
- pssProblem->type = type;
- if(type == PROB_GENERAL_PROBLEM) {
- //
- // Method: GetGeneralProb
- //
- int GeneralProb;
- PRINT_EXT("%sGetGeneralProb()n",blanks[indent]);
- ret = pProblem->GetGeneralProb(GeneralProb);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetGeneralProb() GeneralProb = %dn",blanks[indent],GeneralProb);
- pssProblem->Problem = GeneralProb;
- }
- } else if(type == PROB_INVOKE_PROBLEM) {
- //
- // Method: GetInvokeProb
- //
- int InvokeProb;
- PRINT_EXT("%sGetInvokeProb()n",blanks[indent]);
- ret = pProblem->GetInvokeProb(InvokeProb);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetInvokeProb() InvokeProb = %dn",blanks[indent],InvokeProb);
- pssProblem->Problem = InvokeProb;
- }
- } else if(type == PROB_RETURN_RESULT_PROBLEM) {
- //
- // Method: GetResultProb
- //
- int ResultProb;
- PRINT_EXT("%sGetResultProb()n",blanks[indent]);
- ret = pProblem->GetResultProb(ResultProb);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetResultProb() ResultProb = %dn",blanks[indent],ResultProb);
- pssProblem->Problem = ResultProb;
- }
- } else if(type == PROB_RETURN_ERROR_PROBLEM) {
- //
- // Method: GetErrorProb
- //
- int ErrorProb;
- PRINT_EXT("%sGetErrorProb()n",blanks[indent]);
- ret = pProblem->GetErrorProb(ErrorProb);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetErrorProb() ErrorProb = %dn",blanks[indent],ErrorProb);
- pssProblem->Problem = ErrorProb;
- }
- } else if(type == PROB_REJECT_PROBLEM) {
- PRINT_EXT("%sERROR: tH4501Problem() type is PROB_REJECT_PROBLEMn",blanks[indent]);
- } else if(type == PROB_INVALID) {
- PRINT_EXT("%sERROR: tH4501Problem() type is PROB_INVALIDn",blanks[indent]);
- } else {
- PRINT_EXT("%sERROR: tH4501Problem() type is not defined %dn",blanks[indent],type);
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4501H225IE
- //-------------------------------------
- boolean
- extractedSS::tH4501H225IE(H4501H225IE *pH225IE, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- if(!(bret = pH225IE->Valid())) {
- return(bret);
- }
- //
- // Method: GetH225IE
- //
- unsigned char *char_str;
- int length;
- //RM char_str = new unsigned char[length];
- PRINT_EXT("%sGetH225IE(char_str)n",blanks[indent]);
- ret = pH225IE->GetH225IE(char_str, length);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- char retstr[MAXOUTSTR];
- PRINT_EXT("%sGetH225IE() char_str = %sn",blanks[indent],
- sprint_string(char_str, MAXSTRLEN(length), retstr));
- PRINT_EXT("%sGetH225IE() length = %dn",blanks[indent],length);
- }
- //
- // Method: GetH225IE<2>
- //
- Q931IE Q931IE_arg;
- PRINT_EXT("%sGetH225IE(Q931IE)n",blanks[indent]);
- ret = pH225IE->GetH225IE(Q931IE_arg);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetH225IE() Q931IE_arg = 0x%xn",blanks[indent],&Q931IE_arg);
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4501UserSubaddress
- //-------------------------------------
- boolean
- extractedSS::tH4501UserSubaddress(H4501UserSubaddress *pUserSubaddress, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- if(!(bret = pUserSubaddress->Valid())) {
- return(bret);
- }
- //
- // Method: GetSubaddrInfo
- //
- unsigned char *char_str;
- //RM char_str = new unsigned char[20];
- int length;
- PRINT_EXT("%sGetSubaddrInfo()n",blanks[indent]);
- ret = pUserSubaddress->GetSubaddrInfo(char_str, length);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- char retstr[MAXOUTSTR];
- PRINT_EXT("%sGetSubaddrInfo() char_str = %sn",blanks[indent],
- sprint_string((unsigned char *)char_str, MAXSTRLEN(length), retstr));
- PRINT_EXT("%sGetSubaddrInfo() length = %dn",blanks[indent],length);
- }
- //
- // Method: GetIndicator
- //
- boolean boolean_arg1;
- PRINT_EXT("%sGetIndicator()n",blanks[indent]);
- ret = pUserSubaddress->GetIndicator(boolean_arg1);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetIndicator() boolean_arg1 = %dn",blanks[indent],boolean_arg1);
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4501PartySubaddress
- //-------------------------------------
- boolean
- extractedSS::tH4501PartySubaddress(H4501PartySubaddress *pPartySubaddress, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- int type;
- if(!(bret = pPartySubaddress->Valid())) {
- return(bret);
- }
- //
- // Method: GetType
- //
- PRINT_EXT("%sGetType()n",blanks[indent]);
- type = pPartySubaddress->GetType();
- if(type == PSAT_USER_SPECIFIED) {
- //
- // Method: GetUserSpecified
- //
- H4501UserSubaddress UserSubaddress;
- PRINT_EXT("%sGetUserSpecified()n",blanks[indent]);
- ret = pPartySubaddress->GetUserSpecified(UserSubaddress);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- bret = tH4501UserSubaddress(&UserSubaddress, indent+1);
- if(!bret) {
- PRINT_EXT("%stH4501UserSubaddress() not setn",blanks[indent]);
- }
- }
- } else if(type == PSAT_NSAP_ADDRESS) {
- //
- // Method: GetNSAP
- //
- unsigned char *char_str;
- //RM char_str = new unsigned char[20];
- int length;
- PRINT_EXT("%sGetNSAP()n",blanks[indent]);
- ret = pPartySubaddress->GetNSAP(char_str, length);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- char retstr[MAXOUTSTR];
- PRINT_EXT("%sGetNSAP() char_str = %sn",blanks[indent],
- sprint_string((unsigned char *)char_str, MAXSTRLEN(length), retstr));
- PRINT_EXT("%sGetNSAP() length = %dn",blanks[indent],length);
- }
- } else if(type == PSAT_INVALID) {
- PRINT_EXT("%sGetNSAP() type is PSAT_INVALIDn",blanks[indent]);
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H4501EndpointAddr
- //-------------------------------------
- boolean
- extractedSS::tH4501EndpointAddr(H4501EndpointAddr *pEndpointAddr, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- int i;
- if(!(bret = pEndpointAddr->Valid())) {
- return(bret);
- }
- //
- // Method: GetNumDestAddrs
- //
- int count;
- PRINT_EXT("%sGetNumDestAddrs()n",blanks[indent]);
- ret = pEndpointAddr->GetNumDestAddrs(count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetNumDestAddrs() count = %dn",blanks[indent],count);
- }
- //
- // Method: GetDestAddrs
- //
- H450AliasAddress *AliasAddressList;
- AliasAddressList = new H450AliasAddress[count];
- PRINT_EXT("%sGetDestAddrs()n",blanks[indent]);
- ret = pEndpointAddr->GetDestAddrs(AliasAddressList, count);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- for(i = 0; i < count; i++) {
- bret = tH450AliasAddress(&AliasAddressList[i], indent+1);
- if(!bret) {
- PRINT_EXT("%stH450AliasAddress() AliasAddressList[%d] not setn",blanks[indent],i);
- }
- }
- PRINT_EXT("%sGetDestAddrs() count = %dn",blanks[indent],count);
- }
- delete [] AliasAddressList;
- //
- // Method: GetRemoteExtAddr
- //
- H450AliasAddress AliasAddress;
- PRINT_EXT("%sGetRemoteExtAddr()n",blanks[indent]);
- ret = pEndpointAddr->GetRemoteExtAddr(AliasAddress);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- bret = tH450AliasAddress(&AliasAddress, indent+1);
- if(!bret) {
- PRINT_EXT("%stH450AliasAddress() not setn",blanks[indent]);
- }
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H450NonStdParam
- //-------------------------------------
- boolean
- extractedSS::tH450NonStdParam(H450NonStdParam *pNonStdParam, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- int type;
- int length;
- if(!(bret = pNonStdParam->Valid())) {
- return(bret);
- }
- //
- // Method: GetIDType
- //
- PRINT_EXT("%sGetIDType()n",blanks[indent]);
- type = pNonStdParam->GetIDType();
- if(type == H225NS_IDT_H221NS) {
- //
- // Method: GetH221NonStd
- //
- unsigned short t35_cc;
- unsigned short t35_ext;
- unsigned short m_code;
- PRINT_EXT("%sGetH221NonStd()n",blanks[indent]);
- ret = pNonStdParam->GetH221NonStd(t35_cc, t35_ext, m_code);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetH221NonStd() t35_cc = %dn",blanks[indent],t35_cc);
- PRINT_EXT("%sGetH221NonStd() t35_ext = %dn",blanks[indent],t35_ext);
- PRINT_EXT("%sGetH221NonStd() m_code = %dn",blanks[indent],m_code);
- }
- } else if(type == H225NS_IDT_OBJECT) {
- //
- // Method: GetObjectIdentifier
- //
- unsigned long *long_str;
- //RM long_str = new unsigned long[MAXBUF];
- PRINT_EXT("%sGetObjectIdentifier()n",blanks[indent]);
- ret = pNonStdParam->GetObjectIdentifier(long_str, length);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetObjectIdentifier() long_str = %d,%d,...n",blanks[indent],long_str[0],long_str[1]);
- PRINT_EXT("%sGetObjectIdentifier() length = %dn",blanks[indent],length);
- }
- } else if(type == H225NS_IDT_INVALID) {
- PRINT_EXT("%sERROR: tH450NonStdParam() type is H225NS_IDT_INVALIDn",blanks[indent]);
- }
- //
- // Method: GetNonStdData
- //
- unsigned char *char_str;
- //RM char_str = new unsigned char[MAXBUF];
- PRINT_EXT("%sGetNonStdData()n",blanks[indent]);
- ret = pNonStdParam->GetNonStdData(char_str, length);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- char retstr[MAXOUTSTR];
- PRINT_EXT("%sGetNonStdData() char_str = %sn",blanks[indent],
- sprint_string((unsigned char *)char_str, MAXSTRLEN(length), retstr));
- PRINT_EXT("%sGetNonStdData() length = %dn",blanks[indent],length);
- }
- return(TRUE);
- }
- //-------------------------------------
- // Method: H450AliasAddress
- //-------------------------------------
- boolean
- extractedSS::tH450AliasAddress(H450AliasAddress *pAliasAddress, int indent)
- {
- ProtReturnCode ret;
- boolean bret;
- int type;
- char *char_str;
- //RM char_str = new char[MAXBUF];
- int len;
- if(!(bret = pAliasAddress->Valid())) {
- return(bret);
- }
- //
- // Method: GetType
- //
- PRINT_EXT("%sGetType()n",blanks[indent]);
- type = pAliasAddress->GetType();
- switch(type) {
- case AAT_INVALID:
- PRINT_EXT("%sERROR: tH450AliasAddress() type is AAT_INVALIDn",blanks[indent]);
- break;
- case AAT_E164:
- //
- // Method: GetE164
- //
- PRINT_EXT("%sGetE164()n",blanks[indent]);
- ret = pAliasAddress->GetE164(char_str, len);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- char retstr[MAXOUTSTR];
- PRINT_EXT("%sGetE164() char_str = %sn",blanks[indent],
- sprint_string((unsigned char *)char_str, MAXSTRLEN(len), retstr));
- PRINT_EXT("%sGetE164() len = %dn",blanks[indent],len);
- }
- break;
- case AAT_H323_ID:
- //
- // Method: GetH323ID
- //
- unsigned short *short_str;
- //RM short_str = new unsigned short[MAXBUF];
- PRINT_EXT("%sGetH323ID()n",blanks[indent]);
- ret = pAliasAddress->GetH323ID(short_str, len);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- PRINT_EXT("%sGetH323ID() short_str = %d,%d,...n",blanks[indent],short_str[0],short_str[1]);
- PRINT_EXT("%sGetH323ID() len = %dn",blanks[indent],len);
- }
- break;
- case AAT_URL_ID:
- //
- // Method: GetURLID
- //
- PRINT_EXT("%sGetURLID()n",blanks[indent]);
- ret = pAliasAddress->GetURLID(char_str, len);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- char retstr[MAXOUTSTR];
- PRINT_EXT("%sGetURLID() char_str = %sn",blanks[indent],
- sprint_string((unsigned char *)char_str, MAXSTRLEN(len), retstr));
- PRINT_EXT("%sGetURLID() len = %dn",blanks[indent],len);
- }
- break;
- case AAT_TRANSPORT_ID:
- //
- // Method: GetTransportID
- //
- sockaddr sockaddr_arg1;
- PRINT_EXT("%sGetTransportID()n",blanks[indent]);
- ret = pAliasAddress->GetTransportID(&sockaddr_arg1);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- char sockstr[25];
- PRINT_EXT("%sGetTransportID() sockaddr_arg1 = %sn",blanks[indent],sprint_sockaddr(&sockaddr_arg1,sockstr));
- }
- break;
- case AAT_EMAIL_ID:
- //
- // Method: GetEMailID
- //
- PRINT_EXT("%sGetEMailID()n",blanks[indent]);
- ret = pAliasAddress->GetEMailID(char_str, len);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%s%sn",blanks[indent],printError(ret,emsg));
- } else {
- char retstr[MAXOUTSTR];
- PRINT_EXT("%sGetEMailID() char_str = %sn",blanks[indent],
- sprint_string((unsigned char *)char_str, MAXSTRLEN(len), retstr));
- PRINT_EXT("%sGetEMailID() len = %dn",blanks[indent],len);
- }
- break;
- case AAT_PARTY_NUMBER:
- PRINT_EXT("%sERROR: tH450AliasAddress() type is AAT_PARTY_NUMBERn",blanks[indent]);
- break;
- default:
- PRINT_EXT("%sERROR: tH450AliasAddress() type is not defined %dn",blanks[indent],type);
- break;
- }
- return(TRUE);
- }
- char *
- sprint_sockaddr(sockaddr *addr, char *str)
- {
- struct sockaddr_in *sa;
- sa = (struct sockaddr_in *)addr;
- sprintf(str,"%s:%d", inet_ntoa(sa->sin_addr), ntohs(sa->sin_port));
- return(str);
- }
- char hextbl[16] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
- char *
- sprint_string(unsigned char *ustr, int len, char *retstr)
- {
- int i, ch;
- char *optr;
- optr = retstr;
- for(i = 0; i < len; i++) {
- ch = (int)ustr[i];
- if(isprint(ch)) {
- *optr++ = (char)ch;
- } else {
- *optr++ = '\';
- *optr++ = hextbl[ch / 16];
- *optr++ = hextbl[ch % 16];
- }
- }
- *optr++ = ' ';
- return(retstr);
- }
- char *ROSTypes_name[] = { "ROS_INVALID", "ROS_INVOKE", "ROS_RETURN_RESULT",
- "ROS_RETURN_ERROR", "ROS_REJECT" };
- char *OpType_name[] = { "CTOT_INVALID", "CTOT_ILLEGAL1", "CTOT_ILLEGAL2",
- "CTOT_ILLEGAL3", "CTOT_ILLEGAL4", "CTOT_ILLEGAL5",
- "CTOT_ILLEGAL6", "CTOT_IDENTIFY", "CTOT_ABANDON",
- "CTOT_INITIATE", "CTOT_SETUP", "CTOT_ACTIVE",
- "CTOT_COMPLETE", "CTOT_UPDATE", "CTOT_TRANSFER" };
- void
- test_extractedSS(extractedSS *extSS, int count)
- {
- ProtReturnCode ret;
- int i, j;
- struct extractedROS *pRos;
- PRINT_EXT("++++++++++ test_extractedSS() ++++++++++++++n");
- for(i = 0; i < count; i++) {
- PRINT_EXT("extractedSS[%d] ",i);
- PRINT_EXT(" InterpAPDU=%d ",extSS[i].ssInterpAPDU);
- PRINT_EXT(" ssNumROSs=%d ",extSS[i].ssNumROSs);
- PRINT_EXT("---------------n");
- for(j = 0; j < extSS[i].ssNumROSs; j++) {
- pRos = &extSS[i].ssROS[j];
- PRINT_EXT("Received %s ",ROSTypes_name[pRos->type]);
- if(pRos->type == ROS_INVALID) {
- PRINT_EXT("n");
- continue;
- }
- if(pRos->type != ROS_REJECT) {
- PRINT_EXT("%s ",OpType_name[pRos->code]);
- }
- PRINT_EXT(": InvokeID=%dn",pRos->InvokeId);
- switch(pRos->code) {
- case CTOT_IDENTIFY: //
- {
- break;
- }
- case CTOT_ABANDON:
- {
- break;
- }
- case CTOT_INITIATE: // Arg
- {
- if(pRos->type == ROS_RETURN_RESULT) {
- PRINT_EXT(" ctirr CallID="%s"n",pRos->Res.CallID);
- break;
- }
- PRINT_EXT(" ctii CallID="%s"n",pRos->Arg.CallID);
- H4501EndpointAddr *ep = pRos->Arg.EndpointAddr;
- H450AliasAddress *pAA;
- int destCount;
- int len;
- int type;
- ret = ep->GetNumDestAddrs(destCount);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%sn",printError(ret,emsg));
- }
- if(destCount == 0) {
- break;
- }
- pAA = new H450AliasAddress[destCount];
- ret = ep->GetDestAddrs(pAA, destCount);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%sn",printError(ret,emsg));
- }
- for(int ia = 0; ia < destCount; ia++) {
- type = pAA[ia].GetType();
- switch(type) {
- case AAT_INVALID:
- PRINT_EXT("test_extractedSS: AliasAddress type is AAT_INVALIDn");
- break;
- case AAT_E164:
- {
- char *e164;
- ret = pAA[ia].GetE164(e164, len);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%sn",printError(ret,emsg));
- } else {
- char retstr[MAXOUTSTR];
- PRINT_EXT(" GetE164() e164 = %sn",
- sprint_string((unsigned char *)e164,
- MAXSTRLEN(len), retstr));
- PRINT_EXT(" len = %dn",len);
- }
- break;
- }
- case AAT_H323_ID:
- {
- unsigned short *h323id;
- ret = pAA[ia].GetH323ID(h323id, len);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%sn",printError(ret,emsg));
- } else {
- PRINT_EXT(" h323id = %d,%d,... ",
- h323id[0],h323id[1]);
- PRINT_EXT(" len = %dn",len);
- }
- break;
- }
- case AAT_URL_ID:
- {
- char *url;
- ret = pAA[ia].GetURLID(url, len);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%sn",printError(ret,emsg));
- } else {
- char retstr[MAXOUTSTR];
- PRINT_EXT(" url = %s ",
- sprint_string((unsigned char *)url,
- MAXSTRLEN(len), retstr));
- PRINT_EXT(" len = %dn",len);
- }
- break;
- }
- case AAT_TRANSPORT_ID:
- {
- sockaddr addr;
- ret = pAA[ia].GetTransportID(&addr);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%sn",printError(ret,emsg));
- } else {
- char sockstr[25];
- PRINT_EXT(" GetTransportID() transportID = %sn",
- sprint_sockaddr(&addr,sockstr));
- }
- break;
- }
- case AAT_EMAIL_ID:
- {
- char *email;
- ret = pAA[ia].GetEMailID(email, len);
- if (!PROT_IS_SUCCESS(ret)) {
- char emsg[128];
- PRINT_EXT("%sn",printError(ret,emsg));
- } else {
- char retstr[MAXOUTSTR];
- PRINT_EXT(" email = %s ",
- sprint_string((unsigned char *)email,
- MAXSTRLEN(len), retstr));
- PRINT_EXT(" len = %dn",len);
- }
- break;
- }
- case AAT_PARTY_NUMBER:
- {
- PRINT_EXT("PARTY_NUMBER not implementedn");
- break;
- }
- default:
- PRINT_EXT("AliasAddr type is not defined %dn",type);
- break;
- }
- }
- delete [] pAA;
- break;
- }
- case CTOT_SETUP: // Arg
- {
- if(pRos->type == ROS_RETURN_RESULT) {
- PRINT_EXT(" ctsrr CallID="%s"n",pRos->Res.CallID);
- break;
- }
- PRINT_EXT(" ctsi CallID="%s"n",pRos->Arg.CallID);
- break;
- }
- case CTOT_ACTIVE: // Arg
- {
- break;
- }
- case CTOT_COMPLETE: // Arg
- {
- break;
- }
- case CTOT_UPDATE: // Arg
- {
- break;
- }
- case CTOT_TRANSFER:
- {
- break;
- }
- default:
- PRINT_EXT("test_extractedSS: unknown ROS op type %dn",pRos->type);
- break;
- }
- }
- }
- }
- void
- deleteSSlist(H450SSseq *list)
- {
- H450SSseq *p, *pn;
- p = list;
- while(p != NULL) {
- delete p->value; // delete H4501SuppService
- pn = p->next;
- delete p; // delete H450SSseq
- p = pn;
- }
- }