Back to index

lightning-sunbird  0.9+nobinonly
nsIDOMInstallVersion.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either of the GNU General Public License Version 2 or later (the "GPL"),
00026  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 /* AUTO-GENERATED. DO NOT EDIT!!! */
00038 
00039 #ifndef nsIDOMInstallVersion_h__
00040 #define nsIDOMInstallVersion_h__
00041 
00042 #include "nsISupports.h"
00043 #include "nsString.h"
00044 #include "nsIScriptContext.h"
00045 
00046 class nsIDOMInstallVersion;
00047 
00048 #define NS_IDOMINSTALLVERSION_IID \
00049  { 0x18c2f986, 0xb09f, 0x11d2, \
00050   {0xbc, 0xde, 0x00, 0x80, 0x5f, 0x0e, 0x13, 0x53}} 
00051 
00052 class nsIDOMInstallVersion : public nsISupports {
00053 public:
00054   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOMINSTALLVERSION_IID)
00055   enum {
00056     EQUAL = 0,
00057     BLD_DIFF = 1,
00058     BLD_DIFF_MINUS = -1,
00059     REL_DIFF = 2,
00060     REL_DIFF_MINUS = -2,
00061     MINOR_DIFF = 3,
00062     MINOR_DIFF_MINUS = -3,
00063     MAJOR_DIFF = 4,
00064     MAJOR_DIFF_MINUS = -4
00065   };
00066 
00067   NS_IMETHOD    GetMajor(PRInt32* aMajor)=0;
00068   NS_IMETHOD    SetMajor(PRInt32 aMajor)=0;
00069 
00070   NS_IMETHOD    GetMinor(PRInt32* aMinor)=0;
00071   NS_IMETHOD    SetMinor(PRInt32 aMinor)=0;
00072 
00073   NS_IMETHOD    GetRelease(PRInt32* aRelease)=0;
00074   NS_IMETHOD    SetRelease(PRInt32 aRelease)=0;
00075 
00076   NS_IMETHOD    GetBuild(PRInt32* aBuild)=0;
00077   NS_IMETHOD    SetBuild(PRInt32 aBuild)=0;
00078 
00079   NS_IMETHOD    Init(const nsString& aVersionString)=0;
00080 
00081   NS_IMETHOD    ToString(nsString& aReturn)=0;
00082 
00083   NS_IMETHOD    CompareTo(nsIDOMInstallVersion* aVersionObject, PRInt32* aReturn)=0;
00084   NS_IMETHOD    CompareTo(const nsString& aString, PRInt32* aReturn)=0;
00085   NS_IMETHOD    CompareTo(PRInt32 aMajor, PRInt32 aMinor, PRInt32 aRelease, PRInt32 aBuild, PRInt32* aReturn)=0;
00086 };
00087 
00088 
00089 #define NS_DECL_IDOMINSTALLVERSION   \
00090   NS_IMETHOD    GetMajor(PRInt32* aMajor);  \
00091   NS_IMETHOD    SetMajor(PRInt32 aMajor);  \
00092   NS_IMETHOD    GetMinor(PRInt32* aMinor);  \
00093   NS_IMETHOD    SetMinor(PRInt32 aMinor);  \
00094   NS_IMETHOD    GetRelease(PRInt32* aRelease);  \
00095   NS_IMETHOD    SetRelease(PRInt32 aRelease);  \
00096   NS_IMETHOD    GetBuild(PRInt32* aBuild);  \
00097   NS_IMETHOD    SetBuild(PRInt32 aBuild);  \
00098   NS_IMETHOD    Init(const nsString& aVersionString);  \
00099   NS_IMETHOD    ToString(nsString& aReturn);  \
00100   NS_IMETHOD    CompareTo(nsIDOMInstallVersion* aVersionObject, PRInt32* aReturn);  \
00101   NS_IMETHOD    CompareTo(const nsString& aString, PRInt32* aReturn);  \
00102   NS_IMETHOD    CompareTo(PRInt32 aMajor, PRInt32 aMinor, PRInt32 aRelease, PRInt32 aBuild, PRInt32* aReturn);  \
00103 
00104 
00105 
00106 #define NS_FORWARD_IDOMINSTALLVERSION(_to)  \
00107   NS_IMETHOD    GetMajor(PRInt32* aMajor) { return _to##GetMajor(aMajor); } \
00108   NS_IMETHOD    SetMajor(PRInt32 aMajor) { return _to##SetMajor(aMajor); } \
00109   NS_IMETHOD    GetMinor(PRInt32* aMinor) { return _to##GetMinor(aMinor); } \
00110   NS_IMETHOD    SetMinor(PRInt32 aMinor) { return _to##SetMinor(aMinor); } \
00111   NS_IMETHOD    GetRelease(PRInt32* aRelease) { return _to##GetRelease(aRelease); } \
00112   NS_IMETHOD    SetRelease(PRInt32 aRelease) { return _to##SetRelease(aRelease); } \
00113   NS_IMETHOD    GetBuild(PRInt32* aBuild) { return _to##GetBuild(aBuild); } \
00114   NS_IMETHOD    SetBuild(PRInt32 aBuild) { return _to##SetBuild(aBuild); } \
00115   NS_IMETHOD    Init(const nsString& aVersionString) { return _to##Init(aVersionString); }  \
00116   NS_IMETHOD    ToString(nsString& aReturn) { return _to##ToString(aReturn); }  \
00117   NS_IMETHOD    CompareTo(nsIDOMInstallVersion* aVersionObject, PRInt32* aReturn) { return _to##CompareTo(aVersionObject, aReturn); }  \
00118   NS_IMETHOD    CompareTo(const nsString& aString, PRInt32* aReturn) { return _to##CompareTo(aString, aReturn); }  \
00119   NS_IMETHOD    CompareTo(PRInt32 aMajor, PRInt32 aMinor, PRInt32 aRelease, PRInt32 aBuild, PRInt32* aReturn) { return _to##CompareTo(aMajor, aMinor, aRelease, aBuild, aReturn); }  \
00120 
00121 
00122 extern nsresult NS_InitInstallVersionClass(nsIScriptContext *aContext, void **aPrototype);
00123 
00124 extern "C" nsresult NS_NewScriptInstallVersion(nsIScriptContext *aContext, nsISupports *aSupports, nsISupports *aParent, void **aReturn);
00125 
00126 #endif // nsIDOMInstallVersion_h__