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

📄 ospmsgattr.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.                                      *                                     *******#########################################################################*#########################################################################*#########################################################################*//* * ospmsgattr.c - OSP attribute processing. */#include "osp.h"#include "ospmsgdesc.h"#include "ospmsgattr.h"/**//*-----------------------------------------------------------------------* * global variables *-----------------------------------------------------------------------*//* array that associates attribute and names */const OSPTMSGDESC OSPVAttrDescs[] ={    { ospeAttrUnknown,       "" },    { ospeAttrComponentId,   "componentId" },    { ospeAttrCritical,      "critical" },    { ospeAttrEncoding,      "encoding" },    { ospeAttrMessageId,     "messageId" },    { ospeAttrType,          "type" },    { ospeAttrVersion,       "version"},    { ospeAttrRandom,        "random"}};const unsigned OSPVNumAttrDesc = sizeof(OSPVAttrDescs)/sizeof(OSPTMSGDESC);#ifdef OSPC_DEBUG/**//*-----------------------------------------------------------------------* * OSPPMsgGetAttrName() - get an attribute name from a part value *-----------------------------------------------------------------------*/const char *                              /* returns pointer to the name */OSPPMsgGetAttrName(    OSPTMSGATTRPART ospvPart){    const char *ospvName = OSPC_OSNULL;    if (ospvPart!= OSPC_MSGPARTUNKNOWN)     {        ospvName = OSPPMsgDescGetName((OSPTMSGPART)ospvPart, OSPVAttrDescs,            OSPVNumAttrDesc);    }    return(ospvName);}/**//*-----------------------------------------------------------------------* * OSPPMsgGetAttrPart() - get an attribute part ID from its name *-----------------------------------------------------------------------*/OSPTMSGATTRPART                           /* returns part */    OSPPMsgGetAttrPart(    const char *ospvName    ){    OSPTMSGATTRPART ospvPart = ospeAttrUnknown;    if (ospvName != OSPC_OSNULL)     {        ospvPart = (OSPTMSGATTRPART) OSPPMsgDescGetPart(ospvName,            OSPVAttrDescs, OSPVNumAttrDesc);    }    return(ospvPart);}#endif /* OSPC_DEBUG */

⌨️ 快捷键说明

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