3 import org
.asamk
.signal
.AttachmentInvalidException
;
4 import org
.asamk
.signal
.GroupNotFoundException
;
5 import org
.freedesktop
.dbus
.DBusInterface
;
6 import org
.freedesktop
.dbus
.DBusSignal
;
7 import org
.freedesktop
.dbus
.exceptions
.DBusException
;
8 import org
.whispersystems
.signalservice
.api
.push
.exceptions
.EncapsulatedExceptions
;
10 import java
.io
.IOException
;
11 import java
.util
.List
;
13 public interface Signal
extends DBusInterface
{
15 void sendMessage(String message
, List
<String
> attachments
, String recipient
) throws EncapsulatedExceptions
, AttachmentInvalidException
, IOException
;
17 void sendMessage(String message
, List
<String
> attachments
, List
<String
> recipients
) throws EncapsulatedExceptions
, AttachmentInvalidException
, IOException
;
19 void sendEndSessionMessage(List
<String
> recipients
) throws IOException
, EncapsulatedExceptions
;
21 void sendGroupMessage(String message
, List
<String
> attachments
, byte[] groupId
) throws EncapsulatedExceptions
, GroupNotFoundException
, AttachmentInvalidException
, IOException
;
23 String
getContactName(String number
);
25 void setContactName(String number
, String name
);
27 List
<byte[]> getGroupIds();
29 String
getGroupName(byte[] groupId
);
31 List
<String
> getGroupMembers(byte[] groupId
);
33 byte[] updateGroup(byte[] groupId
, String name
, List
<String
> members
, String avatar
) throws IOException
, EncapsulatedExceptions
, GroupNotFoundException
, AttachmentInvalidException
;
35 boolean isRegistered();
37 class MessageReceived
extends DBusSignal
{
39 private long timestamp
;
40 private String sender
;
41 private byte[] groupId
;
42 private String message
;
43 private List
<String
> attachments
;
45 public MessageReceived(String objectpath
, long timestamp
, String sender
, byte[] groupId
, String message
, List
<String
> attachments
) throws DBusException
{
46 super(objectpath
, timestamp
, sender
, groupId
, message
, attachments
);
47 this.timestamp
= timestamp
;
49 this.groupId
= groupId
;
50 this.message
= message
;
51 this.attachments
= attachments
;
54 public long getTimestamp() {
58 public String
getSender() {
62 public byte[] getGroupId() {
66 public String
getMessage() {
70 public List
<String
> getAttachments() {
75 class ReceiptReceived
extends DBusSignal
{
77 private long timestamp
;
78 private String sender
;
80 public ReceiptReceived(String objectpath
, long timestamp
, String sender
) throws DBusException
{
81 super(objectpath
, timestamp
, sender
);
82 this.timestamp
= timestamp
;
86 public long getTimestamp() {
90 public String
getSender() {