nl::Weave::Profiles::Vendor::Nestlabs::DropcamLegacyPairing

Summary

Enumerations

@277{
  kMsgType_CameraAuthDataRequest = 1,
  kMsgType_CameraAuthDataResponse = 2
}
enum
Dropcam Legacy Pairing Message Types.

Variables

CAMERA_AUTH_DATA_LEN = (EUI48_LEN + CAMERA_NONCE_LEN + CAMERA_HMAC_LEN)
const uint8_t
Length of binary camera auth data parameter before base64 string conversion.
CAMERA_HMAC_LEN = 4
const uint8_t
Number of camera auth data HMAC bytes appended to auth_data API parameter.
CAMERA_NONCE_LEN = 64
const uint8_t
Length in bytes of camera nonce string, excluding NULL terminator.
CAMERA_SECRET_LEN = 32
const uint8_t
Length of camera secret in bytes.
EUI48_LEN = 6
const uint8_t
Length in bytes of EUI-48 raw bytes representation.
EUI48_STR_LEN = 13
const uint8_t
Length in bytes of EUI-48 represented as string of 12 hex digits sans colon separators, plus NULL terminator.
HMAC_BUF_LEN = 32
const uint8_t
Constant for length in bytes of camera-generated pairing info HMAC, represented as raw bytes.
sDropcamLegacyPairingProfileStringContext = { NULL, sDropcamLegacyPairingProfileStringInfo }
Context for registering and deregistering callbacks associated with for returning human-readable support strings associated with the profile.
sDropcamLegacyPairingProfileStringInfo = { kWeaveProfile_DropcamLegacyPairing, GetDropcamLegacyPairingMessageName, GetDropcamLegacyPairingProfileName, NULL }
This structure provides storage for callbacks associated for returning human-readable support strings associated with the profile.

Functions

DecodeCameraAuthDataResponse(PacketBuffer *buf, uint8_t(&) macAddress[EUI48_LEN], uint8_t(&) hmac[HMAC_BUF_LEN])
Utility function to decode CameraAuthDataResponse message payload.
EncodeCameraAuthDataRequest(PacketBuffer *buf, const char *nonce)
Utility function to encode CameraAuthDataRequest message payload.
GetDropcamLegacyPairingMessageName(uint32_t inProfileId, uint8_t inMsgType)
const char *
Callback function that returns a human-readable NULL-terminated C string describing the message type associated with this profile.
GetDropcamLegacyPairingProfileName(uint32_t inProfileId)
const char *
Callback function that returns a human-readable NULL-terminated C string describing the profile with this profile.
_DropcamLegacyPairingProfileStringDestroy(void)
void
One time, yet reentrant, deinitializer for unregistering Weave Dropcam Legacy Pairing profile callbacks for returning human-readable support strings associated with the profile.
_DropcamLegacyPairingProfileStringInit(void)
void
One time, yet reentrant, initializer for registering Weave Dropcam Legacy Pairing profile callbacks for returning human-readable support strings associated with the profile.

Classes

nl::Weave::Profiles::Vendor::Nestlabs::DropcamLegacyPairing::DropcamLegacyPairingDelegate

Delegate class for implementing incoming Dropcam Legacy Pairing operations on the server device.

nl::Weave::Profiles::Vendor::Nestlabs::DropcamLegacyPairing::DropcamLegacyPairingServer

Server class for implementing the Dropcam Legacy Pairing profile.

Enumerations

@277

 @277

Dropcam Legacy Pairing Message Types.

Properties
kMsgType_CameraAuthDataRequest

Retrieve parameters for legacy Dropcam pairing web API call.

kMsgType_CameraAuthDataResponse

Contains parameters for legacy Dropcam pairing web API call.

Variables

CAMERA_AUTH_DATA_LEN

const uint8_t CAMERA_AUTH_DATA_LEN = (EUI48_LEN + CAMERA_NONCE_LEN + CAMERA_HMAC_LEN)

Length of binary camera auth data parameter before base64 string conversion.

CAMERA_HMAC_LEN

const uint8_t CAMERA_HMAC_LEN = 4

Number of camera auth data HMAC bytes appended to auth_data API parameter.

CAMERA_NONCE_LEN

const uint8_t CAMERA_NONCE_LEN = 64

Length in bytes of camera nonce string, excluding NULL terminator.

CAMERA_SECRET_LEN

const uint8_t CAMERA_SECRET_LEN = 32

Length of camera secret in bytes.

EUI48_LEN

const uint8_t EUI48_LEN = 6

Length in bytes of EUI-48 raw bytes representation.

EUI48_STR_LEN

const uint8_t EUI48_STR_LEN = 13

Length in bytes of EUI-48 represented as string of 12 hex digits sans colon separators, plus NULL terminator.

HMAC_BUF_LEN

const uint8_t HMAC_BUF_LEN = 32

Constant for length in bytes of camera-generated pairing info HMAC, represented as raw bytes.

sDropcamLegacyPairingProfileStringContext

Weave::Support::ProfileStringContext sDropcamLegacyPairingProfileStringContext = {
    NULL,
    sDropcamLegacyPairingProfileStringInfo
}

Context for registering and deregistering callbacks associated with for returning human-readable support strings associated with the profile.

sDropcamLegacyPairingProfileStringInfo

const Weave::Support::ProfileStringInfo sDropcamLegacyPairingProfileStringInfo = {
    kWeaveProfile_DropcamLegacyPairing,

    GetDropcamLegacyPairingMessageName,
    GetDropcamLegacyPairingProfileName,
    NULL
}

This structure provides storage for callbacks associated for returning human-readable support strings associated with the profile.

Functions

DecodeCameraAuthDataResponse

WEAVE_ERROR DecodeCameraAuthDataResponse(
  PacketBuffer *buf,
  uint8_t(&) macAddress[EUI48_LEN],
  uint8_t(&) hmac[HMAC_BUF_LEN]
)

Utility function to decode CameraAuthDataResponse message payload.

Details
Parameters
[in] buf
A pointer to the Camera Auth Data Response message payload buffer.
[in] macAddress
A byte array buffer for the camera's EUI-48 WiFi MAC address.
[in] hmac
A reference to the provided HMAC return buffer. HMAC returned as raw byte array which may contain non-ASCII/Unicode characters.
Return Values
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred preventing decoding of the message payload.

EncodeCameraAuthDataRequest

WEAVE_ERROR EncodeCameraAuthDataRequest(
  PacketBuffer *buf,
  const char *nonce
)

Utility function to encode CameraAuthDataRequest message payload.

Utility functions to encode and decode Dropcam Legacy Pairing profile message payloads.

Details
Parameters
[in] buf
A pointer to the Camera Auth Data Request message payload buffer.
[in] nonce
A pointer to the camera pairing nonce, formatted as a NULL-terminated UTF-8 string.
Return Values
WEAVE_NO_ERROR
On success.
other
Other Weave or platform-specific error codes indicating that an error occurred preventing encoding of the message payload.

GetDropcamLegacyPairingMessageName

const char * GetDropcamLegacyPairingMessageName(
  uint32_t inProfileId,
  uint8_t inMsgType
)

Callback function that returns a human-readable NULL-terminated C string describing the message type associated with this profile.

This callback, when registered, is invoked when a human-readable NULL-terminated C string is needed to describe the message type associated with this profile.

Details
Parameters
[in] inProfileId
The profile identifier associated with the specified message type.
[in] inMsgType
The message type for which a human-readable descriptive string is sought.
Returns
a pointer to the NULL-terminated C string if a match is found; otherwise, NULL.

GetDropcamLegacyPairingProfileName

const char * GetDropcamLegacyPairingProfileName(
  uint32_t inProfileId
)

Callback function that returns a human-readable NULL-terminated C string describing the profile with this profile.

This callback, when registered, is invoked when a human-readable NULL-terminated C string is needed to describe this profile.

Details
Parameters
[in] inProfileId
The profile identifier for which a human-readable descriptive string is sought.
Returns
a pointer to the NULL-terminated C string if a match is found; otherwise, NULL.

_DropcamLegacyPairingProfileStringDestroy

void _DropcamLegacyPairingProfileStringDestroy(
  void
)

One time, yet reentrant, deinitializer for unregistering Weave Dropcam Legacy Pairing profile callbacks for returning human-readable support strings associated with the profile.

_DropcamLegacyPairingProfileStringInit

void _DropcamLegacyPairingProfileStringInit(
  void
)

One time, yet reentrant, initializer for registering Weave Dropcam Legacy Pairing profile callbacks for returning human-readable support strings associated with the profile.