From b9c6792cd6123d9c6c0c30df75b0afe09258376f Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sat, 5 Dec 2015 15:50:07 +0100 Subject: m_cap Add Capability::GetCapValue(), list capabilities with values --- include/modules/cap.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/modules') diff --git a/include/modules/cap.h b/include/modules/cap.h index 1ad2ff2f1..e242720b5 100644 --- a/include/modules/cap.h +++ b/include/modules/cap.h @@ -25,6 +25,7 @@ namespace Cap { static const unsigned int MAX_CAPS = (sizeof(intptr_t) * 8) - 1; static const intptr_t CAP_302_BIT = (intptr_t)1 << MAX_CAPS; + static const unsigned int MAX_VALUE_LENGTH = 100; typedef intptr_t Ext; typedef LocalIntExt ExtItem; @@ -232,5 +233,14 @@ namespace Cap { return true; } + + /** Query the value of this capability for a user + * @param user User who will get the value of the capability + * @return Value to show to the user. If NULL, the capability has no value (default). + */ + virtual const std::string* GetValue(LocalUser* user) const + { + return NULL; + } }; } -- cgit v1.2.3