ospstatus.h

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

H
101
字号
/**########################################################################*########################################################################*########################################################################*                                                               *   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.                                      *                                     *******#########################################################################*#########################################################################*#########################################################################*//* * ospstatus.h - OSP Status Objects */#ifndef _OSPSTATUS_H#define _OSPSTATUS_H#include "osp.h"#include "ospxmlelem.h"#include "ospmsg.h"typedef struct{    unsigned          ospmStatusCode;    unsigned char     *ospmStatusDesc;    unsigned          ospmHasCode;    unsigned          ospmHasDesc;}OSPTSTATUS;/**//*-----------------------------------------------------------------------* * general macros *-----------------------------------------------------------------------*/#define OSPM_STATUSCODE_SUCCESSFUL(s)      (((s) > 199) &&( (s) < 300))/**//*-----------------------------------------------------------------------* * macros that emulate functions *-----------------------------------------------------------------------*/#ifndef OSPC_DEBUG/* * Note: all macros are also implemented as functions in ospstatus.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. *//* Code */#define OSPPStatusHasCode(ospvStatus) \    (ospvStatus)?((ospvStatus)->ospmHasCode):OSPC_FALSE#define OSPPStatusGetCode(ospvStatus) \    (ospvStatus)?((ospvStatus)->ospmStatusCode):0#endif /* OSPC_DEBUG */#ifdef __cplusplusextern "C" {#endif    /**/    /*-----------------------------------------------------------------------*     * function prototypes     *-----------------------------------------------------------------------*/    OSPTSTATUS    *OSPPStatusNew(void);    void           OSPPStatusDelete(OSPTSTATUS **ospvStatus);    unsigned       OSPPStatusFromElement(OSPTXMLELEM *, OSPTSTATUS **);    void           OSPPStatusSetDesc(OSPTSTATUS *, unsigned char *);    void           OSPPStatusSetCode(OSPTSTATUS *, unsigned);#ifdef OSPC_DEBUG    unsigned       OSPPStatusHasCode(OSPTSTATUS *);    unsigned       OSPPStatusGetCode(OSPTSTATUS *);#endif /* OSPC_DEBUG */#ifdef __cplusplus}#endif#endif /* _OSPSTATUS_H */

⌨️ 快捷键说明

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