aboutsummaryrefslogtreecommitdiff
path: root/src/component_manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/component_manager.h')
-rw-r--r--src/component_manager.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/component_manager.h b/src/component_manager.h
index cea5569..1a3d05f 100644
--- a/src/component_manager.h
+++ b/src/component_manager.h
@@ -154,9 +154,14 @@ class ComponentManager {
const std::string& command_name) const = 0;
// Checks the minimum required user role for a given command.
- virtual bool GetMinimalRole(const std::string& command_name,
- UserRole* minimal_role,
- ErrorPtr* error) const = 0;
+ virtual bool GetCommandMinimalRole(const std::string& command_name,
+ UserRole* minimal_role,
+ ErrorPtr* error) const = 0;
+
+ // Checks the minimum required user role for a given state property.
+ virtual bool GetStateMinimalRole(const std::string& state_property_name,
+ UserRole* minimal_role,
+ ErrorPtr* error) const = 0;
// Returns the full JSON dictionary containing trait definitions.
virtual const base::DictionaryValue& GetTraits() const = 0;
@@ -164,6 +169,11 @@ class ComponentManager {
// Returns the full JSON dictionary containing component instances.
virtual const base::DictionaryValue& GetComponents() const = 0;
+ // Returns a JSON dictionary containing component instances with state
+ // properties visible to a user of the given |role|.
+ virtual std::unique_ptr<base::DictionaryValue> GetComponentsForUserRole(
+ UserRole role) const = 0;
+
// Component state manipulation methods.
virtual bool SetStateProperties(const std::string& component_path,
const base::DictionaryValue& dict,