-
Notifications
You must be signed in to change notification settings - Fork 0
/
mobileCommon.go
74 lines (62 loc) · 3.03 KB
/
mobileCommon.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package connect
// DeviceStatus - Mobile device status.
type DeviceStatus string
const (
OK DeviceStatus = "OK" // no wipe
DeviceNotProvisioned DeviceStatus = "DeviceNotProvisioned" // not (fully) provisioned (yet)
DeviceWipeInitiated DeviceStatus = "DeviceWipeInitiated" // wipe process submitted
DeviceWipeInProgress DeviceStatus = "DeviceWipeInProgress" // wipe process in progress
DeviceWipeFinished DeviceStatus = "DeviceWipeFinished" // wipe process finished
DeviceConnected DeviceStatus = "DeviceConnected"
DeviceDisconnected DeviceStatus = "DeviceDisconnected"
)
// FolderIcon - Folder icon enumeration.
type FolderIcon string
const (
FIMail FolderIcon = "FIMail"
FIContact FolderIcon = "FIContact"
FICalendar FolderIcon = "FICalendar"
FITodo FolderIcon = "FITodo"
FIJournal FolderIcon = "FIJournal"
FINote FolderIcon = "FINote"
FIInbox FolderIcon = "FIInbox"
FIDeleted FolderIcon = "FIDeleted"
)
// SyncFolder - Synchronized folder.
type SyncFolder struct {
FolderName string `json:"folderName"` // folder name
FolderTypeIcon FolderIcon `json:"folderTypeIcon"` // mail,contact...
LastSyncDate DateTimeStamp `json:"lastSyncDate"` // date of last synchronization
LastSyncDateIso UtcDateTime `json:"lastSyncDateIso"` // date of last synchronization
}
type SyncFolderList []SyncFolder
// SyncMethod - Used synchronization method.
type SyncMethod string
const (
ServerWins SyncMethod = "ServerWins"
ClientWins SyncMethod = "ClientWins"
)
type ProtocolType string
const (
protocolASync ProtocolType = "protocolASync"
protocolKBC ProtocolType = "protocolKBC"
)
// MobileDevice - Mobile device properties.
type MobileDevice struct {
ProtocolType ProtocolType `json:"protocolType"`
DeviceId string `json:"deviceId"`
ProtocolVersion string `json:"protocolVersion"` // used ActiveSync protocol version
RegistrationDate DateTimeStamp `json:"registrationDate"` // date of registration
RegistrationDateIso UtcDateTime `json:"registrationDateIso"` // date of registration
LastSyncDate DateTimeStamp `json:"lastSyncDate"` // date of last synchronization
LastSyncDateIso UtcDateTime `json:"lastSyncDateIso"` // date of last synchronization
FolderList SyncFolderList `json:"folderList"` // list of synchronized folders
Status DeviceStatus `json:"status"` // wipe status
Method SyncMethod `json:"method"` // synchronization method
RemoteHost string `json:"remoteHost"` // typically IP address of device
Os string `json:"os"` // operating system - eg. Windows Mobile(R) 2003
Platform string `json:"platform"` // PocketPC
DeviceIcon string `json:"deviceIcon"` // Device icon Eg. 'pocketpc' or 'unknown'
}
// MobileDeviceList - List of mobile devices.
type MobileDeviceList []MobileDevice