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

📄 osptokeninfo.h

📁 mgcp协议源代码。支持多种编码:g711
💻 H
字号:
/**########################################################################*########################################################################*########################################################################*                                                               *   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.                                      *                                     *******#########################################################################*#########################################################################*#########################################################################*//* * osptokeninfo.h - OSP token info objects */#ifndef _OSPTOKENINFO_H#define _OSPTOKENINFO_H#include "osp.h"#include "ospxmlelem.h"#include "ospmsg.h"#include "ospcallid.h"#include "osptoken.h"typedef struct{    unsigned char     ospmTokenInfoSourceNumber[OSPC_E164NUMSIZE];    unsigned char     ospmTokenInfoDestNumber[OSPC_E164NUMSIZE];    OSPTCALLID       *ospmTokenInfoCallId;    OSPTTIME          ospmTokenInfoValidAfter;    OSPTTIME          ospmTokenInfoValidUntil;    OSPTTRXID         ospmTokenInfoTrxId;    int               ospmTokenInfoDuration;}OSPTTOKENINFO;/**//*-----------------------------------------------------------------------* * macros that emulate functions *-----------------------------------------------------------------------*//* * Note: all macros are also implemented as functions in ospauthrsp.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. */#ifndef OSPC_DEBUG#define OSPPTokenInfoSetSourceNumber(ospvTokenInfo,ospvNum) \    OSPM_STRNCPY((ospvTokenInfo)->ospmTokenInfoSourceNumber, (ospvNum), \    OSPC_E164NUMSIZE-1)#define OSPPTokenInfoGetSourceNumber(ospvTokenInfo) \    (ospvTokenInfo)?((ospvTokenInfo)->ospmTokenInfoSourceNumber):OSPC_OSNULL#define OSPPTokenInfoSetDestNumber(ospvTokenInfo,ospvNum) \    OSPM_STRNCPY((ospvTokenInfo)->ospmTokenInfoDestNumber, (ospvNum), \    OSPC_E164NUMSIZE-1)#define OSPPTokenInfoGetDestNumber(ospvTokenInfo) \    (ospvTokenInfo)?((ospvTokenInfo)->ospmTokenInfoDestNumber):OSPC_OSNULL#define OSPPTokenInfoHasCallId(ospvTokenInfo) \    (ospvTokenInfo)?((ospvTokenInfo)->ospmTokenInfoCallId != OSPC_OSNULL):OSPC_FALSE#define OSPPTokenInfoSetCallId(ospvTokenInfo,ospvCallId)  { \    if ((ospvTokenInfo)->ospmTokenInfoCallId != OSPC_OSNULL) \    { \        OSPPCallIdDelete(&((ospvTokenInfo)->ospmTokenInfoCallId)); \    } \    (ospvTokenInfo)->ospmTokenInfoCallId = \        OSPPCallIdNew((ospvCallId)->ospmCallIdLen, (ospvCallId)->ospmCallIdVal); \}#define OSPPTokenInfoGetCallId(ospvTokenInfo) \    ((ospvTokenInfo)->ospmTokenInfoCallId)#define OSPPTokenInfoGetCallIdValue(ospvTokenInfo) \    (ospvTokenInfo)?OSPPCallIdGetValue(((ospvTokenInfo)->ospmTokenInfoCallId)):OSPC_OSNULL#define OSPPTokenInfoHasValidAfter(ospvTokenInfo) \    (ospvTokenInfo)?((ospvTokenInfo)->ospmTokenInfoValidAfter != OSPC_TIMEMIN):OSPC_FALSE#define OSPPTokenInfoSetValidAfter(ospvTokenInfo,ospvTime) \    (ospvTokenInfo)->ospmTokenInfoValidAfter = (ospvTime)#define OSPPTokenInfoGetValidAfter(ospvTokenInfo) \    (ospvTokenInfo)->ospmTokenInfoValidAfter#define OSPPTokenInfoSetValidUntil(ospvTokenInfo,ospvTime) \    (ospvTokenInfo)->ospmTokenInfoValidUntil = (ospvTime)#define OSPPTokenInfoGetValidUntil(ospvTokenInfo) \    (ospvTokenInfo)->ospmTokenInfoValidUntil#define OSPPTokenInfoSetTrxId(ospvTokenInfo, ospvTrxId) \    (ospvTokenInfo)->ospmTokenInfoTrxId = ospvTrxId#define OSPPTokenInfoGetTrxId(ospvTokenInfo) \    ((ospvTokenInfo)->ospmTokenInfoTrxId)#define OSPPTokenInfoSetDuration(ospvTokenInfo,ospvDuration) \    (ospvTokenInfo)->ospmTokenInfoDuration = ospvDuration; #define OSPPTokenInfoGetDuration(ospvTokenInfo) \    (ospvTokenInfo)?((ospvTokenInfo)->ospmTokenInfoDuration):0#endif /* OSPC_DEBUG */#ifdef __cplusplusextern "C" {#endif    /**/    /*-----------------------------------------------------------------------*     * function prototypes     *-----------------------------------------------------------------------*/    OSPTTOKENINFO *OSPPTokenInfoNew(void);    void           OSPPTokenInfoDelete(OSPTTOKENINFO **);    unsigned       OSPPTokenInfoFromElement(OSPTXMLELEM *, OSPTTOKENINFO **);#ifdef OSPC_DEBUG    void           OSPPTokenInfoSetSourceNumber(OSPTTOKENINFO *, const unsigned char *);    unsigned char *OSPPTokenInfoGetSourceNumber(OSPTTOKENINFO *);    void           OSPPTokenInfoSetDestNumber(OSPTTOKENINFO *, const unsigned char *);    unsigned char *OSPPTokenInfoGetDestNumber(OSPTTOKENINFO *);    unsigned       OSPPTokenInfoHasCallId(OSPTTOKENINFO *);    void           OSPPTokenInfoSetCallId(OSPTTOKENINFO *, OSPTCALLID *);    OSPTCALLID    *OSPPTokenInfoGetCallId(OSPTTOKENINFO *);    unsigned char *OSPPTokenInfoGetCallIdValue(OSPTTOKENINFO *);    unsigned       OSPPTokenInfoHasValidAfter(OSPTTOKENINFO *);    void           OSPPTokenInfoSetValidAfter(OSPTTOKENINFO *, OSPTTIME);    OSPTTIME       OSPPTokenInfoGetValidAfter(OSPTTOKENINFO *);    void           OSPPTokenInfoSetValidUntil(OSPTTOKENINFO *, OSPTTIME);    OSPTTIME       OSPPTokenInfoGetValidUntil(OSPTTOKENINFO *);    void           OSPPTokenInfoSetTrxId(OSPTTOKENINFO *, OSPTTRXID);    OSPTTRXID      OSPPTokenInfoGetTrxId(OSPTTOKENINFO *);    void           OSPPTokenInfoSetDuration(OSPTTOKENINFO *, int);    int            OSPPTokenInfoGetDuration(OSPTTOKENINFO *);#endif /* OSPC_DEBUG */#ifdef __cplusplus}#endif#endif /* _OSPTOKENINFO_H */

⌨️ 快捷键说明

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