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

📄 ospmsgelem.c

📁 mgcp协议源代码。支持多种编码:g711
💻 C
字号:
/**########################################################################*########################################################################*########################################################################*                                                               *   COPYRIGHT (c) 1998, 1999 by TransNexus, LLC                          *                                                                    *   This software contains proprietary and confidential information  *   of TransNexus, LLC. Except as may be set forth in the license    *   agreement under which this software is supplied, use, disclosure, *   or reproduction is prohibited without the prior, express, written*   consent of TransNexus, LLC.                                      *                                     *******#########################################################################*#########################################################################*#########################################################################*//* * ospxmlmsgelem.c - XML element processing specific to OSP. */#include "osp.h"#include "ospmsgdesc.h"#include "ospmsgelem.h"/**//*-----------------------------------------------------------------------* * Static global variables *-----------------------------------------------------------------------*//* array that associates elements and names */const OSPTMSGDESC OSPVElemDescs[] ={    { ospeElemUnknown,          "" },    { ospeElemAmount,           "Amount" },    { ospeElemAuthCnf,          "AuthorizationConfirmation" },    { ospeElemAuthInd,          "AuthorizationIndication" },    { ospeElemAuthReq,          "AuthorizationRequest" },    { ospeElemAuthRsp,          "AuthorisationResponse" },    { ospeElemAuthRzp,          "AuthorizationResponse" },    { ospeElemAuthURL ,         "AuthorityURL" },    { ospeElemCallId ,          "CallId" },    { ospeElemCode,             "Code" },    { ospeElemCurrency,         "Currency" },    { ospeElemDesc,             "Description" },    { ospeElemDest,             "Destination" },    { ospeElemDestAlt,          "DestinationAlternate" },    { ospeElemDestInfo,         "DestinationInfo" },    { ospeElemDestSigAddr,      "DestinationSignalAddress" },    { ospeElemEndPoint,         "EndPoint" },    { ospeElemIncrement,        "Increment" },    { ospeElemMaxDest,          "MaximumDestinations" },    { ospeElemMessage,          "Message" },    { ospeElemPricingCnf,       "PricingConfirmation" },    { ospeElemPricingInd,       "PricingIndication" },    { ospeElemReauthReq,        "ReauthorizationRequest" },    { ospeElemReauthRsp,        "ReauthorizationResponse" },    { ospeElemRole,             "Role" },    { ospeElemService,          "Service" },    { ospeElemSrcAlt,           "SourceAlternate" },    { ospeElemSrcInfo,          "SourceInfo" },    { ospeElemSrcSigAddr,       "SourceSignalAddress" },    { ospeElemStatus,           "Status" },    { ospeElemTimestamp,        "Timestamp" },    { ospeElemToken,            "Token" },    { ospeElemTokenInfo,        "TokenInfo" },    { ospeElemTransId,          "TransactionId" },    { ospeElemUnit,             "Unit" },    { ospeElemUsageCnf,         "UsageConfirmation" },    { ospeElemUsageDetail,      "UsageDetail" },    { ospeElemUsageInd,         "UsageIndication" },    { ospeElemValidAfter,       "ValidAfter" },    { ospeElemValidUntil ,      "ValidUntil" },    { ospeElemTNCustId,         "transnexus.com:CustomerId" },    { ospeElemTNDelayLimit,     "transnexus.com:DelayLimit" },    { ospeElemTNDelayPref,      "transnexus.com:DelayPreference" },    { ospeElemTNDeviceId,       "transnexus.com:DeviceId" },    { ospeElemTNFailReason,     "transnexus.com:FailureReason" },    { ospeElemTNFraction,       "transnexus.com:Fraction" },    { ospeElemTNLossRcvd,       "transnexus.com:LossReceived" },    { ospeElemTNLossSent,       "transnexus.com:LossSent" },    { ospeElemTNMean,           "transnexus.com:Mean" },    { ospeElemTNMinimum,        "transnexus.com:Minimum" },    { ospeElemTNOneWayDelay,    "transnexus.com:OneWayDelay" },    { ospeElemTNPackets,        "transnexus.com:Packets" },    { ospeElemTNRoundTripDelay, "transnexus.com:RoundTripDelay" },    { ospeElemTNSamples,        "transnexus.com:Samples" },    { ospeElemTNStatistics,     "transnexus.com:Statistics" },    { ospeElemTNVariance,       "transnexus.com:Variance" },    { ospeElemTNAudit,          "transnexus.com:Audit" },    { ospeElemTNAuditURL,       "transnexus.com:AuditURL" },    { ospeElemTNAuditState,       "transnexus.com:AuditState" },    { ospeElemTNAuditTimeLimit,   "transnexus.com:AuditTimeLimit" },    { ospeElemTNAuditMaxMessages, "transnexus.com:AuditMaxMessages" },    { ospeElemCSAuditTrigger,     "cisco.com:AuditSignal" }};const unsigned OSPVNumElemDesc = sizeof(OSPVElemDescs)/sizeof(OSPTMSGDESC);#ifdef OSPC_DEBUG/**//*-----------------------------------------------------------------------* * OSPPMsgGetElemName() - get an element name from a part value *-----------------------------------------------------------------------*/const char *                              /* returns pointer to the name */OSPPMsgGetElemName(    OSPTMSGELEMPART ospvPart){    const char *ospvName = OSPC_OSNULL;    if (ospvPart!= OSPC_MSGPARTUNKNOWN)     {        ospvName = OSPPMsgDescGetName((OSPTMSGPART)ospvPart, OSPVElemDescs,            OSPVNumElemDesc);    }    return(ospvName);}/**//*-----------------------------------------------------------------------* * OSPPMsgGetElemPart() - get an elemement part ID from its name *-----------------------------------------------------------------------*/OSPTMSGELEMPART                           /* returns part */    OSPPMsgGetElemPart(    const char *ospvName    ){    OSPTMSGELEMPART ospvPart = (OSPTMSGELEMPART)OSPC_MSGPARTUNKNOWN;    if (ospvName != OSPC_OSNULL)     {        ospvPart = (OSPTMSGELEMPART) OSPPMsgDescGetPart(ospvName,            OSPVElemDescs, OSPVNumElemDesc);    }    return(ospvPart);}#endif /* OSPC_DEBUG */

⌨️ 快捷键说明

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