/* 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 "calIWcapCalendar.idl"
#include "calIDateTime.idl"
#include "calIOperation.idl"

/**
 * WCAP session.
 */
[scriptable, uuid(477B4534-C297-40a1-ADF2-5A7E2A81816A)]
interface calIWcapSession : nsISupports
{
    /**
     * Setting this URI causes the session to logged out and disconnected.
     */
    attribute nsIURI uri;

    /**
     * User that has established this session.
     * @exception NS_ERROR_NOT_AVAILABLE if not logged in
     */
    readonly attribute string userId;

    /**
     * Determines whether the user is currentl logged in.
     * Does _not_ check whether the user's ticket has timed out!
     */
    readonly attribute boolean isLoggedIn;

    /**
     * Gets the default calendar instance of this session.
     */
    readonly attribute calIWcapCalendar defaultCalendar;
};

