X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fatalk%2Fuuid.h;h=6cf872dd28ccd6bfac07ab8e2ab27de9cb406e50;hb=a2ddc8384c1881c66db1fbba6698bfd09da84b64;hp=ebaf2b851d392e9115356a8487eb878f6de60a11;hpb=631499485e36f463ee795f7173c57e5f23de9d20;p=netatalk.git diff --git a/include/atalk/uuid.h b/include/atalk/uuid.h index ebaf2b85..6cf872dd 100644 --- a/include/atalk/uuid.h +++ b/include/atalk/uuid.h @@ -17,12 +17,13 @@ #define UUID_BINSIZE 16 #define UUID_STRINGSIZE 36 +#define UUID_PRINTABLE_STRING_LENGTH 37 -typedef unsigned char *uuidp_t; +typedef const unsigned char *uuidp_t; typedef unsigned char atalk_uuid_t[UUID_BINSIZE]; -typedef enum {UUID_USER = 0, - UUID_GROUP = 1, +typedef enum {UUID_USER = 1, + UUID_GROUP = 2, UUID_ENOENT = 4} /* used as bit flag */ uuidtype_t; #define UUIDTYPESTR_MASK 3 @@ -44,11 +45,11 @@ extern char *ldap_uid_attr; * Interface ********************************************************/ -extern int getuuidfromname( const char *name, uuidtype_t type, uuidp_t uuid); -extern int getnamefromuuid( const uuidp_t uuidp, char **name, uuidtype_t *type); - +extern int getuuidfromname( const char *name, uuidtype_t type, unsigned char *uuid); +extern int getnamefromuuid( const unsigned char *uuid, char **name, uuidtype_t *type); extern void localuuid_from_id(unsigned char *buf, uuidtype_t type, unsigned int id); -extern const char *uuid_bin2string(unsigned char *uuid); -extern void uuid_string2bin( const char *uuidstring, uuidp_t uuid); +extern const char *uuid_bin2string(const unsigned char *uuid); +extern void uuid_string2bin( const char *uuidstring, unsigned char *uuid); extern void uuidcache_dump(void); + #endif /* AFP_UUID_H */