Abbreviated type names.
This commit is contained in:
		@@ -81,6 +81,38 @@ const MPResultType mpw_typeWithName(const char *typeName) {
 | 
			
		||||
    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) {
 | 
			
		||||
 | 
			
		||||
    switch (resultType) {
 | 
			
		||||
 
 | 
			
		||||
@@ -146,6 +146,10 @@ const char *mpw_scopeForPurpose(MPKeyPurpose purpose);
 | 
			
		||||
 * @return The password type represented by the given name.
 | 
			
		||||
 */
 | 
			
		||||
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.
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user