supla-device
Loading...
Searching...
No Matches
src
supla
suplet
capability_registry.h
1
// SPDX-FileCopyrightText: AC SOFTWARE SP. Z O.O.
2
// SPDX-License-Identifier: GPL-2.0-or-later
3
4
#ifndef SRC_SUPLA_SUPLET_CAPABILITY_REGISTRY_H_
5
#define SRC_SUPLA_SUPLET_CAPABILITY_REGISTRY_H_
6
7
#include <stdint.h>
8
#include <supla/suplet/definition.h>
9
10
namespace
Supla {
11
namespace
Suplet {
12
13
class
CapabilityRegistry
{
14
public
:
15
~CapabilityRegistry
();
16
17
bool
add(
const
Capability
&capability);
18
void
clear();
19
20
uint8_t getCount()
const
;
21
bool
getCapability(uint8_t index,
Capability
*capability)
const
;
22
23
private
:
24
struct
Entry {
25
Capability
capability = {};
26
Entry *next =
nullptr
;
27
};
28
29
bool
contains(Category category, Kind kind, uint8_t handlerVersion)
const
;
30
31
Entry *first =
nullptr
;
32
};
33
34
}
// namespace Suplet
35
}
// namespace Supla
36
37
#endif
// SRC_SUPLA_SUPLET_CAPABILITY_REGISTRY_H_
Supla::Suplet::CapabilityRegistry
Definition
capability_registry.h:13
Supla::Suplet::Capability
Definition
definition.h:73
Generated by
1.12.0