1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
---|
2 | /* ***** BEGIN LICENSE BLOCK ***** |
---|
3 | * Version: NPL 1.1/GPL 2.0/LGPL 2.1 |
---|
4 | * |
---|
5 | * The contents of this file are subject to the Netscape Public License |
---|
6 | * Version 1.1 (the "License"); you may not use this file except in |
---|
7 | * compliance with the License. You may obtain a copy of the License at |
---|
8 | * http://www.mozilla.org/NPL/ |
---|
9 | * |
---|
10 | * Software distributed under the License is distributed on an "AS IS" basis, |
---|
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
---|
12 | * for the specific language governing rights and limitations under the |
---|
13 | * License. |
---|
14 | * |
---|
15 | * The Original Code is mozilla.org code. |
---|
16 | * |
---|
17 | * The Initial Developer of the Original Code is |
---|
18 | * Netscape Communications Corporation. |
---|
19 | * Portions created by the Initial Developer are Copyright (C) 1998 |
---|
20 | * the Initial Developer. All Rights Reserved. |
---|
21 | * |
---|
22 | * Contributor(s): |
---|
23 | * |
---|
24 | * Alternatively, the contents of this file may be used under the terms of |
---|
25 | * either the GNU General Public License Version 2 or later (the "GPL"), or |
---|
26 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), |
---|
27 | * in which case the provisions of the GPL or the LGPL are applicable instead |
---|
28 | * of those above. If you wish to allow use of your version of this file only |
---|
29 | * under the terms of either the GPL or the LGPL, and not to allow others to |
---|
30 | * use your version of this file under the terms of the NPL, indicate your |
---|
31 | * decision by deleting the provisions above and replace them with the notice |
---|
32 | * and other provisions required by the GPL or the LGPL. If you do not delete |
---|
33 | * the provisions above, a recipient may use your version of this file under |
---|
34 | * the terms of any one of the NPL, the GPL or the LGPL. |
---|
35 | * |
---|
36 | * ***** END LICENSE BLOCK ***** */ |
---|
37 | /* AUTO-GENERATED. DO NOT EDIT!!! */ |
---|
38 | |
---|
39 | #ifndef nsIDOMInstallVersion_h__ |
---|
40 | #define nsIDOMInstallVersion_h__ |
---|
41 | |
---|
42 | #include "nsISupports.h" |
---|
43 | #include "nsString.h" |
---|
44 | #include "nsIScriptContext.h" |
---|
45 | |
---|
46 | class nsIDOMInstallVersion; |
---|
47 | |
---|
48 | #define NS_IDOMINSTALLVERSION_IID \ |
---|
49 | { 0x18c2f986, 0xb09f, 0x11d2, \ |
---|
50 | {0xbc, 0xde, 0x00, 0x80, 0x5f, 0x0e, 0x13, 0x53}} |
---|
51 | |
---|
52 | class nsIDOMInstallVersion : public nsISupports { |
---|
53 | public: |
---|
54 | NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMINSTALLVERSION_IID) |
---|
55 | enum { |
---|
56 | EQUAL = 0, |
---|
57 | BLD_DIFF = 1, |
---|
58 | BLD_DIFF_MINUS = -1, |
---|
59 | REL_DIFF = 2, |
---|
60 | REL_DIFF_MINUS = -2, |
---|
61 | MINOR_DIFF = 3, |
---|
62 | MINOR_DIFF_MINUS = -3, |
---|
63 | MAJOR_DIFF = 4, |
---|
64 | MAJOR_DIFF_MINUS = -4 |
---|
65 | }; |
---|
66 | |
---|
67 | NS_IMETHOD GetMajor(PRInt32* aMajor)=0; |
---|
68 | NS_IMETHOD SetMajor(PRInt32 aMajor)=0; |
---|
69 | |
---|
70 | NS_IMETHOD GetMinor(PRInt32* aMinor)=0; |
---|
71 | NS_IMETHOD SetMinor(PRInt32 aMinor)=0; |
---|
72 | |
---|
73 | NS_IMETHOD GetRelease(PRInt32* aRelease)=0; |
---|
74 | NS_IMETHOD SetRelease(PRInt32 aRelease)=0; |
---|
75 | |
---|
76 | NS_IMETHOD GetBuild(PRInt32* aBuild)=0; |
---|
77 | NS_IMETHOD SetBuild(PRInt32 aBuild)=0; |
---|
78 | |
---|
79 | NS_IMETHOD Init(const nsString& aVersionString)=0; |
---|
80 | |
---|
81 | NS_IMETHOD ToString(nsString& aReturn)=0; |
---|
82 | |
---|
83 | NS_IMETHOD CompareTo(nsIDOMInstallVersion* aVersionObject, PRInt32* aReturn)=0; |
---|
84 | NS_IMETHOD CompareTo(const nsString& aString, PRInt32* aReturn)=0; |
---|
85 | NS_IMETHOD CompareTo(PRInt32 aMajor, PRInt32 aMinor, PRInt32 aRelease, PRInt32 aBuild, PRInt32* aReturn)=0; |
---|
86 | }; |
---|
87 | |
---|
88 | |
---|
89 | #define NS_DECL_IDOMINSTALLVERSION \ |
---|
90 | NS_IMETHOD GetMajor(PRInt32* aMajor); \ |
---|
91 | NS_IMETHOD SetMajor(PRInt32 aMajor); \ |
---|
92 | NS_IMETHOD GetMinor(PRInt32* aMinor); \ |
---|
93 | NS_IMETHOD SetMinor(PRInt32 aMinor); \ |
---|
94 | NS_IMETHOD GetRelease(PRInt32* aRelease); \ |
---|
95 | NS_IMETHOD SetRelease(PRInt32 aRelease); \ |
---|
96 | NS_IMETHOD GetBuild(PRInt32* aBuild); \ |
---|
97 | NS_IMETHOD SetBuild(PRInt32 aBuild); \ |
---|
98 | NS_IMETHOD Init(const nsString& aVersionString); \ |
---|
99 | NS_IMETHOD ToString(nsString& aReturn); \ |
---|
100 | NS_IMETHOD CompareTo(nsIDOMInstallVersion* aVersionObject, PRInt32* aReturn); \ |
---|
101 | NS_IMETHOD CompareTo(const nsString& aString, PRInt32* aReturn); \ |
---|
102 | NS_IMETHOD CompareTo(PRInt32 aMajor, PRInt32 aMinor, PRInt32 aRelease, PRInt32 aBuild, PRInt32* aReturn); \ |
---|
103 | |
---|
104 | |
---|
105 | |
---|
106 | #define NS_FORWARD_IDOMINSTALLVERSION(_to) \ |
---|
107 | NS_IMETHOD GetMajor(PRInt32* aMajor) { return _to##GetMajor(aMajor); } \ |
---|
108 | NS_IMETHOD SetMajor(PRInt32 aMajor) { return _to##SetMajor(aMajor); } \ |
---|
109 | NS_IMETHOD GetMinor(PRInt32* aMinor) { return _to##GetMinor(aMinor); } \ |
---|
110 | NS_IMETHOD SetMinor(PRInt32 aMinor) { return _to##SetMinor(aMinor); } \ |
---|
111 | NS_IMETHOD GetRelease(PRInt32* aRelease) { return _to##GetRelease(aRelease); } \ |
---|
112 | NS_IMETHOD SetRelease(PRInt32 aRelease) { return _to##SetRelease(aRelease); } \ |
---|
113 | NS_IMETHOD GetBuild(PRInt32* aBuild) { return _to##GetBuild(aBuild); } \ |
---|
114 | NS_IMETHOD SetBuild(PRInt32 aBuild) { return _to##SetBuild(aBuild); } \ |
---|
115 | NS_IMETHOD Init(const nsString& aVersionString) { return _to##Init(aVersionString); } \ |
---|
116 | NS_IMETHOD ToString(nsString& aReturn) { return _to##ToString(aReturn); } \ |
---|
117 | NS_IMETHOD CompareTo(nsIDOMInstallVersion* aVersionObject, PRInt32* aReturn) { return _to##CompareTo(aVersionObject, aReturn); } \ |
---|
118 | NS_IMETHOD CompareTo(const nsString& aString, PRInt32* aReturn) { return _to##CompareTo(aString, aReturn); } \ |
---|
119 | NS_IMETHOD CompareTo(PRInt32 aMajor, PRInt32 aMinor, PRInt32 aRelease, PRInt32 aBuild, PRInt32* aReturn) { return _to##CompareTo(aMajor, aMinor, aRelease, aBuild, aReturn); } \ |
---|
120 | |
---|
121 | |
---|
122 | extern nsresult NS_InitInstallVersionClass(nsIScriptContext *aContext, void **aPrototype); |
---|
123 | |
---|
124 | extern "C" nsresult NS_NewScriptInstallVersion(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn); |
---|
125 | |
---|
126 | #endif // nsIDOMInstallVersion_h__ |
---|