X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fatalk%2Fuuid.h;h=ba47fd09a224db3eb73c424d4bc253198216b8da;hb=b0bcb8f6b0571592a50ce039882c9319e012a270;hp=7c28603a6c0f573e96506383f40668ba6b15cd0a;hpb=0106aa74dbf137e3bffc276fc18765a76a6c7615;p=netatalk.git diff --git a/include/atalk/uuid.h b/include/atalk/uuid.h index 7c28603a..ba47fd09 100644 --- a/include/atalk/uuid.h +++ b/include/atalk/uuid.h @@ -1,5 +1,4 @@ /* - $Id: uuid.h,v 1.1 2009-02-02 11:55:01 franklahm Exp $ Copyright (c) 2008,2009 Frank Lahm This program is free software; you can redistribute it and/or modify @@ -19,10 +18,14 @@ #define UUID_BINSIZE 16 #define UUID_STRINGSIZE 36 -typedef char *uuidp_t; -typedef char atalk_uuid_t[UUID_BINSIZE]; +typedef const unsigned char *uuidp_t; +typedef unsigned char atalk_uuid_t[UUID_BINSIZE]; -typedef enum {UUID_USER = 1, UUID_GROUP} uuidtype_t; +typedef enum {UUID_USER = 0, + UUID_GROUP = 1, + UUID_ENOENT = 4} /* used as bit flag */ + uuidtype_t; +#define UUIDTYPESTR_MASK 3 extern char *uuidtype[]; /* afp_options.c needs these. defined in libatalk/ldap.c */ @@ -41,9 +44,11 @@ extern char *ldap_uid_attr; * Interface ********************************************************/ -extern int getuuidfromname( const char *name, uuidtype_t type, uuidp_t uuid); -extern int getnamefromuuid( uuidp_t uuidp, char **name, uuidtype_t *type); -extern int uuid_bin2string( uuidp_t uuidp, char **uuidstring); -extern void uuid_string2bin( const char *uuidstring, uuidp_t uuid); +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(const unsigned char *uuid); +extern void uuid_string2bin( const char *uuidstring, unsigned char *uuid); +extern void uuidcache_dump(void); #endif /* AFP_UUID_H */