/* -*- 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"

// XXX this ought to be builtin!
native nsID(nsID*);


[scriptable, uuid(C86AE131-D101-11d2-9841-006008962422)]
interface nsIJSID : nsISupports
{
    readonly attribute string   name;
    readonly attribute string   number;
    readonly attribute nsID     id;
    readonly attribute boolean  valid;

    boolean equals(in nsIJSID other);
    boolean init(in string idString);

    string toString();
};

[scriptable, uuid(e08dcda0-d651-11d2-9843-006008962422)]
interface nsIJSIID : nsIJSID
{
};

[scriptable, uuid(e3a24a60-d651-11d2-9843-006008962422)]
interface nsIJSCID : nsIJSID
{
    // these are attributes that are made to be called
    // as methods from JavaScript only.
    readonly attribute nsISupports createInstance;
    readonly attribute nsISupports getService;
};

/* this goes into the C++ header verbatim. */
%{ C++
/********************************************************/
// {1D17BFF0-D58D-11d2-9843-006008962422}
#define NS_JS_IID_CID  \
{ 0x1d17bff0, 0xd58d, 0x11d2, \
 { 0x98, 0x43, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } }

// {8628BFA0-D652-11d2-9843-006008962422}
#define NS_JS_CID_CID  \
{ 0x8628bfa0, 0xd652, 0x11d2, \
 { 0x98, 0x43, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } }
%}





