Member values
Member name | Data type | Description |
---|---|---|
user_handle | UserProfileHandle | User profile handle, or set to zero if no user logged in |
connection_information | string | Connection info (e.g. IP address with port number) |
connection_identifier | uint32 | Connection identifier |
Member functions
Function name | Return type | Input type | Description |
---|---|---|---|
has_user_handle() const | bool | void | Returns true if user_handle is set. |
user_handle() | const UserProfileHandle& | void | Returns the current value of user_handle. If user_handle is not set, returns a UserProfileHandle with none of its fields set (possibly user_handle::default_instance()). |
mutable_user_handle() | UserProfileHandle * | void | Returns a pointer to the mutable UserProfileHandle object that stores the field's value. If the field was not set prior to the call, then the returned UserProfileHandle will have none of its fields set (i.e. it will be identical to a newly-allocated UserProfileHandle). After calling this, has_user_handle() will return true and user_handle() will return a reference to the same instance of UserProfileHandle. |
clear_user_handle() | void | void | Clears the value of the field. After calling this, has_user_handle() will return false and user_handle() will return the default value. |
set_allocated_user_handle() | void | UserProfileHandle * | Sets the UserProfileHandle object to the field and frees the previous field value if it exists. If the UserProfileHandle pointer is not NULL, the message takes ownership of the allocated UserProfileHandle object and has_ UserProfileHandle() will return true. Otherwise, if the user_handle is NULL, the behavior is the same as calling clear_user_handle(). |
release_user_handle() | UserProfileHandle * | void | Releases the ownership of the field and returns the pointer of the UserProfileHandle object. After calling this, caller takes the ownership of the allocated UserProfileHandle object, has_user_handle() will return false, and user_handle() will return the default value. |
connection_information() | const string& | void | Returns the current value of connection_information. If connection_information is not set, returns the empty string/empty bytes. |
set_connection_information() | void | const string& | Sets the value of connection_information. After calling this, connection_information() will return a copy of value. |
set_connection_information() | void | string&& | (C++11 and beyond): Sets the value of connection_information, moving from the passed string. After calling this, connection_information() will return a copy of value. |
set_connection_information() | void | const char* | Sets the value of connection_information using a C-style null-terminated string. After calling this, connection_information() will return a copy of value. |
mutable_connection_information() | string * | void | Returns a pointer to the mutable string object that stores connection_information's value. If the field was not set prior to the call, then the returned string will be empty. After calling this, connection_information() will return whatever value is written into the given string. |
clear_connection_information() | void | void | Clears the value of connection_information. After calling this, connection_information() will return the empty string/empty bytes. |
set_allocated_connection_information() | void | string* | Sets the string object to the field and frees the previous field value if it exists. If the string pointer is not NULL, the message takes ownership of the allocated string object. The message is free to delete the allocated string object at any time, so references to the object may be invalidated. Otherwise, if the value is NULL, the behavior is the same as calling clear_connection_information(). |
release_connection_information() | string * | void | Releases the ownership of connection_information and returns the pointer of the string object. After calling this, caller takes the ownership of the allocated string object and connection_information() will return the empty string/empty bytes. |
connection_identifier() | uint32 | void | Returns the current value of connection_identifier. If the connection_identifier is not set, returns 0. |
set_connection_identifier() | void | uint32 | Sets the value of connection_identifier. After calling this, connection_identifier() will return value. |
clear_connection_identifier() | void | void | Clears the value of connection_identifier. After calling this, connection_identifier() will return 0. |
Parent topic: Common (C++)