Abbreviated type names.
This commit is contained in:
parent
98d0d7a497
commit
7f7910f0a9
@ -81,6 +81,38 @@ const MPResultType mpw_typeWithName(const char *typeName) {
|
|||||||
return (MPResultType)ERR;
|
return (MPResultType)ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *mpw_abbreviationForType(MPResultType resultType) {
|
||||||
|
|
||||||
|
switch (resultType) {
|
||||||
|
case MPResultTypeTemplateMaximum:
|
||||||
|
return "max";
|
||||||
|
case MPResultTypeTemplateLong:
|
||||||
|
return "long";
|
||||||
|
case MPResultTypeTemplateMedium:
|
||||||
|
return "med";
|
||||||
|
case MPResultTypeTemplateBasic:
|
||||||
|
return "basic";
|
||||||
|
case MPResultTypeTemplateShort:
|
||||||
|
return "short";
|
||||||
|
case MPResultTypeTemplatePIN:
|
||||||
|
return "pin";
|
||||||
|
case MPResultTypeTemplateName:
|
||||||
|
return "name";
|
||||||
|
case MPResultTypeTemplatePhrase:
|
||||||
|
return "phrase";
|
||||||
|
case MPResultTypeStatefulPersonal:
|
||||||
|
return "own";
|
||||||
|
case MPResultTypeStatefulDevice:
|
||||||
|
return "dev";
|
||||||
|
case MPResultTypeDeriveKey:
|
||||||
|
return "key";
|
||||||
|
default: {
|
||||||
|
dbg( "Unknown password type: %d", resultType );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const char *mpw_shortNameForType(MPResultType resultType) {
|
const char *mpw_shortNameForType(MPResultType resultType) {
|
||||||
|
|
||||||
switch (resultType) {
|
switch (resultType) {
|
||||||
|
@ -146,6 +146,10 @@ const char *mpw_scopeForPurpose(MPKeyPurpose purpose);
|
|||||||
* @return The password type represented by the given name.
|
* @return The password type represented by the given name.
|
||||||
*/
|
*/
|
||||||
const MPResultType mpw_typeWithName(const char *typeName);
|
const MPResultType mpw_typeWithName(const char *typeName);
|
||||||
|
/**
|
||||||
|
* @return The standard identifying name for the given password type.
|
||||||
|
*/
|
||||||
|
const char *mpw_abbreviationForType(MPResultType resultType);
|
||||||
/**
|
/**
|
||||||
* @return The standard identifying name for the given password type.
|
* @return The standard identifying name for the given password type.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user