~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/js/src/xpconnect/sample/xpcsample1.idl

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 
2
 *
 
3
 * ***** BEGIN LICENSE BLOCK *****
 
4
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
5
 *
 
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/
 
10
 *
 
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
 
14
 * License.
 
15
 *
 
16
 * The Original Code is Mozilla Communicator client code, released
 
17
 * March 31, 1998.
 
18
 *
 
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.
 
23
 *
 
24
 * Contributor(s):
 
25
 *
 
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.
 
37
 *
 
38
 * ***** END LICENSE BLOCK ***** */
 
39
 
 
40
#include "nsISupports.idl"
 
41
 
 
42
// forward declare the below interfaces for clarity
 
43
interface nsIXPCSample_ClassA;
 
44
interface nsIXPCSample_ClassB;
 
45
interface nsIXPCSample_ClassC;
 
46
 
 
47
[scriptable, uuid(6bd0c120-c216-11d3-98c9-006008962422)]
 
48
interface nsIXPCSample_ClassA : nsISupports
 
49
{
 
50
    attribute PRInt32 someValue;
 
51
    readonly attribute nsIXPCSample_ClassB B;
 
52
};
 
53
 
 
54
[scriptable, uuid(c9c7bac0-c216-11d3-98c9-006008962422)]
 
55
interface nsIXPCSample_ClassB : nsISupports
 
56
{
 
57
    attribute PRInt32 someValue;
 
58
    readonly attribute nsIXPCSample_ClassC C;
 
59
};
 
60
 
 
61
[scriptable, uuid(df7bd080-c216-11d3-98c9-006008962422)]
 
62
interface nsIXPCSample_ClassC : nsISupports
 
63
{
 
64
    attribute PRInt32 someValue;
 
65
};
 
66
 
 
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
 
74
{
 
75
    void createSampleObjectAtGlobalScope(in string name, in PRInt32 value);
 
76
};
 
77
 
 
78
%{C++
 
79
#define NS_NSXPCSAMPLE_HOOKERUPPER_CONTRACTID "xpc.sample_hookerupper.1"
 
80
%}
 
81
 
 
82