Simple Geolocalization and Course Transmission Protocol (SGCTP)
|
#include <sgctp/principal.hpp>
Public Member Functions | |
CPrincipal () | |
~CPrincipal () | |
void | reset () |
Resets all parameters. More... | |
void | erasePassword () |
Erases the principal password (and nullifies memory) More... | |
void | setID (uint64_t _ui64tID) |
Sets the principal ID. More... | |
void | setPassword (const char *_pcPassword) |
Sets the principal password. More... | |
void | addPayloadType (uint8_t _ui8tPayloadType) |
Adds an allowed payload type. More... | |
uint64_t | getID () const |
Returns the principal ID. More... | |
const char * | getPassword () const |
Returns the principal password. More... | |
bool | hasPayloadTypes () const |
Returns whether payload types have been allowed. More... | |
bool | hasPayloadType (uint8_t _ui8tPayloadType) const |
Returns the allowed payload types. More... | |
int | read (const char *_pcPrincipalsPath, uint64_t _ui64tID) |
Retrieves the principal paremeters from the given file. More... | |
Static Public Attributes | |
static const uint16_t | MAX_PASSWORD_LENGTH = SGCTP_MAX_PASSWORD_LENGTH |
Maximum password length. More... | |
Private Attributes | |
uint64_t | ui64tID |
ID. More... | |
char | pcPassword [SGCTP_MAX_PASSWORD_SIZE] |
Password (max. 255 characters) More... | |
set< uint8_t > | ui8tPayloadType_set |
Allowed payload types. More... | |
SGCTP principal.
This class gathers the parameters and credentials specific to a SGCTP principal (client or agent).
Definition at line 44 of file principal.hpp.
|
inline |
Definition at line 73 of file principal.hpp.
|
inline |
Definition at line 77 of file principal.hpp.
void CPrincipal::reset | ( | ) |
Resets all parameters.
Definition at line 44 of file principal.cpp.
void CPrincipal::erasePassword | ( | ) |
Erases the principal password (and nullifies memory)
Definition at line 51 of file principal.cpp.
|
inline |
Sets the principal ID.
Definition at line 98 of file principal.hpp.
void CPrincipal::setPassword | ( | const char * | _pcPassword | ) |
Sets the principal password.
Definition at line 56 of file principal.cpp.
void CPrincipal::addPayloadType | ( | uint8_t | _ui8tPayloadType | ) |
Adds an allowed payload type.
Definition at line 66 of file principal.cpp.
|
inline |
Returns the principal ID.
Definition at line 113 of file principal.hpp.
|
inline |
Returns the principal password.
Definition at line 118 of file principal.hpp.
bool CPrincipal::hasPayloadTypes | ( | ) | const |
Returns whether payload types have been allowed.
Definition at line 75 of file principal.cpp.
bool CPrincipal::hasPayloadType | ( | uint8_t | _ui8tPayloadType | ) | const |
Returns the allowed payload types.
Definition at line 80 of file principal.cpp.
int CPrincipal::read | ( | const char * | _pcPrincipalsPath, |
uint64_t | _ui64tID | ||
) |
Retrieves the principal paremeters from the given file.
Definition at line 91 of file principal.cpp.
|
static |
Maximum password length.
Definition at line 53 of file principal.hpp.
|
private |
ID.
Definition at line 62 of file principal.hpp.
|
private |
Password (max. 255 characters)
Definition at line 64 of file principal.hpp.
|
private |
Allowed payload types.
Definition at line 66 of file principal.hpp.