Google is committed to advancing racial equity for Black communities. See how.

nl::Weave::Profiles::TokenPairing::TokenPairingServer

#include <src/lib/profiles/token-pairing/TokenPairing.h>

Server object for responding to Token Pairing requests.

Summary

Inheritance

Inherits from: nl::Weave::WeaveServerBase

Constructors and Destructors

TokenPairingServer(void)

Protected attributes

mCertificateSent
bool
mCurClientOp
mDelegate

Public functions

Init(WeaveExchangeManager *exchangeMgr)
Initialize the Token Pairing Server state and register to receive Token Pairing messages.
SendStatusReport(uint32_t statusProfileId, uint16_t statusCode, WEAVE_ERROR sysError)
virtual WEAVE_ERROR
Send a status report response to a request.
SendTokenCertificateResponse(PacketBuffer *certificate)
SendTokenPairedResponse(PacketBuffer *tokenBundle)
SetDelegate(TokenPairingDelegate *delegate)
void
Set the delegate to process Device Control Server events.
Shutdown(void)
Shutdown the Token Pairing Server.

Protected attributes

mCertificateSent

bool mCertificateSent

mCurClientOp

ExchangeContext * mCurClientOp

mDelegate

TokenPairingDelegate * mDelegate

Public functions

Init

WEAVE_ERROR Init(
  WeaveExchangeManager *exchangeMgr
)

Initialize the Token Pairing Server state and register to receive Token Pairing messages.

param[in] exchangeMgr A pointer to the Weave Exchange Manager.

Details
Return Values
WEAVE_ERROR_INCORRECT_STATE
When a token pairing server has already been registered.
WEAVE_ERROR_TOO_MANY_UNSOLICITED_MESSAGE_HANDLERS
When too many unsolicited message handlers are registered.
WEAVE_NO_ERROR
On success.

SendStatusReport

virtual WEAVE_ERROR SendStatusReport(
  uint32_t statusProfileId,
  uint16_t statusCode,
  WEAVE_ERROR sysError
)

Send a status report response to a request.

Details
Parameters
[in] statusProfileId
The Weave profile ID this status report pertains to.
[in] statusCode
The status code to be included in this response.
[in] sysError
The system error code to be included in this response.
Return Values
WEAVE_ERROR_INCORRECT_STATE
If there is no request being processed.
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred preventing the status report from sending.

SendTokenCertificateResponse

WEAVE_ERROR SendTokenCertificateResponse(
  PacketBuffer *certificate
)

SendTokenPairedResponse

WEAVE_ERROR SendTokenPairedResponse(
  PacketBuffer *tokenBundle
)

SetDelegate

void SetDelegate(
  TokenPairingDelegate *delegate
)

Set the delegate to process Device Control Server events.

Details
Parameters
[in] delegate
A pointer to the Device Control Delegate.

Shutdown

WEAVE_ERROR Shutdown(
  void
)

Shutdown the Token Pairing Server.

Details
Return Values
WEAVE_NO_ERROR
unconditionally.

TokenPairingServer

 TokenPairingServer(
  void
)