diff options
| -rw-r--r-- | include/ldapschema.h | 5 | ||||
| -rw-r--r-- | lib/libldapschema/libldapschema.sym | 1 | ||||
| -rw-r--r-- | lib/libldapschema/lspec.c | 15 |
3 files changed, 21 insertions, 0 deletions
diff --git a/include/ldapschema.h b/include/ldapschema.h index 701cc64..50e60cd 100644 --- a/include/ldapschema.h +++ b/include/ldapschema.h | |||
| @@ -368,6 +368,11 @@ ldapschema_printall( | |||
| 368 | LDAPSchema * lsd, | 368 | LDAPSchema * lsd, |
| 369 | int type ); | 369 | int type ); |
| 370 | 370 | ||
| 371 | _LDAPSCHEMA_F | ||
| 372 | const char * | ||
| 373 | ldapschema_type_name( | ||
| 374 | uint32_t type ); | ||
| 375 | |||
| 371 | 376 | ||
| 372 | //-----------------// | 377 | //-----------------// |
| 373 | // query functions // | 378 | // query functions // |
diff --git a/lib/libldapschema/libldapschema.sym b/lib/libldapschema/libldapschema.sym index 6f22518..dc1f0d9 100644 --- a/lib/libldapschema/libldapschema.sym +++ b/lib/libldapschema/libldapschema.sym | |||
| @@ -90,6 +90,7 @@ ldapschema_spec_abnf | |||
| 90 | ldapschema_spec_field | 90 | ldapschema_spec_field |
| 91 | ldapschema_spec_list | 91 | ldapschema_spec_list |
| 92 | ldapschema_spec_search | 92 | ldapschema_spec_search |
| 93 | ldapschema_type_name | ||
| 93 | # output functions | 94 | # output functions |
| 94 | ldapschema_print | 95 | ldapschema_print |
| 95 | ldapschema_printall | 96 | ldapschema_printall |
diff --git a/lib/libldapschema/lspec.c b/lib/libldapschema/lspec.c index bdaadcb..ece78fd 100644 --- a/lib/libldapschema/lspec.c +++ b/lib/libldapschema/lspec.c | |||
| @@ -250,4 +250,19 @@ const LDAPSchemaSpec * ldapschema_spec_search(const char * oid) | |||
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | 252 | ||
| 253 | const char * ldapschema_type_name(uint32_t type) | ||
| 254 | { | ||
| 255 | switch(type) | ||
| 256 | { | ||
| 257 | case LDAPSCHEMA_ATTRIBUTETYPE: return("attributeType"); | ||
| 258 | case LDAPSCHEMA_MATCHINGRULE: return("matchingRule"); | ||
| 259 | case LDAPSCHEMA_OBJECTCLASS: return("objectClass"); | ||
| 260 | case LDAPSCHEMA_SYNTAX: return("ldapSyntax"); | ||
| 261 | default: | ||
| 262 | break; | ||
| 263 | }; | ||
| 264 | return(NULL); | ||
| 265 | } | ||
| 266 | |||
| 267 | |||
| 253 | /* end of source file */ | 268 | /* end of source file */ |
