|
void | search (const std::vector< std::string > &deviceIds={}) |
| Start search for new devices.
|
|
NewDeviceList | getNewDevices () const |
| Get devices found in last search.
|
|
| ResourceList (std::shared_ptr< APICache > baseCache, const std::string &cacheEntry, std::chrono::steady_clock::duration refreshDuration, bool sharedState=false, const std::function< Resource(IdType, const nlohmann::json &, const std::shared_ptr< APICache > &)> &factory=nullptr) |
| Construct ResourceList using a base cache and optional factory function.
|
|
| ResourceList (const HueCommandAPI &commands, const std::string &path, std::chrono::steady_clock::duration refreshDuration, const std::function< Resource(IdType, const nlohmann::json &, const std::shared_ptr< APICache > &)> &factory=nullptr) |
| Construct ResourceList with a separate cache and optional factory function.
|
|
| ResourceList (const ResourceList &)=delete |
| Deleted copy constructor.
|
|
ResourceList & | operator= (const ResourceList &)=delete |
| Deleted copy assignment.
|
|
void | refresh () |
| Refreshes internal state now.
|
|
void | setRefreshDuration (std::chrono::steady_clock::duration refreshDuration) |
| Sets custom refresh interval for this list and all resources created.
|
|
std::vector< Resource > | getAll () |
| Get all resources that exist.
|
|
Resource | get (const IdType &id) |
| Get resource specified by id.
|
|
bool | exists (const IdType &id) |
| Checks whether resource with id exists.
|
|
bool | exists (const IdType &id) const |
| Checks whether resource with id exists.
|
|
bool | remove (const IdType &id) |
| Removes the resource.
|
|
template<typename Resource>
class hueplusplus::SearchableResourceList< Resource >
Handles a ResourceList of physical devices which can be searched for.
- Template Parameters
-
Resource | Resource type that is in the list |