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

📄 ospusageind.c

📁 mgcp协议源代码。支持多种编码:g711
💻 C
📖 第 1 页 / 共 4 页
字号:
    }    return ospvDestNumber;}/**//*-----------------------------------------------------------------------* * OSPPUsageIndHasDuration() - is the duration set ? *-----------------------------------------------------------------------*/unsigned                            /* returns non-zero if number exists */OSPPUsageIndHasDuration(    OSPTUSAGEIND *ospvUsageInd              /* Usage Indication effected */){    unsigned ospvHasDuration = OSPC_FALSE;    if (ospvUsageInd != OSPC_OSNULL)    {        ospvHasDuration = (ospvUsageInd->ospmUsageIndDuration >= 0);    }    return ospvHasDuration;}/**//*-----------------------------------------------------------------------* * OSPPUsageIndSetDuration() - set the duration *-----------------------------------------------------------------------*/void                                /* nothing returned */OSPPUsageIndSetDuration(    OSPTUSAGEIND *ospvUsageInd,     /* usage indication to set */    int ospvDuration /* duration to set to */){    if (ospvUsageInd != OSPC_OSNULL)    {        if (ospvDuration  >= 0)        {            ospvUsageInd->ospmUsageIndDuration = ospvDuration;        }    }    return;}/**//*-----------------------------------------------------------------------* * OSPPUsageIndGetDuration() - returns the duration for a usage ind *-----------------------------------------------------------------------*/intOSPPUsageIndGetDuration(    OSPTUSAGEIND *ospvUsageInd                     /* usage ind */){    int ospvDuration = 0;    if (ospvUsageInd != OSPC_OSNULL)    {        ospvDuration = ospvUsageInd->ospmUsageIndDuration;    }    return ospvDuration;}/**//*-----------------------------------------------------------------------* * OSPPUsageIndHasTNCustId() - Does usage have a TransNexus Customer Id? *-----------------------------------------------------------------------*/unsigned                                   /* returns non-zero if time */OSPPUsageIndHasTNCustId(    OSPTUSAGEIND *ospvUsageInd               /* usage in question */){    unsigned ospvHasTNCustId = OSPC_FALSE;    if (ospvUsageInd != OSPC_OSNULL)    {        ospvHasTNCustId = ((ospvUsageInd)->ospmUsageIndTNCustId != 0L);    }    return(ospvHasTNCustId);}/**//*-----------------------------------------------------------------------* * OSPPUsageIndSetTNCustId() - Set TransNexus Customer Id *-----------------------------------------------------------------------*/void                                       /* nothing returned */OSPPUsageIndSetTNCustId(    OSPTUSAGEIND   *ospvUsageInd,    unsigned long ospvTNCustId){    if (ospvUsageInd != OSPC_OSNULL)    {        (ospvUsageInd)->ospmUsageIndTNCustId = (ospvTNCustId);    }}/**//*-----------------------------------------------------------------------* * OSPPUsageIndGetTNCustId() - returns TN Customer Id for an usage request *-----------------------------------------------------------------------*/unsigned long                              /* returns the time value */    OSPPUsageIndGetTNCustId(    OSPTUSAGEIND *ospvUsageInd               /* usage request */    ){    unsigned long ospvTNCustId = 0L;    if (ospvUsageInd != OSPC_OSNULL)    {        ospvTNCustId = (ospvUsageInd)->ospmUsageIndTNCustId;    }    return(ospvTNCustId);}/**//*-----------------------------------------------------------------------* * OSPPUsageIndHasTNDeviceId() - Does request have a TransNexus Device Id? *-----------------------------------------------------------------------*/unsigned                                   /* returns non-zero if time */OSPPUsageIndHasTNDeviceId(    OSPTUSAGEIND *ospvUsageInd               /* usage request in question */){    unsigned ospvHasTNDeviceId = OSPC_FALSE;    if (ospvUsageInd != OSPC_OSNULL)    {        ospvHasTNDeviceId = ((ospvUsageInd)->ospmUsageIndTNDeviceId != 0L);    }    return(ospvHasTNDeviceId);}/**//*-----------------------------------------------------------------------* * OSPPUsageIndSetTNDeviceId() - Set TransNexus Device Id *-----------------------------------------------------------------------*/void                                       /* nothing returned */OSPPUsageIndSetTNDeviceId(    OSPTUSAGEIND    *ospvUsageInd,    unsigned long  ospvTNDeviceId){    if (ospvUsageInd != OSPC_OSNULL)    {        (ospvUsageInd)->ospmUsageIndTNDeviceId = (ospvTNDeviceId);    }}/**//*-----------------------------------------------------------------------* * OSPPUsageIndGetTNDeviceId() - returns TN Device Id for an usage request *-----------------------------------------------------------------------*/unsigned long                              /* returns the time value */    OSPPUsageIndGetTNDeviceId(    OSPTUSAGEIND *ospvUsageInd               /* usage request */    ){    unsigned long ospvTNDeviceId = 0L;    if (ospvUsageInd != OSPC_OSNULL)    {        ospvTNDeviceId = (ospvUsageInd)->ospmUsageIndTNDeviceId;    }    return(ospvTNDeviceId);}/**//*-----------------------------------------------------------------------* * OSPPUsageIndHasTNFailReason() - Does request have a TransNexus Fail Rsn *-----------------------------------------------------------------------*/unsigned                                   /* returns non-zero if time */OSPPUsageIndHasTNFailReason(    OSPTUSAGEIND *ospvUsageInd               /* usage request in question */){    unsigned ospvHasTNFailReason = OSPC_FALSE;    if (ospvUsageInd != OSPC_OSNULL)    {        ospvHasTNFailReason = ((ospvUsageInd)->ospmUsageIndTNFailReasonInd);    }    return(ospvHasTNFailReason);}/**//*-----------------------------------------------------------------------* * OSPPUsageIndSetTNFailReason() - Set TransNexus Fail Reason *-----------------------------------------------------------------------*/void                                       /* nothing returned */OSPPUsageIndSetTNFailReason(    OSPTUSAGEIND *ospvUsageInd,    unsigned     ospvTNFailReason){    if (ospvUsageInd != OSPC_OSNULL)    {        (ospvUsageInd)->ospmUsageIndTNFailReason    = (ospvTNFailReason);        (ospvUsageInd)->ospmUsageIndTNFailReasonInd = 1;        OSPPUsageIndSetDuration(ospvUsageInd,0);    }}/**//*-----------------------------------------------------------------------* * OSPPUsageIndGetTNFailReason() - returns TN Fail Rsn for an usage request *-----------------------------------------------------------------------*/unsigned                                 /* returns the fail reason value */    OSPPUsageIndGetTNFailReason(    OSPTUSAGEIND *ospvUsageInd               /* usage request */    ){    unsigned ospvTNFailReason = 0;    if (ospvUsageInd != OSPC_OSNULL)    {        ospvTNFailReason = (ospvUsageInd)->ospmUsageIndTNFailReason;    }    return(ospvTNFailReason);}/**//*-----------------------------------------------------------------------* * OSPPUsageIndHasSourceAlt() - does an usage indication have a  * Source Alternate? *-----------------------------------------------------------------------*/unsigned                                   /* returns non-zero if exists */OSPPUsageIndHasSourceAlt(    OSPTUSAGEIND *ospvUsageInd             /* usage indication */){    unsigned ospvHasSourceAlt = OSPC_FALSE;    if (ospvUsageInd != OSPC_OSNULL)    {        ospvHasSourceAlt = (OSPPUsageIndFirstSourceAlt(ospvUsageInd) != OSPC_OSNULL);    }    return(ospvHasSourceAlt);}/**//*-----------------------------------------------------------------------* * OSPPUsageIndFirstSourceAlt() - gets the First Source alternate for an  * usage indication *-----------------------------------------------------------------------*/OSPTALTINFO *                              /* returns alt info pointer */    OSPPUsageIndFirstSourceAlt(    OSPTUSAGEIND *ospvUsageInd             /* usage indication */    ){    OSPTALTINFO *ospvAltInfo = OSPC_OSNULL;    if (ospvUsageInd != OSPC_OSNULL)    {        ospvAltInfo =             (OSPTALTINFO *)OSPPListFirst(&((ospvUsageInd)->ospmUsageIndSourceAlternate));    }    return(ospvAltInfo);}/**//*-----------------------------------------------------------------------* * OSPPUsageIndNextSourceAlt() - gets the next source alternate for an  * usage indication *-----------------------------------------------------------------------*/OSPTALTINFO *                               /* returns alt info pointer */    OSPPUsageIndNextSourceAlt(    OSPTUSAGEIND *ospvUsageInd,             /* usage indication */    OSPTALTINFO  *ospvAltInfo    ){    OSPTALTINFO *altinfo = OSPC_OSNULL;    if (ospvUsageInd != OSPC_OSNULL)    {        altinfo =             (OSPTALTINFO *)OSPPListNext(&((ospvUsageInd)->ospmUsageIndSourceAlternate),             ospvAltInfo);    }    return(altinfo);}/**//*-----------------------------------------------------------------------* * OSPPUsageIndHasDestinationAlt() - does an usage indication have a  * Destination Alternate? *-----------------------------------------------------------------------*/unsigned                                   /* returns non-zero if exists */OSPPUsageIndHasDestinationAlt(    OSPTUSAGEIND *ospvUsageInd             /* usage indication */){    unsigned ospvHasDestinationAlt = OSPC_FALSE;    if (ospvUsageInd != OSPC_OSNULL)    {        ospvHasDestinationAlt = (OSPPUsageIndFirstDestinationAlt(ospvUsageInd) != OSPC_OSNULL);    }    return(ospvHasDestinationAlt);}/**//*-----------------------------------------------------------------------* * OSPPUsageIndFirstDestinationAlt() - gets the First Destination alternate for an  * usage indication *-----------------------------------------------------------------------*/OSPTALTINFO *                              /* returns alt info pointer */    OSPPUsageIndFirstDestinationAlt(    OSPTUSAGEIND *ospvUsageInd             /* usage indication */    ){    OSPTALTINFO *ospvAltInfo = OSPC_OSNULL;    if (ospvUsageInd != OSPC_OSNULL)    {        ospvAltInfo =             (OSPTALTINFO *)OSPPListFirst(&((ospvUsageInd)->ospmUsageIndDestinationAlternate));    }    return(ospvAltInfo);}/**//*-----------------------------------------------------------------------* * OSPPUsageIndNextDestinationAlt() - gets the next Destination alternate for an  * usage indication *-----------------------------------------------------------------------*/OSPTALTINFO *                               /* returns alt info pointer */    OSPPUsageIndNextDestinationAlt(    OSPTUSAGEIND *ospvUsageInd,             /* usage indication */    OSPTALTINFO  *ospvAltInfo    ){    OSPTALTINFO *altinfo = OSPC_OSNULL;    if (ospvUsageInd != OSPC_OSNULL)    {        altinfo =             (OSPTALTINFO *)OSPPListNext(&((ospvUsageInd)->ospmUsageIndDestinationAlternate),             ospvAltInfo);    }    return(altinfo);}/**//*-----------------------------------------------------------------------* * OSPPUsageIndGetDestinationAltSize() - gets the Destination alternate size  * for an altinfo *-----------------------------------------------------------------------*/unsigned                                    /* returns alt info size */    OSPPUsageIndGetDestinationAltSize(    OSPTALTINFO *ospvAltInfo                /* Alt info ptr */    ){    unsigned ospvAltInfoSize = 0;    if (ospvAltInfo != OSPC_OSNULL)    {        ospvAltInfoSize = OSPPAltInfoGetSize(ospvAltInfo);    }

⌨️ 快捷键说明

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