osptoken.h
来自「mgcp协议源代码。支持多种编码:g711」· C头文件 代码 · 共 95 行
H
95 行
/**########################################################################*########################################################################*########################################################################* * 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. * *******#########################################################################*#########################################################################*#########################################################################*//* * osptoken.h - OSP token objects */#ifndef _OSPTOKEN_H#define _OSPTOKEN_H#include "osp.h"#include "osplist.h"#include "ospxmlelem.h"/* max size of a token (bytes) */#define OSPC_TOKENMAXSIZE 3200#define OSPC_TOKENMAXSTRINGSIZE 6*OSPC_TOKENMAXSIZE/* the basic token structure */typedef struct{ OSPTLISTLINK ospmTokenLink; unsigned ospmTokenLen; unsigned char *ospmTokenVal;}OSPTTOKEN;/**//*-----------------------------------------------------------------------* * macros that emulate functions *-----------------------------------------------------------------------*/#ifndef OSPC_DEBUG#define OSPPTokenGetSize(ospvToken) (ospvToken)?((ospvToken)->ospmTokenLen):0#define OSPPTokenGetValue(ospvToken) (ospvToken)?((ospvToken)->ospmTokenVal):OSPC_OSNULL#define OSPPTokenDelete(ospvToken) OSPM_FREE(*ospvToken); *ospvToken = OSPC_OSNULL;#define OSPPTokenToElement(ospvToken, ospvElem) \ OSPPMsgBinToElement(OSPPTokenGetSize(ospvToken), \ OSPPTokenGetValue(ospvToken), \ (const unsigned char *)OSPPMsgGetElemName(ospeElemToken), ospvElem, OSPC_TRUE)#endif#ifdef __cplusplusextern "C" {#endif /**/ /*-----------------------------------------------------------------------* * function prototypes *-----------------------------------------------------------------------*/ OSPTTOKEN *OSPPTokenNew(unsigned, const unsigned char *); unsigned OSPPTokenFromElement(OSPTXMLELEM *, OSPTTOKEN **);#ifdef OSPC_DEBUG unsigned OSPPTokenGetSize(OSPTTOKEN *); const unsigned char *OSPPTokenGetValue(OSPTTOKEN *); void OSPPTokenDelete(OSPTTOKEN **); unsigned OSPPTokenToElement(OSPTTOKEN *, OSPTXMLELEM **);#endif#ifdef __cplusplus}#endif#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?