/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 *
 * The contents of this file are subject to the Netscape Public License
 * Version 1.0 (the "NPL"); you may not use this file except in
 * compliance with the NPL.  You may obtain a copy of the NPL at
 * http://www.mozilla.org/NPL/
 *
 * Software distributed under the NPL is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
 * for the specific language governing rights and limitations under the
 * NPL.
 *
 * The Initial Developer of this code under the NPL is Netscape
 * Communications Corporation.  Portions created by Netscape are
 * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
 * Reserved.
 */

#include "nsISupports.idl"
#include "xpcexception.idl"

[scriptable, uuid(4b62a640-d26c-11d2-9842-006008962422)]
interface nsIXPCInterfaces : nsISupports
{
};

[scriptable, uuid(978ff520-d26c-11d2-9842-006008962422)]
interface nsIXPCClasses : nsISupports
{
};

[scriptable, uuid(336a9590-4d19-11d3-9893-006008962422)]
interface nsIXPCClassesByID : nsISupports
{
};


[scriptable, uuid(42624f80-d26c-11d2-9842-006008962422)]
interface nsIXPCComponents : nsISupports
{
    readonly attribute nsIXPCInterfaces         interfaces;
    readonly attribute nsIXPCClasses            classes;
    readonly attribute nsIXPCClassesByID        classesByID;
    readonly attribute nsIJSStackFrameLocation  stack;

    /* 'lastResult' is accessable via JavaScript only */

    /* Some result codes are well known and defined by value in nsError.h.
     * Other codes will either have to be added by hand, at runtime (?), 
     * or otherwise declared in idl (somehow).
     */

    const long RESULT_NS_OK                           = 0;
    const long RESULT_NS_COMFALSE                     = 1;
    const long RESULT_NS_ERROR_NOT_IMPLEMENTED        = 0x80004001;
    const long RESULT_NS_NOINTERFACE                  = 0x80004002;
    const long RESULT_NS_ERROR_NO_INTERFACE           = RESULT_NS_NOINTERFACE;
    const long RESULT_NS_ERROR_INVALID_POINTER        = 0x80004003;
    const long RESULT_NS_ERROR_NULL_POINTER           = RESULT_NS_ERROR_INVALID_POINTER;
    const long RESULT_NS_ERROR_ABORT                  = 0x80004004;
    const long RESULT_NS_ERROR_FAILURE                = 0x80004005;
    const long RESULT_NS_ERROR_UNEXPECTED             = 0x8000ffff;
    const long RESULT_NS_ERROR_OUT_OF_MEMORY          = 0x8007000e;
    const long RESULT_NS_ERROR_ILLEGAL_VALUE          = 0x80070057;
    const long RESULT_NS_ERROR_INVALID_ARG            = RESULT_NS_ERROR_ILLEGAL_VALUE;
    const long RESULT_NS_ERROR_NO_AGGREGATION         = 0x80040110;
    const long RESULT_NS_ERROR_NOT_AVAILABLE          = 0x80040111;
    const long RESULT_NS_ERROR_FACTORY_NOT_REGISTERED = 0x80040154;
    const long RESULT_NS_ERROR_FACTORY_NOT_LOADED     = 0x800401f8;
};
