Class facade

Namespace: keychain

#include "keychain/cache/facade.hpp"

Inheritance: facade

Facade

Facade encapsulates the methods in common between persona and Contacts for use in methods in other classes that can take either class. These classes provide basic information about the related keychains such as the maturity (blockchain confirmation) level of the two keychains and the base URI.

The distinction between a persona and a contact is that a gateway creates a persona locally whereas a contact is created by another device.

The information from the methods is a static snapshot of the state of the persona or contact objects at the time the object was created.

Method Summary

Return type Method and Description

int

get_id()

Get the facade ID.

std::string

get_name()

Get the name attribute.

persona_status

get_status()

Get the blockchain status.

std::string

get_sub_name()

Get the subname attribute.

uri

get_uri()

Get the blockchain URI.

bool

is_null()

Null object pattern.


Methods

get_id() Method

int get_id();

Get the facade id. IDs are unique within each gateway instance.

Parameters

None

Returns

int

The id.




get_name() Method

std::string get_name();

Get the facade name, which is a local attribute initially associated with the facade at its creation time.

Parameters

None

Returns

string

The name.




get_status() Method

persona_status get_status();

Get the facade blockchain confirmation status.

Parameters

None

Returns

``

The status.




get_sub_name() Method

std::string get_sub_name();

Get the facade subname, which is a local attribute initially associated with the Facade at its creation time.

Parameters

None

Returns

int

The id.




get_uri() Method

Uri get_uri();

Get the facade URI.

Parameters

None

Returns

uri

The URI.




is_null() Method

bool is_null();

Whether the facade is NULL (NULL pattern).

Parameters

None

Returns

boolean

whether the facade is NULL.