Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

consider using MessagingService objects #79

@zolkis

Description

@zolkis

As noted on the Madrid F2F, the Messaging API could be simplified by using messaging service objects. A WebIDL fragment illustrating the idea:

Current way:

interface SmsManager : EventTarget {
    readonly    attribute MessageType  type;
    readonly    attribute DOMString[]  serviceIDs;
    SmsSegmentInfo segmentInfo (DOMString text, optional DOMString serviceID);
    Promise        send (DOMString to, DOMString text, optional DOMString serviceID);
    Promise        clear (DOMString serviceID);
                attribute EventHandler onreceived;
                attribute EventHandler onsent;
                attribute EventHandler ondeliverysuccess;
                attribute EventHandler ondeliveryfailure;
                attribute EventHandler onserviceadded;
                attribute EventHandler onserviceremoved;
};

A possible alternative:

interface SmsManager : EventTarget {
    readonly    attribute SmsService[] services;
    SmsSegmentInfo segmentInfo (DOMString text);
                attribute EventHandler onreceived;
                attribute EventHandler onsent;
                attribute EventHandler ondeliverysuccess;
                attribute EventHandler ondeliveryfailure;
                attribute EventHandler onserviceadded;
                attribute EventHandler onserviceremoved;
};

interface SmsService {
    readonly    attribute DOMString serviceId;
    readonly    attribute MessageType  type;
    Promise        send (DOMString to, DOMString text);
    Promise        clear ();
};

Similarly, the same could be done for MMS.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions