Facade encapsulating OS specific user functionality. More...
Typedefs | |
| typedef uid_t | UserID |
Functions | |
| String | getEffectiveUserId () |
| Get the effective user id. | |
| String | getCurrentUserName () |
| String | getUserName (UserID uid, bool &success) |
| If the username is invalid, or if getUserName() fails for any other reason, 'success' will be set to false. | |
| UserID | getUserId (const String &userName, bool &validUserName) |
| Convert a textual username into a platform native user type. | |
Variables | |
| const UserID | INVALID_USERID = UserID(~0) |
Facade encapsulating OS specific user functionality.
| typedef uid_t BLOCXX_NAMESPACE::UserUtils::UserID |
Definition at line 56 of file UserUtils.hpp.
| BLOCXX_COMMON_API String BLOCXX_NAMESPACE::UserUtils::getCurrentUserName | ( | ) |
| BLOCXX_COMMON_API String BLOCXX_NAMESPACE::UserUtils::getEffectiveUserId | ( | ) |
Get the effective user id.
On POSIX platforms this calls geteuid().
| BLOCXX_COMMON_API UserID BLOCXX_NAMESPACE::UserUtils::getUserId | ( | const String & | userName, | |
| bool & | validUserName | |||
| ) |
Convert a textual username into a platform native user type.
| userName | The user name to convert. | |
| validUserName | Out param set to true if the conversion was successful, false otherwise. |
| BLOCXX_COMMON_API String BLOCXX_NAMESPACE::UserUtils::getUserName | ( | UserID | uid, | |
| bool & | success | |||
| ) |
If the username is invalid, or if getUserName() fails for any other reason, 'success' will be set to false.
On success, 'success' is set to true.
| const UserID BLOCXX_NAMESPACE::UserUtils::INVALID_USERID = UserID(~0) |
Definition at line 57 of file UserUtils.hpp.
1.6.3