Support copying message from file for EWS
Categories
(Thunderbird :: Account Manager, task)
Tracking
(Not tracked)
People
(Reporter: babolivier, Assigned: babolivier)
References
Details
Attachments
(3 files, 1 obsolete file)
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 2•2 years ago
|
||
| Assignee | ||
Comment 3•1 year ago
|
||
This experiment follows a few conversations we've had about moving
generic code outside of protocol-specific structures. It uses a
subset of copying from file on EWS as an example, as a feature that is
fairly straightforward and self-contained.
This patch introduces middle-man functions, that sit between services
and protocol-specific folder implementations. They are meant as central
call points that handle the generic parts of operations performed
on/with folders, and calls to the specific folder only to perform the
protocol-specific part of the operation (in this case, creating the
message onto the server).
In this example, the copy service calls onto NS_CopyMessageFile to
perform a copy from file into a specific folder. This functiontakes care
of preparing entries for the new message in the folder's message store
and database, through a Rust function exposed via FFI to parse the
message headers via the mail-parser crate, and populate the
nsIMsgDBHdr instance it's been given. It then passes the stream onto
the protocol-specific folder, which creates the message on the server
before handing back control to generic code (in the form of
CopyEndListener), which then commits the database and message store
entries.
In the future we might look into moving committing the new message
earlier, and marking it as pending until the server-side operation
succeeds (or rolling it back if it doesn't).
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 4•1 year ago
|
||
| Assignee | ||
Updated•1 year ago
|
Pushed by toby@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/2c5f6444d5b1
Vendor in latest changes from ews-rs. r=tobyp
| Assignee | ||
Updated•1 year ago
|
Pushed by toby@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/85b5d9bdab1f
Vendor in mail_parser. r=leftmostcat
https://hg.mozilla.org/comm-central/rev/67002292d228
Support copying messages from file for EWS. r=leftmostcat
Updated•1 year ago
|
Description
•