mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-02 20:40:38 +00:00
Dbus Identities and Trust
This commit is contained in:
parent
c62a1e829f
commit
5ee4b90c01
2 changed files with 174 additions and 0 deletions
|
@ -551,6 +551,48 @@ public interface Signal extends DBusInterface {
|
|||
void enableLink(boolean requiresApproval) throws Error.Failure;
|
||||
}
|
||||
|
||||
class StructIdentity extends Struct {
|
||||
|
||||
@Position(0)
|
||||
DBusPath objectPath;
|
||||
|
||||
@Position(1)
|
||||
String id;
|
||||
|
||||
@Position(2)
|
||||
String name;
|
||||
|
||||
public StructIdentity(final DBusPath objectPath, final String id, final String name) {
|
||||
this.objectPath = objectPath;
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public DBusPath getObjectPath() {
|
||||
return objectPath;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
@DBusProperty(name = "id", type = String.class, access = DBusProperty.Access.READ)
|
||||
@DBusProperty(name = "fingerprint", type = Byte[].class, access = DBusProperty.Access.READ)
|
||||
@DBusProperty(name = "safetyNumber", type = String.class, access = DBusProperty.Access.READ)
|
||||
@DBusProperty(name = "trustLevel", type = String.class, access = DBusProperty.Access.READ)
|
||||
@DBusProperty(name = "addedDate", type = Integer.class, access = DBusProperty.Access.READ)
|
||||
interface Identity extends DBusInterface, Properties {
|
||||
|
||||
void trust(String number) throws Error.Failure;
|
||||
|
||||
void trustWithKey(String number,String safetyNumber) throws Error.Failure;
|
||||
}
|
||||
|
||||
interface Error {
|
||||
|
||||
class AttachmentInvalid extends DBusExecutionException {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue