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

/**
 * Interface that can be used on services that need to be started up and shut
 * down. The service needs to be registered within calStartupService.js, so this
 * is only useful from within calendar code. If you want calendar code to be
 * fully initialized, listen to "calendar-startup-done" via nsIObserverService.
 */
[scriptable, uuid(99d52094-37f9-4c81-9c55-32fbeb6a79cf)]
interface calIStartupService: nsISupports
{
    /**
     * Function called when the service should be started
     *
     * @param completeListener      The listener to call on startup completion.
     */
    void startup(in calIGenericOperationListener completeListener);

    /**
     * Function called when the service should be shut down.
     *
     * @param completeListener      The listener to call on shutdown completion.
     */
    void shutdown(in calIGenericOperationListener completeListener);
};
