예제 #1
0
int32_t zrtp_containsAlgo(ZrtpContext* zrtpContext, Zrtp_AlgoTypes algoType, const char*  algo)
{
    EnumBase* base = getEnumBase(algoType);
    AlgorithmEnum& a = base->getByName(algo);

    return zrtpContext->configure->containsAlgo((AlgoTypes)algoType, a) ? 1 : 0;
}
예제 #2
0
int32_t zrtp_addAlgoAt(ZrtpContext* zrtpContext, zrtp_AlgoTypes algoType, const char* algo, int32_t index)
{
    EnumBase* base = getEnumBase(algoType);
    AlgorithmEnum& a = base->getByName(algo);

    return zrtpContext->configure->addAlgoAt((AlgoTypes)algoType, a, index);
}
예제 #3
0
int32_t zrtp_removeAlgo(ZrtpContext* zrtpContext, zrtp_AlgoTypes algoType, const char* algo)
{
    EnumBase* base = getEnumBase(algoType);
    if (base) {
        AlgorithmEnum& a = base->getByName(algo);
        if (zrtpContext && zrtpContext->configure)
            return zrtpContext->configure->removeAlgo((AlgoTypes)algoType, a);
    }
    return -1;
}