00001
00002
00003
00004
00005
00006
00007 #ifndef _NMF_USER_H
00008 #define _NMF_USER_H
00009
00010
00011 #define NMF_USER_ROLE_ADMIN 1
00012 #define NMF_USER_ROLE_MANAGER 2
00013 #define NMF_USER_ROLE_VIEWER 3
00014
00015 typedef enum {
00016 NMF_USER_ADD,
00017 NMF_USER_DELETE,
00018 NMF_USER_CHANGE,
00019 NMF_USER_LIST
00020 } nmf_user_action_t;
00021
00022 #define NMF_USERNAME_LEN 32
00023 #define NMF_PASSWD_LEN 32
00024
00025 struct nmf_user {
00026 char name[NMF_USERNAME_LEN];
00027 char passwd[NMF_PASSWD_LEN];
00028 int role;
00029 };
00030
00031 nmf_status_t nmf_user_action(nmf_client_t client, int slot,
00032 nmf_user_action_t action, struct nmf_user *user);
00033 int nmf_get_user_priv(nmf_client_t client_id, int slot);
00034 int nmf_admin_present(void);
00035
00036
00037 #endif