1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
3
* ***** BEGIN LICENSE BLOCK *****
4
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
6
* The contents of this file are subject to the Mozilla Public License Version
7
* 1.1 (the "License"); you may not use this file except in compliance with
8
* the License. You may obtain a copy of the License at
9
* http://www.mozilla.org/MPL/
11
* Software distributed under the License is distributed on an "AS IS" basis,
12
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13
* for the specific language governing rights and limitations under the
16
* The Original Code is Mozilla Communicator client code, released
19
* The Initial Developer of the Original Code is
20
* Netscape Communications Corporation.
21
* Portions created by the Initial Developer are Copyright (C) 1999
22
* the Initial Developer. All Rights Reserved.
26
* Alternatively, the contents of this file may be used under the terms of
27
* either of the GNU General Public License Version 2 or later (the "GPL"),
28
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29
* in which case the provisions of the GPL or the LGPL are applicable instead
30
* of those above. If you wish to allow use of your version of this file only
31
* under the terms of either the GPL or the LGPL, and not to allow others to
32
* use your version of this file under the terms of the MPL, indicate your
33
* decision by deleting the provisions above and replace them with the notice
34
* and other provisions required by the GPL or the LGPL. If you do not delete
35
* the provisions above, a recipient may use your version of this file under
36
* the terms of any one of the MPL, the GPL or the LGPL.
38
* ***** END LICENSE BLOCK ***** */
40
#include "nsISupports.idl"
42
// forward declare the below interfaces for clarity
43
interface nsIXPCSample_ClassA;
44
interface nsIXPCSample_ClassB;
45
interface nsIXPCSample_ClassC;
47
[scriptable, uuid(6bd0c120-c216-11d3-98c9-006008962422)]
48
interface nsIXPCSample_ClassA : nsISupports
50
attribute PRInt32 someValue;
51
readonly attribute nsIXPCSample_ClassB B;
54
[scriptable, uuid(c9c7bac0-c216-11d3-98c9-006008962422)]
55
interface nsIXPCSample_ClassB : nsISupports
57
attribute PRInt32 someValue;
58
readonly attribute nsIXPCSample_ClassC C;
61
[scriptable, uuid(df7bd080-c216-11d3-98c9-006008962422)]
62
interface nsIXPCSample_ClassC : nsISupports
64
attribute PRInt32 someValue;
67
// This is an interace for a funky object that can create an instance of the
68
// chain above in the global scope of the currently running JSContext. One
69
// might more normally do this automatically as the JSContext is created
70
// (or the 'request' serviced), but here I wanted to be able to show this
71
// activity from within an xpcom component.
72
[scriptable, uuid(15794370-c217-11d3-98c9-006008962422)]
73
interface nsIXPCSample_HookerUpper : nsISupports
75
void createSampleObjectAtGlobalScope(in string name, in PRInt32 value);
79
#define NS_NSXPCSAMPLE_HOOKERUPPER_CONTRACTID "xpc.sample_hookerupper.1"