2021-07-05 05:44:58 +00:00
|
|
|
typedef struct Cart Cart;
|
|
|
|
typedef struct Realm Realm;
|
|
|
|
typedef struct UserInfo {
|
|
|
|
char name[32];
|
|
|
|
uvlong password;
|
|
|
|
Cart* cart;
|
|
|
|
Realm* realm;
|
2021-07-20 21:59:33 +00:00
|
|
|
char* scope;
|
|
|
|
int random;
|
2021-08-03 06:53:16 +00:00
|
|
|
int ctl_code;
|
2021-07-05 05:44:58 +00:00
|
|
|
} UserInfo;
|
2021-07-08 05:37:18 +00:00
|
|
|
|
2021-07-13 07:34:34 +00:00
|
|
|
UserInfo* find_user(UserInfo* table, char* uname);
|
2021-08-03 06:53:16 +00:00
|
|
|
int* ctl_code_handle(UserInfo* table, char* uname);
|
2021-07-21 06:27:40 +00:00
|
|
|
int login(UserInfo* table, char* uname, char* password);
|
|
|
|
int logout(UserInfo* table, char* uname);
|
|
|
|
int protect_realm(UserInfo* table, char* uname, char* password);
|
|
|
|
int transfer_realm(UserInfo* table, char* from, char* to);
|
2021-07-13 07:34:34 +00:00
|
|
|
int load_cart(UserInfo* table, char* uname, char* cart_name);
|
|
|
|
int enter_realm(UserInfo* table, char* uname, char* realm_name);
|
|
|
|
int leave_realm(UserInfo* table, char* uname);
|
|
|
|
int unload_cart(UserInfo* table, char* uname);
|
2021-08-03 06:53:16 +00:00
|
|
|
int delete_realm(UserInfo* table, char* uname, char* realm);
|