/* 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 "calICalendar.idl"

interface calIGoogleSession;
interface nsIURI;

[scriptable, uuid(d1a6e988-4b4d-45a5-ba46-43e501ea96e3)]
interface calIGoogleCalendar : calICalendar
{
    /**
     * attribute googleCalendarName
     * Google's Calendar name. This represents the <calendar name> in
     * http://www.google.com/calendar/feeds/<calendar name>/private/full
     */
    readonly attribute AUTF8String googleCalendarName;

    /**
     * attribute isDefaultCalendar
     * If true, this is the users default calendar. Non-default calendars have
     * a calendar name that contains "@group.calendar.google.com"
     */
    readonly attribute boolean isDefaultCalendar;

    /**
     * While calICalendar::uri returns the uri set by the user, fullUri returns
     * Google's "full" feed.
     *
     * XXX This will go away once the provider implements a custom add calendar
     * wizard, since uri will always be set to the full uri in that case.
     */
    attribute nsIURI fullUri;

    /**
     * The username used to access the calendar. Changing this sets the session
     * to a calIGoogleSession object with the given username.
     */
    attribute AUTF8String googleUser;

    /**
     * The session object associated with this calendar. Set this by changing
     * the googleUser attribute.
     */
    readonly attribute calIGoogleSession session;

    /**
     * The calender title as provided by Google. This information is cached.
     */
    attribute AUTF8String title;

    /**
     * The access level that was set in Google's calendar UI. This information
     * is cached.
     */
    attribute AUTF8String access;

    /**
     * If set, the calendar is "selected" in the Google Calendar UI.
     */
    attribute boolean selected;

    /**
     * If set, the calendar is hidden from the Google Calendar UI. It is still
     * visible when managing calendars though.
     */
    attribute boolean hidden;

    /**
     * The color that was set in Google's calendar UI. This information is
     * cached.
     */
    attribute AUTF8String color;

    /**
     * The timezone that was set in Google's calendar UI. This information is
     * cached.
     */
    attribute AUTF8String timezone;
};
