Add C++ shortcut URI accessor to nsIMsgFolder
Categories
(MailNews Core :: General, task)
Tracking
(Not tracked)
People
(Reporter: benc, Assigned: benc)
Details
Attachments
(1 file)
There are a lot of places in the C++ side which access the folder URI. But currently you need use GetURI()
to assign it to a string. Since URI must always be set (it's read only and set at folder creation time), it'd be nice to have a C++ shortcut to access it, something along the lines of nsIFile::HumanReadablePath()
.
So we can replace this kind of thing:
nsAutoCString uri;
rv = folder->GetURI(uri);
NS_ENSURE_SUCCESS(rv);
DoThingWithURI(uri);
with:
DoThingWithURI(folder->URI());
This is especially useful for debugging and logging code.
Assignee | ||
Updated•10 months ago
|
Assignee | ||
Comment 1•10 months ago
|
||
There's a generic nsIMsgFolder::URI() which is implemented in terms of GetURI().
This will work on non nsMsgDBFolder-based folders, even if they are written in JS or rust or whatever.
Then there's also an inline nsMsgDBFolder::URI() which the compiler can optimise for when the concrete type is availible to it.
Assignee | ||
Updated•10 months ago
|
Updated•10 months ago
|
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/ceccb46eba33
Add C++ shortcut URI accessor to nsIMsgFolder (and nsMsgDBFolder). r=mkmelin
Description
•