View Source HAP.ServiceSource protocol (HAP v0.6.0)

A protocol which allows for arbitrary service definitions to compile themselves into HAP.Service structs for use within HAP. This protocol allows HAP to expose pre-defined services such as HAP.Services.Lightbulb with fields reflecting the domain of the service, while allowing HAP to work internally with a service tree close to that defined in the HomeKit specification

Summary

Types

t()

All the types that implement this protocol.

Functions

Compile the given value into a HAP.Service struct

Types

@type t() :: term()

All the types that implement this protocol.

Functions

@spec compile(t()) :: HAP.Service.t()

Compile the given value into a HAP.Service struct