summaryrefslogtreecommitdiffstats
path: root/common/rfb/CapsList.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/rfb/CapsList.h')
-rw-r--r--common/rfb/CapsList.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/rfb/CapsList.h b/common/rfb/CapsList.h
index b8fb8e85..a267e933 100644
--- a/common/rfb/CapsList.h
+++ b/common/rfb/CapsList.h
@@ -48,6 +48,11 @@ namespace rfb {
// Current number of capabilities in the list.
int getSize() const { return numEnabled(); }
+ // Does the list include nothing more than one particular capability?
+ bool includesOnly(rdr::U32 code) {
+ return (numEnabled() == 1 && getByOrder(0) == code);
+ }
+
// Add capability ("standard" vendor).
void addStandard(rdr::U32 code, const char *name);
// Add capability (TightVNC vendor).