Documentation ¶
Index ¶
- Variables
- func GroupUpdateMsg(tels []string, title string) string
- func ReadQr(img image.Image)
- func RunBackend()
- func SendMessage(s *store.Session, m *store.Message)
- func SendMessageHelper(to, message, file string) error
- func SendMessageLoop(to, message string, group bool, att io.Reader, flags int) uint64
- func SendUnsentMessages()
- type Card
- type GroupRecord
- type Notification
- type NotificationHandler
- type PushMessage
- type TextsecureAPI
- func (Api *TextsecureAPI) AddContact(name string, phone string)
- func (Api *TextsecureAPI) AddDevice() error
- func (Api *TextsecureAPI) ContactsImported(path string)
- func (Api *TextsecureAPI) DeleteMessage(msg *store.Message, tel string)
- func (Api *TextsecureAPI) DeleteSession(tel string)
- func (Api *TextsecureAPI) EndSession(tel string) error
- func (Api *TextsecureAPI) FilterContacts(sub string)
- func (Api *TextsecureAPI) FilterSessions(sub string)
- func (Api *TextsecureAPI) GetActiveSessionID() string
- func (Api *TextsecureAPI) GetAvatarImage(id string) string
- func (Api *TextsecureAPI) GroupInfo(hexid string) string
- func (Api *TextsecureAPI) IdentityInfo(id string) string
- func (Api *TextsecureAPI) LeaveChat()
- func (Api *TextsecureAPI) LeaveGroup(hexid string) error
- func (Api *TextsecureAPI) MarkSessionsRead(tel string)
- func (Api *TextsecureAPI) NewGroup(name string, members string) error
- func (Api *TextsecureAPI) RefreshDevices() error
- func (Api *TextsecureAPI) SaveSettings() error
- func (Api *TextsecureAPI) SendAttachmentToApi(to, message string, file string) error
- func (Api *TextsecureAPI) SendContactAttachment(to, message string, file string) error
- func (Api *TextsecureAPI) SendMessage(to, message string) error
- func (Api *TextsecureAPI) SetActiveSessionID(sId string)
- func (Api *TextsecureAPI) SetLogLevel()
- func (Api *TextsecureAPI) StartAfterDecryption()
- func (Api *TextsecureAPI) SubmitDebugLog() (string, error)
- func (Api *TextsecureAPI) Test()
- func (Api *TextsecureAPI) TgNotification(notification bool)
- func (Api *TextsecureAPI) UnlinkDevice(id int) error
- func (Api *TextsecureAPI) Unregister()
- func (Api *TextsecureAPI) UpdateGroup(hexid, name string, members string) error
- type VariantMap
Constants ¶
This section is empty.
Variables ¶
View Source
var Api = &TextsecureAPI{}
Functions ¶
func GroupUpdateMsg ¶
func RunBackend ¶
func RunBackend()
func SendMessageHelper ¶ added in v0.6.2
func SendMessageLoop ¶ added in v0.6.2
func SendUnsentMessages ¶ added in v0.6.2
func SendUnsentMessages()
Types ¶
type Card ¶ added in v0.6.2
type Card struct { // Summary is a required title. The card will not be presented if this is missing. Summary string `json:"summary"` // Body is the longer text. Body string `json:"body,omitempty"` // Whether to show a bubble. Users can disable this, and can easily miss // them, so don’t rely on it exclusively. Popup bool `json:"popup,omitempty"` // Actions provides actions for the bubble's snap decissions. Actions []string `json:"actions,omitempty"` // Icon is a path to an icon to display with the notification bubble. // Icon string `json:"icon,omitempty"` // Whether to show in notification centre. Persist bool `json:"persist,omitempty"` Tag string `json:"tag,omitempty"` Timestamp int64 `json:"timestamp"` }
Card is part of a notification and represents the user visible hints for a specific notification.
type GroupRecord ¶
type Notification ¶ added in v0.6.2
type Notification struct { Card *Card `json:"card,omitempty"` RawSound json.RawMessage `json:"sound"` RawVibration json.RawMessage `json:"vibrate"` }
Notification (optional) describes the user-facing notifications triggered by this push message.
type NotificationHandler ¶ added in v0.6.2
type NotificationHandler struct {
// contains filtered or unexported fields
}
var (
Nh *NotificationHandler
)
func NewLegacyHandler ¶ added in v0.6.2
func NewLegacyHandler(conn *dbus.Connection, application string) *NotificationHandler
func (*NotificationHandler) NewStandardPushMessage ¶ added in v0.6.2
func (n *NotificationHandler) NewStandardPushMessage(summary, body, icon string) *PushMessage
NewStandardPushMessage creates a base Notification with common components (members) setup.
func (*NotificationHandler) Send ¶ added in v0.6.2
func (n *NotificationHandler) Send(m *PushMessage) error
type PushMessage ¶ added in v0.6.2
type PushMessage struct { // Notification (optional) describes the user-facing notifications // triggered by this push message. Notification Notification `json:"notification,omitempty"` Message string `json:"message,omitempty"` }
PushMessage represents a data structure to be sent over to the Post Office. It consists of a Notification and a Message.
type TextsecureAPI ¶
type TextsecureAPI struct { HasContacts bool PushToken string ActiveSessionID string PhoneNumber string LogLevel bool }
func (*TextsecureAPI) AddContact ¶
func (Api *TextsecureAPI) AddContact(name string, phone string)
func (*TextsecureAPI) AddDevice ¶
func (Api *TextsecureAPI) AddDevice() error
func (*TextsecureAPI) ContactsImported ¶
func (Api *TextsecureAPI) ContactsImported(path string)
func (*TextsecureAPI) DeleteMessage ¶
func (Api *TextsecureAPI) DeleteMessage(msg *store.Message, tel string)
func (*TextsecureAPI) DeleteSession ¶
func (Api *TextsecureAPI) DeleteSession(tel string)
func (*TextsecureAPI) EndSession ¶
func (Api *TextsecureAPI) EndSession(tel string) error
func (*TextsecureAPI) FilterContacts ¶
func (Api *TextsecureAPI) FilterContacts(sub string)
func (*TextsecureAPI) FilterSessions ¶
func (Api *TextsecureAPI) FilterSessions(sub string)
func (*TextsecureAPI) GetActiveSessionID ¶
func (Api *TextsecureAPI) GetActiveSessionID() string
func (*TextsecureAPI) GetAvatarImage ¶
func (Api *TextsecureAPI) GetAvatarImage(id string) string
func (*TextsecureAPI) GroupInfo ¶
func (Api *TextsecureAPI) GroupInfo(hexid string) string
func (*TextsecureAPI) IdentityInfo ¶
func (Api *TextsecureAPI) IdentityInfo(id string) string
get identitys
func (*TextsecureAPI) LeaveChat ¶
func (Api *TextsecureAPI) LeaveChat()
func (*TextsecureAPI) LeaveGroup ¶
func (Api *TextsecureAPI) LeaveGroup(hexid string) error
func (*TextsecureAPI) MarkSessionsRead ¶
func (Api *TextsecureAPI) MarkSessionsRead(tel string)
MarkSessionsRead marks one or all sessions as read
func (*TextsecureAPI) NewGroup ¶
func (Api *TextsecureAPI) NewGroup(name string, members string) error
FIXME: receive members as splice, blocked by https://github.com/nanu-c/qml-go/issues/137
func (*TextsecureAPI) RefreshDevices ¶
func (Api *TextsecureAPI) RefreshDevices() error
func (*TextsecureAPI) SaveSettings ¶
func (Api *TextsecureAPI) SaveSettings() error
func (*TextsecureAPI) SendAttachmentToApi ¶
func (Api *TextsecureAPI) SendAttachmentToApi(to, message string, file string) error
func (*TextsecureAPI) SendContactAttachment ¶
func (Api *TextsecureAPI) SendContactAttachment(to, message string, file string) error
func (*TextsecureAPI) SendMessage ¶
func (Api *TextsecureAPI) SendMessage(to, message string) error
func (*TextsecureAPI) SetActiveSessionID ¶
func (Api *TextsecureAPI) SetActiveSessionID(sId string)
func (*TextsecureAPI) SetLogLevel ¶
func (Api *TextsecureAPI) SetLogLevel()
func (*TextsecureAPI) StartAfterDecryption ¶
func (Api *TextsecureAPI) StartAfterDecryption()
func (*TextsecureAPI) SubmitDebugLog ¶
func (Api *TextsecureAPI) SubmitDebugLog() (string, error)
func (*TextsecureAPI) Test ¶
func (Api *TextsecureAPI) Test()
func (*TextsecureAPI) TgNotification ¶
func (Api *TextsecureAPI) TgNotification(notification bool)
func (*TextsecureAPI) UnlinkDevice ¶
func (Api *TextsecureAPI) UnlinkDevice(id int) error
func (*TextsecureAPI) UpdateGroup ¶
func (Api *TextsecureAPI) UpdateGroup(hexid, name string, members string) error
type VariantMap ¶ added in v0.6.2
type VariantMap map[string]dbus.Variant
Click to show internal directories.
Click to hide internal directories.