Capability

Constructors

this
this()
Undocumented in source.
this
this(string str)
this
this(string key, string val)

Alias This

name

Members

Functions

isVendorSpecific
bool isVendorSpecific()

Indicates whether or not this is a vendor-specific capability.

toString
string toString()

Variables

isDisabled
bool isDisabled;

Indicates that the capability is being disabled

isSticky
bool isSticky;

DEPRECATED - indicates that the capability cannot be disabled

mustAck
bool mustAck;

DEPRECATED - indicates that the client must acknowledge this cap via CAP ACK

name
string name;
value
string value;

Examples

{
	auto cap = Capability("~account-notify");
	assert(cap.name == "account-notify");
	assert(cap.mustAck);
}
{
	auto cap = Capability("=account-notify");
	assert(cap.name == "account-notify");
	assert(cap.isSticky);
}
{
	auto cap = Capability("-account-notify");
	assert(cap.name == "account-notify");
	assert(cap.isDisabled);
}
{
	auto cap = Capability("example.com/cap");
	assert(cap.name == "example.com/cap");
	assert(cap.isVendorSpecific);
}
{
	auto cap = Capability("cap=value");
	assert(cap.name == "cap");
	assert(cap.value == "value");
}
{
	auto cap = Capability("cap=value/notvendor");
	assert(cap.name == "cap");
	assert(cap.value == "value/notvendor");
	assert(!cap.isVendorSpecific);
}

Meta