ospmsgdesc.h

来自「mgcp协议源代码。支持多种编码:g711」· C头文件 代码 · 共 96 行

H
96
字号
/**########################################################################*########################################################################*########################################################################*                                                               *   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.                                      *                                     *******#########################################################################*#########################################################################*#########################################################################*//* * ospmsgdesc.h - Structures and prototypes for generic XML message *                descriptors. */#ifndef OSPMSGDESC_H#define OSPMSGDESC_H#include "osp.h"#include "ospmsgpart.h"/* * The OSPPMsgDescGetName includes two different implementations: the * first is safer and the second has higher performance. The safer option * does an exhaustive search through the descriptors array. The second * simply uses the part ID as an index into that array. The risk with the * second approach is that it requires that the array be built correctly, * with elements in the precise, right order. If you enable the second * approach, it is essential to test the array ordering using the the code * in the included main() procedures in the individual components. */#define OSPC_FASTMSG_DESC/* * An OPSMsgDesc structure is used to associate a part (for an attribute * or an element) with a name. */typedef struct{    OSPTMSGPART  ospmMsgDescPart;    const char  *ospmMsgDescName;}OSPTMSGDESC;/**//*-----------------------------------------------------------------------* * macros that emulate functions *-----------------------------------------------------------------------*/#ifndef OSPC_DEBUG/* * Note: all macros are also implemented as functions in ospmsgdesc.c. * For implementation details, see the comments in that file. To replace * a macro with a true function, simply comment out the macro definition * below. */#define OSPPMsgDescGetName(ospvPart, ospvDescs, ospvNumDesc) \        (((ospvPart) < (ospvNumDesc)) ? \        (ospvDescs)[(int)(ospvPart)].ospmMsgDescName : OSPC_OSNULL )#endif /* OSPC_DEBUG *//**//*-----------------------------------------------------------------------* * function prototypes *-----------------------------------------------------------------------*/OSPTMSGPART  OSPPMsgDescGetPart(const char *, const OSPTMSGDESC *, unsigned);#ifdef OSPC_DEBUGconst char  *OSPPMsgDescGetName(OSPTMSGPART,  const OSPTMSGDESC *, unsigned);#endif /* OSPC_DEBUG */#endif /* OSPMSGDESC_H */

⌨️ 快捷键说明

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