Exemple #1
0
Status pluginGet(int argc, char *argv[])
{
    if (argc != 4)
        return ABC_ERROR(ABC_CC_Error, "usage: ... plugin-get <user> <pass> <plugin> <key>");
    AutoString result;
    ABC_CHECK_OLD(ABC_PluginDataGet(argv[0], argv[1], argv[2], argv[3], &result.get(), &error));
    std::cout << '"' << result.get() << '"' << std::endl;
    return Status();
}
Exemple #2
0
Status
otpResetGet(int argc, char *argv[])
{
    if (argc != 0)
        return ABC_ERROR(ABC_CC_Error, "usage: ... otp-reset-get");

    AutoString names;
    ABC_CHECK_OLD(ABC_OtpResetGet(&names.get(), &error));
    std::cout << names.get() << std::endl;

    return Status();
}
Exemple #3
0
Status
otpKeyGet(int argc, char *argv[])
{
    if (argc != 1)
        return ABC_ERROR(ABC_CC_Error, "usage: ... otp-key-get <user>");

    AutoString key;
    ABC_CHECK_OLD(ABC_OtpKeyGet(argv[0], &key.get(), &error));
    std::cout << "key: " << key.get() << std::endl;

    return Status();
}