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
;
9 import org
.whispersystems
.signalservice
.api
.util
.InvalidNumberException
;
11 import java
.io
.IOException
;
12 import java
.util
.List
;
14 public interface Signal
extends DBusInterface
{
16 void sendMessage(String message
, List
<String
> attachments
, String recipient
) throws EncapsulatedExceptions
, AttachmentInvalidException
, IOException
;
18 void sendMessage(String message
, List
<String
> attachments
, List
<String
> recipients
) throws EncapsulatedExceptions
, AttachmentInvalidException
, IOException
;
20 void sendEndSessionMessage(List
<String
> recipients
) throws IOException
, EncapsulatedExceptions
;
22 void sendGroupMessage(String message
, List
<String
> attachments
, byte[] groupId
) throws EncapsulatedExceptions
, GroupNotFoundException
, AttachmentInvalidException
, IOException
;
24 String
getContactName(String number
) throws InvalidNumberException
;
26 void setContactName(String number
, String name
) throws InvalidNumberException
;
28 List
<byte[]> getGroupIds();
30 String
getGroupName(byte[] groupId
);
32 List
<String
> getGroupMembers(byte[] groupId
);
34 byte[] updateGroup(byte[] groupId
, String name
, List
<String
> members
, String avatar
) throws IOException
, EncapsulatedExceptions
, GroupNotFoundException
, AttachmentInvalidException
;
36 boolean isRegistered();
38 class MessageReceived
extends DBusSignal
{
40 private long timestamp
;
41 private String sender
;
42 private byte[] groupId
;
43 private String message
;
44 private List
<String
> attachments
;
46 public MessageReceived(String objectpath
, long timestamp
, String sender
, byte[] groupId
, String message
, List
<String
> attachments
) throws DBusException
{
47 super(objectpath
, timestamp
, sender
, groupId
, message
, attachments
);
48 this.timestamp
= timestamp
;
50 this.groupId
= groupId
;
51 this.message
= message
;
52 this.attachments
= attachments
;
55 public long getTimestamp() {
59 public String
getSender() {
63 public byte[] getGroupId() {
67 public String
getMessage() {
71 public List
<String
> getAttachments() {
76 class ReceiptReceived
extends DBusSignal
{
78 private long timestamp
;
79 private String sender
;
81 public ReceiptReceived(String objectpath
, long timestamp
, String sender
) throws DBusException
{
82 super(objectpath
, timestamp
, sender
);
83 this.timestamp
= timestamp
;
87 public long getTimestamp() {
91 public String
getSender() {