Implement configuring of group link

This commit is contained in:
AsamK 2021-05-15 13:14:12 +02:00
parent 3de30e166f
commit 03589f858b
7 changed files with 121 additions and 5 deletions

View file

@ -0,0 +1,35 @@
package org.asamk.signal;
public enum GroupLinkState {
ENABLED {
@Override
public String toString() {
return "enabled";
}
},
ENABLED_WITH_APPROVAL {
@Override
public String toString() {
return "enabled-with-approval";
}
},
DISABLED {
@Override
public String toString() {
return "disabled";
}
};
public org.asamk.signal.manager.groups.GroupLinkState toLinkState() {
switch (this) {
case ENABLED:
return org.asamk.signal.manager.groups.GroupLinkState.ENABLED;
case ENABLED_WITH_APPROVAL:
return org.asamk.signal.manager.groups.GroupLinkState.ENABLED_WITH_APPROVAL;
case DISABLED:
return org.asamk.signal.manager.groups.GroupLinkState.DISABLED;
default:
throw new AssertionError();
}
}
}