Closed Bug 337942 Opened 18 years ago Closed 18 years ago

Remove some unused interface functions in address book

Categories

(MailNews Core :: Address Book, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: standard8, Assigned: standard8)

Details

Attachments

(1 file, 1 obsolete file)

I've found the following interface functions that aren't used internally, and I can't see any real use externally either:

nsIAbDirectory::addMailListWithKey
nsIAddrDatabase::createMailListAndAddToDBWithKey

These aren't actually used anywhere, and from what I can tell never have been. Additionally I think its wrong as it exposes a back-end database thing (the key) to the front-end, and in this case is mork specific.

nsIAbDirectory::getValueForCard(in nsIAbCard card, in string name)
nsIAbDirectory::setValueForCard(in nsIAbCard card, in string name, in wstring value)

We have the nsIAbCard interface that will do this for us and the code that is there is mdb specific.
Attached patch Remove unused functions (obsolete) — Splinter Review
Simple patch to remove the unused functions as detailed in comment 0.
Attachment #221984 - Flags: superreview?(dmose)
Attachment #221984 - Flags: review?(dmose)
Note to self: nsIAddrDatabase::createNewCardAndAddToDBWithKey can also be removed.
Comment on attachment 221984 [details] [diff] [review]
Remove unused functions

I'm going to add the other function removal that I found to this patch before it gets reviewed...
Attachment #221984 - Attachment is obsolete: true
Attachment #221984 - Flags: superreview?(dmose)
Attachment #221984 - Flags: review?(dmose)
Revised patch adding in the removal of the other redundant function I found.
Attachment #222051 - Flags: superreview?(dmose)
Attachment #222051 - Flags: review?(dmose)
Comment on attachment 222051 [details] [diff] [review]
Remove unused functions v2

I'm guessing Dan is busy with calendar/lightning, so I'm switching reviews to David now he's back ;-)
Attachment #222051 - Flags: superreview?(dmose)
Attachment #222051 - Flags: superreview?(bienvenu)
Attachment #222051 - Flags: review?(dmose)
Attachment #222051 - Flags: review?(bienvenu)
Comment on attachment 222051 [details] [diff] [review]
Remove unused functions v2

do we know that no extensions used get/set value for card? I guess they can use the card directly...
Attachment #222051 - Flags: superreview?(bienvenu)
Attachment #222051 - Flags: superreview+
Attachment #222051 - Flags: review?(bienvenu)
Attachment #222051 - Flags: review+
(In reply to comment #6)
> (From update of attachment 222051 [details] [diff] [review] [edit])
> do we know that no extensions used get/set value for card? I guess they can use
> the card directly...
> 

I'm only putting this in for trunk onwards (not 1.8 branch) so extensions should have plenty of time to catch up. As they have the card to pass to the function, they should be able to just use the card straight off, I don't see any problems with that.
Patch checked in. That's all for now on this bug -> fixed.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: