Closed Bug 274966 Opened 20 years ago Closed 20 years ago

Need new attachment interface

Categories

(Calendar :: Internal Components, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: pavlov, Assigned: pavlov)

Details

Attachments

(2 files)

We need a new attachment interface that doesn't depend on mailnews.
Attached patch calIAttachment and friends — — Splinter Review
Here is a super simple interface/implementation for this.  The idea here is to
present ICS data blobs as data: urls in the interface and regular urls as
themselves.  We'll add support for more mac stuff as we need to.
Attached patch Full attachment support — — Splinter Review
So this patch should get all the attachment stuff working, but my nsArray
creation doesn't seem to work in calItemBase.. Can one of you take a look?
(In reply to comment #2)
> Created an attachment (id=168919) [edit]
> Full attachment support
> 
> So this patch should get all the attachment stuff working, but my nsArray
> creation doesn't seem to work in calItemBase.. Can one of you take a look?

Looks ok to me; is it ending up as null?  Or something else?  Is the getter for
.attachments correctly hooked up?  I'm still not happy with using a nsIArray
here, because we have no way of making it immutable when we need to do so...
Perhaps there needs to be a "MakeImmutable" method on nsI(Mutable?)Array that
effects the behavior of both QI and all relevant operations in nsMutableArray
that attempt to make changes?
(In reply to comment #4)
> Perhaps there needs to be a "MakeImmutable" method on nsI(Mutable?)Array that
> effects the behavior of both QI and all relevant operations in nsMutableArray
> that attempt to make changes?

Maybe, though nsIArray might be frozen -- however, we can always add a
nsIMutable mixin (attribute boolean isMutable; void makeImmutable();).  I think
nsIMutable would be the best way to go, and we can make our interfaces use it as
well.
This stuff is mostly in the tree now.  Marking fixed
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: