Mercurial > projects > dwt-mac
comparison dwt/internal/mozilla/nsIHelperAppLauncher.d @ 125:5583f8eeee6c
Synced mozilla with dwt-linux
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Fri, 16 Jan 2009 12:49:08 +0100 |
parents | d8635bb48c7c |
children |
comparison
equal
deleted
inserted
replaced
124:540fa4e9974a | 125:5583f8eeee6c |
---|---|
1 /* ***** BEGIN LICENSE BLOCK ***** | |
2 * Version: MPL 1.1 | |
3 * | |
4 * The contents of this file are subject to the Mozilla Public License Version | |
5 * 1.1 (the "License"); you may not use this file except in compliance with | |
6 * the License. You may obtain a copy of the License at | |
7 * http://www.mozilla.org/MPL/ | |
8 * | |
9 * Software distributed under the License is distributed on an "AS IS" basis, | |
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | |
11 * for the specific language governing rights and limitations under the | |
12 * License. | |
13 * | |
14 * The Original Code is Mozilla Communicator client code, released March 31, 1998. | |
15 * | |
16 * The Initial Developer of the Original Code is | |
17 * Netscape Communications Corporation. | |
18 * Portions created by Netscape are Copyright (C) 1998-1999 | |
19 * Netscape Communications Corporation. All Rights Reserved. | |
20 * | |
21 * Contributor(s): | |
22 * | |
23 * IBM | |
24 * - Binding to permit interfacing between Mozilla and DWT | |
25 * - Copyright (C) 2003, 2008 IBM Corp. All Rights Reserved. | |
26 * | |
27 * ***** END LICENSE BLOCK ***** */ | |
28 module dwt.internal.mozilla.nsIHelperAppLauncher; | 1 module dwt.internal.mozilla.nsIHelperAppLauncher; |
29 | 2 |
30 import dwt.dwthelper.utils; | 3 private import dwt.internal.mozilla.Common; |
4 private import dwt.internal.mozilla.nsID; | |
5 private import dwt.internal.mozilla.nsISupports; | |
6 private import dwt.internal.mozilla.nsIURI; | |
7 private import dwt.internal.mozilla.nsIMIMEInfo; | |
8 private import dwt.internal.mozilla.nsIFile; | |
9 private import dwt.internal.mozilla.nsIWebProgressListener; | |
10 private import dwt.internal.mozilla.nsStringAPI; | |
11 private import dwt.internal.mozilla.prtime; | |
31 | 12 |
32 public class nsIHelperAppLauncher extends nsISupports { | 13 const char[] NS_IHELPERAPPLAUNCHER_IID_STR = "9503d0fe-4c9d-11d4-98d0-001083010e9b"; |
33 | 14 |
34 static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 9; | 15 const nsIID NS_IHELPERAPPLAUNCHER_IID= |
16 {0x9503d0fe, 0x4c9d, 0x11d4, | |
17 [ 0x98, 0xd0, 0x00, 0x10, 0x83, 0x01, 0x0e, 0x9b ]}; | |
35 | 18 |
36 public static final String NS_IHELPERAPPLAUNCHER_IID_STR = | 19 interface nsIHelperAppLauncher : nsISupports { |
37 "9503d0fe-4c9d-11d4-98d0-001083010e9b"; | |
38 | 20 |
39 public static final nsID NS_IHELPERAPPLAUNCHER_IID = | 21 static const char[] IID_STR = NS_IHELPERAPPLAUNCHER_IID_STR; |
40 new nsID(NS_IHELPERAPPLAUNCHER_IID_STR); | 22 static const nsIID IID = NS_IHELPERAPPLAUNCHER_IID; |
41 | 23 |
42 public nsIHelperAppLauncher(int /*long*/ address) { | 24 extern(System): |
43 super(address); | 25 nsresult GetMIMEInfo(nsIMIMEInfo *aMIMEInfo); |
44 } | 26 nsresult GetSource(nsIURI *aSource); |
27 nsresult GetSuggestedFileName(nsAString * aSuggestedFileName); | |
28 nsresult SaveToDisk(nsIFile aNewFileLocation, PRBool aRememberThisPreference); | |
29 nsresult LaunchWithApplication(nsIFile aApplication, PRBool aRememberThisPreference); | |
30 nsresult Cancel(); | |
31 nsresult SetWebProgressListener(nsIWebProgressListener aWebProgressListener); | |
32 nsresult CloseProgressWindow(); | |
33 nsresult GetDownloadInfo( nsIURI* aSourceUrl, PRTime* aTimeDownloadStarted, nsIFile* result); | |
45 | 34 |
46 public int GetMIMEInfo(int /*long*/[] aMIMEInfo) { | |
47 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), aMIMEInfo); | |
48 } | |
49 | |
50 public int GetSource(int /*long*/[] aSource) { | |
51 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), aSource); | |
52 } | |
53 | |
54 public int GetSuggestedFileName(int /*long*/[] aSuggestedFileName) { | |
55 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress(), aSuggestedFileName); | |
56 } | |
57 | |
58 public int SaveToDisk(int /*long*/ aNewFileLocation, int aRememberThisPreference) { | |
59 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), aNewFileLocation, aRememberThisPreference); | |
60 } | |
61 | |
62 public int LaunchWithApplication(int /*long*/ aApplication, int aRememberThisPreference) { | |
63 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aApplication, aRememberThisPreference); | |
64 } | |
65 | |
66 public int Cancel() { | |
67 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress()); | |
68 } | |
69 | |
70 public int SetWebProgressListener(int /*long*/ aWebProgressListener) { | |
71 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aWebProgressListener); | |
72 } | |
73 | |
74 public int CloseProgressWindow() { | |
75 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress()); | |
76 } | |
77 | |
78 public int GetDownloadInfo(int /*long*/[] aSourceUrl, long[] aTimeDownloadStarted, int /*long*/[] _retval) { | |
79 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), aSourceUrl, aTimeDownloadStarted, _retval); | |
80 } | |
81 } | 35 } |