00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef libuser_entity_h
00020 #define libuser_entity_h
00021
00024 #include <sys/types.h>
00025 #include <glib.h>
00026
00028 #define LU_OBJECTCLASS "objectClass"
00029 #define LU_CN "cn"
00030 #define LU_USERNAME "uid"
00031 #define LU_GROUPNAME "cn"
00035 #define LU_UID "uid"
00036 #define LU_USERPASSWORD "userPassword"
00037 #define LU_UIDNUMBER "uidNumber"
00038 #define LU_GIDNUMBER "gidNumber"
00039 #define LU_GECOS "gecos"
00040 #define LU_HOMEDIRECTORY "homeDirectory"
00041 #define LU_LOGINSHELL "loginShell"
00044 #define LU_GID "gid"
00045 #define LU_MEMBERUID "memberUid"
00046 #define LU_ADMINISTRATORUID "administratorUid"
00049 #define LU_SHADOWLASTCHANGE "shadowLastChange"
00050 #define LU_SHADOWMIN "shadowMin"
00051 #define LU_SHADOWMAX "shadowMax"
00052 #define LU_SHADOWWARNING "shadowWarning"
00053 #define LU_SHADOWINACTIVE "shadowInactive"
00054 #define LU_SHADOWEXPIRE "shadowExpire"
00055 #define LU_SHADOWFLAG "shadowFlag"
00058 #define LU_GIVENNAME "givenName"
00059 #define LU_SN "sn"
00060 #define LU_ROOMNUMBER "roomNumber"
00061 #define LU_TELEPHONENUMBER "telephoneNumber"
00062 #define LU_HOMEPHONE "homePhone"
00065 typedef struct lu_ent lu_ent_t;
00066
00067 struct lu_ent *lu_ent_new(void);
00068 void lu_ent_copy(struct lu_ent *source, struct lu_ent *dest);
00069 void lu_ent_revert(struct lu_ent *ent);
00070 void lu_ent_free(struct lu_ent *ent);
00071
00072 GList *lu_ent_get_original(struct lu_ent *ent, const char *attribute);
00073 void lu_ent_set_original(struct lu_ent *ent, const char *attr, const char *val);
00074 void lu_ent_set_numeric_original(struct lu_ent *ent, const char *attr, long val);
00075 void lu_ent_add_original(struct lu_ent *ent, const char *attr, const char *val);
00076 void lu_ent_clear_original(struct lu_ent *ent, const char *attr);
00077
00078 GList *lu_ent_get(struct lu_ent *ent, const char *attribute);
00079 gboolean lu_ent_has(struct lu_ent *ent, const char *attribute);
00080 void lu_ent_set(struct lu_ent *ent, const char *attr, const char *val);
00081 void lu_ent_set_numeric(struct lu_ent *ent, const char *attr, long val);
00082 void lu_ent_add(struct lu_ent *ent, const char *attr, const char *val);
00083 void lu_ent_clear(struct lu_ent *ent, const char *attr);
00084 void lu_ent_clear_all(struct lu_ent *ent);
00085 void lu_ent_del(struct lu_ent *ent, const char *attr, const char *val);
00086 GList *lu_ent_get_attributes(struct lu_ent *ent);
00087
00088 #endif