eas25

package
v0.0.0-...-547b272 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2018 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SMTPHost = "127.0.0.1"
	SMTPPort = 25
)

Functions

func NewFactory

func NewFactory() activesync.Factory

Types

type Attach

type Attach struct {
	AttMethod   string
	AttSize     uint64
	DisplayName string
	AttName     string
}

type ChangedFolder

type ChangedFolder struct {
	Folder []uint64
}

type ClientChange

type ClientChange struct {
	// XMLName will have Add, Delete, Change, and Fetch in its Local name.
	XMLName         xml.Name
	ClientId        string
	ServerId        string
	ApplicationData Email
	Class           string
}

type Email

type Email struct {
	To           string
	Cc           string
	From         string
	Subject      string
	DateReceived string
	DisplayTo    string
	ThreadTopic  string
	Importance   string
	Read         string
	Attachments  struct {
		Attachment []Attach
	}
	MIMETruncated string
	MIMESize      uint64
	MIMEData      string
	BodyTruncated string
	BodySize      uint64
	Body          string
	MessageClass  string
	InternetCPID  string
}

type Folder

type Folder struct {
	ServerId    uint64
	ParentId    uint64
	DisplayName string
	Type        int
}

type FolderCreateReq

type FolderCreateReq struct {
	XMLName     xml.Name `xml:"FolderCreate"`
	SyncKey     uint64
	ParentId    uint64
	DisplayName string
	Type        int
}

func (*FolderCreateReq) FolderType

func (r *FolderCreateReq) FolderType() (backend.FolderType, error)

type FolderCreateResp

type FolderCreateResp struct {
	XMLName  xml.Name `xml:"FolderCreate"`
	NS       string   `xml:"xmlns,attr"`
	Status   int
	SyncKey  uint64 `xml:",omitempty"`
	ServerId uint64 `xml:",omitempty"`
}

type FolderDeleteResp

type FolderDeleteResp struct {
	XMLName xml.Name `xml:"FolderDelete"`
	NS      string   `xml:"xmlns,attr"`
	Status  int
	SyncKey uint64 `xml:",omitempty"`
}

type FolderOperation

type FolderOperation interface{} // One of FolderSyncAdd, FolderSyncDelete, and FolderSyncUpdate

type FolderSyncAdd

type FolderSyncAdd struct {
	XMLName xml.Name `xml:"Add"`
	Folder
}

type FolderSyncChange

type FolderSyncChange struct {
	Count      int
	Operations []FolderOperation
}

type FolderSyncDelete

type FolderSyncDelete struct {
	XMLName  xml.Name `xml:"Delete"`
	ServerId uint64
}

type FolderSyncResp

type FolderSyncResp struct {
	XMLName xml.Name `xml:"FolderSync"`
	NS      string   `xml:"xmlns,attr"`
	Status  int
	SyncKey uint64            `xml:",omitempty"`
	Changes *FolderSyncChange `xml:",omitempty"`
}

type FolderSyncUpdate

type FolderSyncUpdate struct {
	XMLName xml.Name `xml:"Update"`
	Folder
}

type FolderUpdateReq

type FolderUpdateReq struct {
	XMLName     xml.Name `xml:"FolderUpdate"`
	SyncKey     uint64
	ServerId    uint64
	ParentId    uint64
	DisplayName string
}

type FolderUpdateResp

type FolderUpdateResp struct {
	XMLName xml.Name `xml:"FolderUpdate"`
	NS      string   `xml:"xmlns,attr"`
	Status  int
	SyncKey uint64 `xml:",omitempty"`
}

type GetHierarchyResp

type GetHierarchyResp struct {
	// Folders is the top level element, not GetHierarchy.
	XMLName xml.Name `xml:"Folders"`
	NS      string   `xml:"xmlns,attr"`
	Folder  []Folder `xml:",omitempty"`
}

type MoveItem

type MoveItem struct {
	SrcMsgId string
	SrcFldId uint64
	DstFldId uint64
}

type MoveItemsResp

type MoveItemsResp struct {
	XMLName  xml.Name `xml:"MoveItems"`
	NS       string   `xml:"xmlns,attr"`
	Response []Response
}

type PingReq

type PingReq struct {
	XMLName           xml.Name `xml:"Ping"`
	HeartbeatInterval uint64
	Folders           struct {
		Folder []struct {
			Id    uint64
			Class string
		}
	}
}

type PingResp

type PingResp struct {
	XMLName           xml.Name `xml:"Ping"`
	NS                string   `xml:"xmlns,attr"`
	Status            int
	HeartbeatInterval uint           `xml:",omitempty"`
	MaxFolders        uint           `xml:",omitempty"`
	Folders           *ChangedFolder `xml:",omitempty"`
}

type Response

type Response struct {
	SrcMsgId string
	Status   int
	DstMsgId string `xml:",omitempty"`
}

type SyncCollection

type SyncCollection struct {
	Class          string
	SyncKey        uint64
	CollectionId   uint64
	DeletesAsMoves *string // boolean value, but we use string due to the self-closed tag.
	GetChanges     *string // boolean value, but we use string due to the self-closed tag.
	WindowSize     int     // Collection local window size
	Options        SyncOptions
	Commands       struct {
		// Some fields may be empty depending on its command type.
		Values []ClientChange `xml:",any"`
	}
}

func (*SyncCollection) HasDeletesAsMoves

func (r *SyncCollection) HasDeletesAsMoves() bool

func (*SyncCollection) HasGetChanges

func (r *SyncCollection) HasGetChanges() bool

type SyncOptions

type SyncOptions struct {
	// If the FilterType element is not present, the default value of 0 is used.
	FilterType string
	// No explanation in the specification if the MIMETruncation is not present.
	MIMETruncation string
	// If the MIMESupport element is not present, the default value of 0 is used.
	MIMESupport string
	// If the Truncation element is not present, the value of 9 is used.
	Truncation string
}

type SyncReq

type SyncReq struct {
	XMLName     xml.Name `xml:"Sync"`
	Collections struct {
		Collection []SyncCollection
	}
	WindowSize int // Global window size
}

func (*SyncReq) HasClientChanges

func (r *SyncReq) HasClientChanges() bool

func (*SyncReq) NumCollections

func (r *SyncReq) NumCollections() int

Jump to

Keyboard shortcuts

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