Documentation ¶
Overview ¶
Package smsbackuprestore implements a Timeliner data source for the Android SMS Backup & Restore app by SyncTech: https://synctech.com.au/sms-backup-restore/
Index ¶
- Constants
- type Address
- type Addresses
- type Client
- type CommonSMSandMMSFields
- type MMS
- func (m MMS) Class() timeliner.ItemClass
- func (m MMS) DataFileHash() []byte
- func (m MMS) DataFileMIMEType() *string
- func (m MMS) DataFileName() *string
- func (m MMS) DataFileReader() (io.ReadCloser, error)
- func (m MMS) DataText() (*string, error)
- func (m MMS) ID() string
- func (m MMS) Location() (*timeliner.Location, error)
- func (m MMS) Metadata() (*timeliner.Metadata, error)
- func (m MMS) Owner() (number *string, name *string)
- func (m MMS) Timestamp() time.Time
- type Part
- type Parts
- type SMS
- func (s SMS) Class() timeliner.ItemClass
- func (s SMS) DataFileHash() []byte
- func (s SMS) DataFileMIMEType() *string
- func (s SMS) DataFileName() *string
- func (s SMS) DataFileReader() (io.ReadCloser, error)
- func (s SMS) DataText() (*string, error)
- func (s SMS) ID() string
- func (s SMS) Location() (*timeliner.Location, error)
- func (s SMS) Metadata() (*timeliner.Metadata, error)
- func (s SMS) Owner() (number *string, name *string)
- func (s SMS) Timestamp() time.Time
- type Smses
Constants ¶
const ( DataSourceName = "SMS Backup & Restore" DataSourceID = "smsbackuprestore" )
Data source name and ID.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Text string `xml:",chardata"` Address string `xml:"address,attr"` Type int `xml:"type,attr"` // 151 = recipient, 137 = sender Charset string `xml:"charset,attr"` }
Address is a sender or recipient of the MMS.
type Client ¶
type Client struct { // DefaultRegion is the region to assume for phone // numbers that do not have an explicit country // calling code. This value should be the ISO // 3166-1 alpha-2 standard region code. DefaultRegion string // contains filtered or unexported fields }
Client implements the timeliner.Client interface.
type CommonSMSandMMSFields ¶
type CommonSMSandMMSFields struct { Text string `xml:",chardata"` Address string `xml:"address,attr"` Date int64 `xml:"date,attr"` // unix timestamp in milliseconds Read int `xml:"read,attr"` Locked int `xml:"locked,attr"` DateSent int64 `xml:"date_sent,attr"` // unix timestamp in (SMS: milliseconds, MMS: seconds) SubID int `xml:"sub_id,attr"` ReadableDate string `xml:"readable_date,attr"` // format: "Oct 20, 2017 12:35:30 PM" ContactName string `xml:"contact_name,attr"` // might be "(Unknown)" }
CommonSMSandMMSFields are the fields that both SMS and MMS share in common.
type MMS ¶
type MMS struct { CommonSMSandMMSFields Rr string `xml:"rr,attr"` Sub string `xml:"sub,attr"` CtT string `xml:"ct_t,attr"` ReadStatus string `xml:"read_status,attr"` Seen string `xml:"seen,attr"` MsgBox string `xml:"msg_box,attr"` SubCs string `xml:"sub_cs,attr"` RespSt string `xml:"resp_st,attr"` RetrSt string `xml:"retr_st,attr"` DTm string `xml:"d_tm,attr"` TextOnly string `xml:"text_only,attr"` Exp string `xml:"exp,attr"` MID string `xml:"m_id,attr"` St string `xml:"st,attr"` RetrTxtCs string `xml:"retr_txt_cs,attr"` RetrTxt string `xml:"retr_txt,attr"` Creator string `xml:"creator,attr"` MSize string `xml:"m_size,attr"` RptA string `xml:"rpt_a,attr"` CtCls string `xml:"ct_cls,attr"` Pri string `xml:"pri,attr"` TrID string `xml:"tr_id,attr"` RespTxt string `xml:"resp_txt,attr"` CtL string `xml:"ct_l,attr"` MCls string `xml:"m_cls,attr"` DRpt string `xml:"d_rpt,attr"` V string `xml:"v,attr"` MType string `xml:"m_type,attr"` Parts Parts `xml:"parts"` Addrs Addresses `xml:"addrs"` // contains filtered or unexported fields }
MMS represents a multimedia message.
func (MMS) DataFileMIMEType ¶
DataFileMIMEType returns the MIME type, if any.
func (MMS) DataFileName ¶
DataFileName returns the name of the file, if any.
func (MMS) DataFileReader ¶
func (m MMS) DataFileReader() (io.ReadCloser, error)
DataFileReader returns the data file reader, if any.
type Part ¶
type Part struct { Text string `xml:",chardata"` Seq int `xml:"seq,attr"` ContentType string `xml:"ct,attr"` Name string `xml:"name,attr"` Charset string `xml:"chset,attr"` Cd string `xml:"cd,attr"` Fn string `xml:"fn,attr"` Cid string `xml:"cid,attr"` Filename string `xml:"cl,attr"` CttS string `xml:"ctt_s,attr"` CttT string `xml:"ctt_t,attr"` AttrText string `xml:"text,attr"` Data string `xml:"data,attr"` }
Part is a part of an MMS.
type SMS ¶
type SMS struct { CommonSMSandMMSFields Protocol int `xml:"protocol,attr"` Type int `xml:"type,attr"` // 1 = received, 2 = sent Subject string `xml:"subject,attr"` Body string `xml:"body,attr"` Toa string `xml:"toa,attr"` ScToa string `xml:"sc_toa,attr"` ServiceCenter string `xml:"service_center,attr"` Status int `xml:"status,attr"` // contains filtered or unexported fields }
SMS represents a simple text message.
func (SMS) DataFileReader ¶
func (s SMS) DataFileReader() (io.ReadCloser, error)
DataFileReader returns nil.
func (SMS) ID ¶
ID returns a unique ID for this text message. Because text messages do not have IDs, an ID is constructed by concatenating the millisecond timestamp of the message with a fast hash of the message body.
type Smses ¶
type Smses struct { XMLName xml.Name `xml:"smses"` Text string `xml:",chardata"` Count int `xml:"count,attr"` BackupSet string `xml:"backup_set,attr"` // UUID BackupDate int64 `xml:"backup_date,attr"` // unix timestamp in milliseconds SMS []SMS `xml:"sms"` MMS []MMS `xml:"mms"` }
Smses was generated 2019-07-10 using an export from SMS Backup & Restore v10.05.602 (previous versions have a bug with emoji encodings).