Rename bloom_test_and_insert() to bloom_insert().
[adu.git] / user.h
diff --git a/user.h b/user.h
index 31f3a62155f7f6d0d1ab44ad088fed413ded3053..a6fbbf6381953140e2cac54464988917bd38aa07 100644 (file)
--- a/user.h
+++ b/user.h
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 2008 Andre Noll <maan@systemlinux.org>
+ *
+ * Licensed under the GPL v2. For licencing details see COPYING.
+ */
+
+/** \file user.h \brief User structures and exported symbols from user.c. */
+
 /** The columns of the id table. */
 enum user_table_columns {
        /** The numer of the directory. */
@@ -20,12 +28,6 @@ struct user_info {
        char *pw_name;
        /** The user table of this user.*/
        struct osl_table *table;
-       /** Total number of files owned by this user. */
-       uint64_t files;
-       /** Total number of bytes owned by this user. */
-       uint64_t bytes;
-       /** Total number of directories that contain at least one file */
-       uint64_t dirs;
        /** The description of the user table. */
        struct osl_table_description *desc;
 };
@@ -33,22 +35,15 @@ struct user_info {
 /** An opaque struct that contains info about which users are admissible. */
 struct uid_range;
 
-enum search_uid_flags {
-       OPEN_USER_TABLE = 1,
-       CREATE_USER_TABLE = 2,
-};
-int search_uid(uint32_t uid, struct uid_range *urs,
-               enum search_uid_flags flags, struct user_info **ui_ptr);
-
-int read_uid_file(struct uid_range *admissible_uids);
+int create_user_table(uint32_t uid, struct user_info **ui_ptr);
+int read_uid_file(void);
 int write_uid_file(void);
 
 void create_hash_table(unsigned bits);
-void sort_hash_table(int (*comp)(const void *, const void *));
-
 int for_each_admissible_user(int (*func)(struct user_info *, void *),
                void *data);
 int parse_uid_arg(const char *orig_arg, struct uid_range **ur);
 int append_users(char **users, int num_users,
                struct uid_range **admissible_uids, int num_uid_ranges);
 void close_user_tables(void);
+int open_admissible_user_tables(struct uid_range *admissible_uids);