/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"

interface calIItipItem;
interface calIAttendee;
interface calIDateTime;

/**
 * calIItipTransport is a generic transport interface that is implemented
 * by transports (eg: email, XMPP, etc.) wishing to send calIItipItems
 */
[scriptable, uuid(be4aceee-63dc-11de-a8d5-95f255d89593)]
interface calIItipTransport : nsISupports
{
    /**
     * Scheme to be used to prefix attendees. For example, the Email transport
     * should return "mailto".
     */
    readonly attribute AUTF8String scheme;

    /**
     * Sending identity. This can be set to change the "sender" identity from
     * defaultIdentity above.
     */
    attribute AUTF8String senderAddress;

    /**
     * Type of the transport: email, xmpp, etc.
     */
    readonly attribute AUTF8String type;

    /**
     * Sends a calIItipItem to the recipients using the specified title and
     * alternative representation. If a calIItipItem is attached, then an ICS
     * representation of those objects are generated and attached to the email.
     * If the calIItipItem is null, then the item(s) is sent without any
     * text/calendar mime part.
     * @param count             size of recipient array
     * @param recipientArray    array of recipients
     * @param calIItipItem      set of calIItems encapsulated as calIItipItems
     */
    void sendItems(in PRUint32 count,
                   [array, size_is(count)] in calIAttendee recipientArray,
                   in calIItipItem item);
};
