signal

package
v0.0.0-...-5680a0f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SIGNAL_CLI_DBUS_SERVICE = "org.asamk.Signal"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Time        time.Time
	PhoneNumber string
	Text        string
	Attachments []string
}

func NewMessage

func NewMessage(t time.Time, phone, text string, attachments []string) *Message

type Signal

type Signal struct {
	Messages chan *Message
}

func NewSignal

func NewSignal() *Signal

func (*Signal) Listen

func (s *Signal) Listen()

Listen() establishes a connection to the DBus service and listens for incoming Signal messages.

func (*Signal) SendMessage

func (s *Signal) SendMessage(msg *Message) (err error)

SendMessage() uses the signal-cli command in dbus mode. This is due to the method org.asamk.Signal.sendMessage not working as expected when called using dbus.Object.Call(). TODO: further investigate using org.asamk.Signal.sendMessage method.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL