#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "appsettings.h"
const char *flags_crypto_on =
"c";
const char *flags_crypto_off =
"";
const char *flags_locked =
"L";
const char *flags_unlocked =
"";
const char *flags_exec_on =
"";
const char *flags_exec_off =
"";
void appsettings_init(
void) {
flags_crypto_on = ui_set_default_property(
"idav.ui.flags.encrypted", flags_crypto_on);
flags_crypto_off = ui_set_default_property(
"idav.ui.flags.unencrypted", flags_crypto_off);
flags_locked = ui_set_default_property(
"idav.ui.flags.locked", flags_locked);
flags_unlocked = ui_set_default_property(
"idav.ui.flags.unlocked", flags_unlocked);
flags_exec_on = ui_set_default_property(
"idav.ui.flags.executable", flags_exec_on);
flags_exec_off = ui_set_default_property(
"idav.ui.flags.noexec", flags_exec_off);
}
const char* appsettings_get_cryptoflag(UiBool encrypted) {
return encrypted ? flags_crypto_on : flags_crypto_off;
}
const char* appsettings_get_lockflag(UiBool locked) {
return locked ? flags_locked : flags_unlocked;
}
const char* appsettings_get_execflag(UiBool executable) {
return executable ? flags_exec_on : flags_exec_off;
}