Documentation
¶
Index ¶
- Constants
- type AttachmentFileBody
- type SMSAddress
- type SMSAttachment
- type SMSMessage
- type SMSMessagesPacket
- type SMSPlugin
- func (p *SMSPlugin) Handle(ctx context.Context, dev device.Sender, pkt *protocol.Packet) error
- func (p *SMSPlugin) IncomingTypes() []string
- func (p *SMSPlugin) Name() string
- func (p *SMSPlugin) OnConnect(dev device.Sender)
- func (p *SMSPlugin) OnDisconnect(dev device.Sender)
- func (p *SMSPlugin) OutgoingTypes() []string
- func (p *SMSPlugin) RequestAttachment(dev device.Sender, partID int64, uniqueIdentifier string) error
- func (p *SMSPlugin) RequestConversation(dev device.Sender, threadID int64, rangeStartTimestamp int64, ...) error
- func (p *SMSPlugin) RequestConversations(dev device.Sender) error
- func (p *SMSPlugin) SendSMS(dev device.Sender, phoneNumber, message string) error
- func (p *SMSPlugin) Timeout() time.Duration
Constants ¶
View Source
const ( PacketTypeSMSMessages = "kdeconnect.sms.messages" PacketTypeSMSRequest = "kdeconnect.sms.request" PacketTypeSMSRequestConvs = "kdeconnect.sms.request_conversations" PacketTypeSMSRequestConv = "kdeconnect.sms.request_conversation" PacketTypeSMSRequestAtt = "kdeconnect.sms.request_attachment" PacketTypeSMSAttachmentFile = "kdeconnect.sms.attachment_file" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttachmentFileBody ¶ added in v1.11.0
type SMSAddress ¶ added in v1.11.0
type SMSAddress struct {
Address string `json:"address"`
}
type SMSAttachment ¶ added in v1.11.0
type SMSMessage ¶ added in v1.11.0
type SMSMessage struct {
Event int `json:"event"`
Body string `json:"body"`
Addresses []SMSAddress `json:"addresses"`
Date int64 `json:"date"`
Type int `json:"type"`
ThreadID int64 `json:"thread_id"`
Read bool `json:"read"`
UID int64 `json:"u_id,omitempty"`
SubID int `json:"sub_id,omitempty"`
Attachments []SMSAttachment `json:"attachments,omitempty"`
}
type SMSMessagesPacket ¶ added in v1.11.0
type SMSMessagesPacket struct {
Version int `json:"version"`
Messages []SMSMessage `json:"messages"`
}
type SMSPlugin ¶
type SMSPlugin struct {
// contains filtered or unexported fields
}
SMSPlugin implements SMS sending, receiving, conversation browsing, and MMS attachment handling for KDE Connect.
func NewSMSPlugin ¶
func (*SMSPlugin) IncomingTypes ¶
func (*SMSPlugin) OnDisconnect ¶
func (*SMSPlugin) OutgoingTypes ¶
func (*SMSPlugin) RequestAttachment ¶ added in v1.11.0
func (p *SMSPlugin) RequestAttachment(dev device.Sender, partID int64, uniqueIdentifier string) error
RequestAttachment asks the phone to send an MMS attachment file.
func (*SMSPlugin) RequestConversation ¶ added in v1.11.0
func (p *SMSPlugin) RequestConversation(dev device.Sender, threadID int64, rangeStartTimestamp int64, numberToRequest int64) error
RequestConversation asks the phone for messages in a specific thread. Pass -1 for rangeStartTimestamp or numberToRequest for no limit.
func (*SMSPlugin) RequestConversations ¶ added in v1.11.0
RequestConversations asks the phone for a summary of all conversations.
Click to show internal directories.
Click to hide internal directories.