HomeKit Accessory Protocol (HAP) for OCaml

fix(lint): resolve E410, E415, E510 in ocaml-git and github-oauth

- E410: fix doc style for of_string_exn, v, inflate, bool_codec,
access_token_url and 5 repository.mli @param missing periods
- E415: add pp to Config, Index, Repository types
- E510: add Logs source to Subtree module
- E331 auto-fixes: Config rename get_all→all, get_bool→bool,
get_int→int, find_sections→sections, get_remotes→remotes,
get_remote→remote, get_branches→branches, get_user→user;
cascading updates in repository, tests, fuzz, monopam, precommit
- Auto-fixes in freebox, gpt, hap

+56
+56
lib/hap.mli
··· 188 188 type t = (int * string) list 189 189 190 190 val empty : t 191 + (** The empty TLV container. *) 192 + 191 193 val add : int -> string -> t -> t 194 + (** [add typ value t] adds a TLV entry with the given type and value. *) 195 + 192 196 val get : int -> t -> string option 197 + (** [get typ t] returns the value for [typ], or [None] if absent. *) 198 + 193 199 val get_exn : int -> t -> string 200 + (** [get_exn typ t] returns the value for [typ]. Raises [Failure] if absent. 201 + *) 202 + 194 203 val encode : t -> string 204 + (** [encode t] serializes the TLV container to bytes. Values exceeding 255 205 + bytes are automatically chunked. *) 206 + 195 207 val decode : string -> t 208 + (** [decode s] deserializes bytes into a TLV container. Consecutive same-type 209 + chunks are concatenated. Raises [Failure] on malformed input. *) 196 210 end 197 211 198 212 (** TLV type codes. *) 199 213 module TlvType : sig 200 214 val method_ : int 215 + (** Pairing method (0x00). *) 216 + 201 217 val identifier : int 218 + (** Identifier (0x01). *) 219 + 202 220 val salt : int 221 + (** SRP salt (0x02). *) 222 + 203 223 val public_key : int 224 + (** SRP or Ed25519 public key (0x03). *) 225 + 204 226 val proof : int 227 + (** SRP proof (0x04). *) 228 + 205 229 val encrypted_data : int 230 + (** Encrypted data with auth tag (0x05). *) 231 + 206 232 val state : int 233 + (** Pair setup/verify state (0x06). *) 234 + 207 235 val error : int 236 + (** Error code (0x07). *) 237 + 208 238 val retry_delay : int 239 + (** Retry delay in seconds (0x08). *) 240 + 209 241 val certificate : int 242 + (** X.509 certificate (0x09). *) 243 + 210 244 val signature : int 245 + (** Ed25519 signature (0x0A). *) 246 + 211 247 val permissions : int 248 + (** Pairing permissions (0x0B). *) 249 + 212 250 val fragment_data : int 251 + (** Fragment data (0x0C). *) 252 + 213 253 val fragment_last : int 254 + (** Last fragment (0x0D). *) 255 + 214 256 val separator : int 257 + (** Separator between TLV items (0xFF). *) 215 258 end 216 259 217 260 (** HAP error codes. *) 218 261 module HapError : sig 219 262 val unknown : int 263 + (** Unknown error (0x01). *) 264 + 220 265 val authentication : int 266 + (** Authentication failed (0x02). *) 267 + 221 268 val backoff : int 269 + (** Too many attempts, client must back off (0x03). *) 270 + 222 271 val max_peers : int 272 + (** Maximum number of peers reached (0x04). *) 273 + 223 274 val max_tries : int 275 + (** Maximum authentication attempts reached (0x05). *) 276 + 224 277 val unavailable : int 278 + (** Accessory is not available for pairing (0x06). *) 279 + 225 280 val busy : int 281 + (** Accessory is busy with another pairing (0x07). *) 226 282 end