Rearrange data in sync records
Categories
(Thunderbird :: General, task)
Tracking
(Not tracked)
People
(Reporter: darktrojan, Assigned: darktrojan)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
When I first created the sync engines, I had them create records that stored almost all data under a prefs key. Thinking about it some more, and with different clients in mind, some data is essential for recreating the synced account/book/calendar/identity and should be in the top level of the record object. Optional things can remain in the prefs key and each client can decide what to do with it.
For example an account:
{
"id": "2c4ed593-414b-40de-ab77-5e81732ecdd9",
"username": "username",
"hostname": "new.hostname",
"type": "imap",
"prefs": {
"authMethod": 3,
"biffMinutes": 10,
"doBiff": true,
"downloadOnBiff": false,
"emptyTrashOnExit": false,
"incomingDuplicateAction": 0,
"limitOfflineMessageSize": false,
"loginAtStartUp": false,
"maxMessageSize": 50,
"port": 143,
"prettyName": "New IMAP Server",
"socketType": 0
}
}
would instead be:
{
"id": "2c4ed593-414b-40de-ab77-5e81732ecdd9",
"prettyName": "New IMAP Server",
// essential things
"type": "imap",
"hostname": "new.hostname",
"port": 143,
"socketType": 0,
"authMethod": 3,
"username": "username",
// optional things
"prefs": {
"biffMinutes": 10,
"doBiff": true,
"downloadOnBiff": false,
"emptyTrashOnExit": false,
"incomingDuplicateAction": 0,
"limitOfflineMessageSize": false,
"loginAtStartUp": false,
"maxMessageSize": 50
}
}
I also intend to rename some of the fields, e.g. use name consistently across all record types, and use strings instead of numeric constants for some fields, e.g. "alwaysSTARTTLS" instead of 2 (which is Ci.nsMsgSocketType.alwaysSTARTTLS on desktop but meaningless elsewhere).
| Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
Pushed by benc@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/b738286f6283
Rebuild sync engines and tests. r=mkmelin
| Assignee | ||
Comment 3•2 years ago
|
||
| Assignee | ||
Updated•2 years ago
|
Pushed by benc@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/4f734187ad1e
Document the sync record types and process for extending them. r=mkmelin
Description
•