CONZEPT 16 C++ API
|
User buffer to operate on users of a database. More...
#include "C16/User.hpp"
User buffer to operate on users of a database.
Classes | |
class | Logout |
Logout of a user from a database. More... | |
Public Member Functions | |
User (const Database &database) | |
Constructs a user buffer. More... | |
const Database & | database () const |
Gets the database the user buffer relates to. More... | |
bool | loaded () const |
Gets if a user is loaded into the user buffer. More... | |
unsigned int | id () const |
Gets the id of the loaded user. More... | |
unsigned int | number () const |
Gets the number of the loaded user. More... | |
const std::string & | name () const |
Gets the name of the loaded user. More... | |
const Value::Date & | login_date () const |
Gets the date of the login of the loaded user to the database. More... | |
const Value::Time & | login_time () const |
Gets the time of the login of the loaded user to the database. More... | |
long long int | login_duration () const |
Gets the duration since the login of the loaded user to the database in units of seconds. More... | |
const Value::Date & | last_request_date () const |
Gets the date of the last request of the loaded user to the database. More... | |
const Value::Time & | last_request_time () const |
Gets the time of the last request of the loaded user to the database. More... | |
long long int | last_request_duration () const |
Gets the duration since the last request of the loaded user to the database in units of seconds. More... | |
const std::string & | system_name () const |
Gets the name of the system of the loaded user. More... | |
const std::string & | system_hostname () const |
Gets the hostname of the system of the loaded user. More... | |
const std::string & | system_ip_address () const |
Gets the IP address of the system of the loaded user. More... | |
const std::string & | system_account_name () const |
Gets the name of the system account of the loaded user. More... | |
const std::string & | network_account_name () const |
Gets the name of the network account of the loaded user. More... | |
Result | read (unsigned int id, Place place=Place::KEY) |
Reads a user by means of a id into the user buffer. More... | |
Result | read (Place place) |
Reads a user by means of a place into the user buffer. More... | |
Result | reload () |
Reloads the loaded user. More... | |
void | unload () |
Unloads the loaded user. More... | |
Logout::Result | log_out (const std::string &server_password=std::string()) const |
Logs the loaded user out of the database. More... | |
|
explicit |
Constructs a user buffer.
database | Database the user buffer relates to |
bool C16::User::loaded | ( | ) | const |
Gets if a user is loaded into the user buffer.
unsigned int C16::User::id | ( | ) | const |
Gets the id of the loaded user.
unsigned int C16::User::number | ( | ) | const |
Gets the number of the loaded user.
const std::string& C16::User::name | ( | ) | const |
Gets the name of the loaded user.
const Value::Date& C16::User::login_date | ( | ) | const |
const Value::Time& C16::User::login_time | ( | ) | const |
long long int C16::User::login_duration | ( | ) | const |
Gets the duration since the login of the loaded user to the database in units of seconds.
const Value::Date& C16::User::last_request_date | ( | ) | const |
const Value::Time& C16::User::last_request_time | ( | ) | const |
long long int C16::User::last_request_duration | ( | ) | const |
Gets the duration since the last request of the loaded user to the database in units of seconds.
const std::string& C16::User::system_name | ( | ) | const |
Gets the name of the system of the loaded user.
const std::string& C16::User::system_hostname | ( | ) | const |
Gets the hostname of the system of the loaded user.
const std::string& C16::User::system_ip_address | ( | ) | const |
Gets the IP address of the system of the loaded user.
The IP address is represented by a string of the form <block>.<block>.<block>.<block>
, where the parts in angle brackets (<
... >
) contain the following data:
<block>
– Block of the IP address. An integer within an interval of 0 to 255. const std::string& C16::User::system_account_name | ( | ) | const |
Gets the name of the system account of the loaded user.
const std::string& C16::User::network_account_name | ( | ) | const |
Gets the name of the network account of the loaded user.
Result C16::User::read | ( | unsigned int | id, |
Place | place = Place::KEY |
||
) |
Reads a user by means of a id into the user buffer.
id | Reference id | ||||
place | Place of the user
|
Result::OK | User read and loaded. |
Result::NO_REC | User inexistent. No user loaded. |
Reads a user by means of a place into the user buffer.
place | Place of the user
|
Result::OK | User loaded. |
Result::NO_REC | User inexistent or not loaded. No user loaded. |
Result C16::User::reload | ( | ) |
Reloads the loaded user.
The user is identified by its id.
Result::OK | User read and loaded. |
Result::NO_REC | User inexistent or not loaded. No user loaded. |
void C16::User::unload | ( | ) |
Unloads the loaded user.
Logout::Result C16::User::log_out | ( | const std::string & | server_password = std::string() | ) | const |
Logs the loaded user out of the database.
server_password | Password of the server |