AG_User provides a cross-platform method for accessing information about user accounts.
Different backends may be implemented (see
INTERNAL API below).
Agar provides the following backends:
agUserOps_dummy | No-op, returns no useful information.
| agUserOps_getenv | Use the
USER, UID, EUID, HOME and (optional)
TMPDIR environment variables.
Only
USER can be queried.
| agUserOps_posix | On Unix, use
getpwent(3) or
getpwnam_r(3). Since accessing the password database incurs startup overhead, "getenv" is
the actual default unless the
AG_POSIX_USERS flag is passed to
AG_InitCore(3). | agUserOps_win32 | On Windows, use CSIDL to locate a preferred
AppData directory, and return it in the
home field.
Also return the preferred temporary directory in the
tmp field.
Other fields will contain no useful data.
| agUserOps_xbox | On the Xbox console, check which drives are mounted and use
either T:\\ or D:\\ as home.
|
|