diff options
| author | 2015-12-05 15:50:07 +0100 | |
|---|---|---|
| committer | 2015-12-05 15:50:07 +0100 | |
| commit | b9c6792cd6123d9c6c0c30df75b0afe09258376f (patch) | |
| tree | e59e4ae5e01b8538c0395d06c2d9138f8590a25e /include/modules/cap.h | |
| parent | m_cap Reject CAP CLEAR from clients newer than 3.1 (diff) | |
m_cap Add Capability::GetCapValue(), list capabilities with values
Diffstat (limited to 'include/modules/cap.h')
| -rw-r--r-- | include/modules/cap.h | 10 |
1 files changed, 10 insertions, 0 deletions
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; + } }; } |
