1 module org.eclipse.swt.internal.mozilla.nsIMIMEInfo;
2 
3 import java.lang.all;
4 
5 import org.eclipse.swt.internal.mozilla.Common;
6 import org.eclipse.swt.internal.mozilla.nsID;
7 import org.eclipse.swt.internal.mozilla.nsISupports;
8 
9 import org.eclipse.swt.internal.mozilla.nsIURI;
10 import org.eclipse.swt.internal.mozilla.nsIFile;
11 import org.eclipse.swt.internal.mozilla.nsIStringEnumerator;
12 import org.eclipse.swt.internal.mozilla.nsStringAPI;
13 
14 alias PRInt32 nsMIMEInfoHandleAction;
15 
16 const char[] NS_IMIMEINFO_IID_STR = "1448b42f-cf0d-466e-9a15-64e876ebe857";
17 
18 const nsIID NS_IMIMEINFO_IID= 
19   {0x1448b42f, 0xcf0d, 0x466e, 
20     [ 0x9a, 0x15, 0x64, 0xe8, 0x76, 0xeb, 0xe8, 0x57 ]};
21 
22 interface nsIMIMEInfo : nsISupports {
23 
24   static const char[] IID_STR = NS_IMIMEINFO_IID_STR;
25   static const nsIID IID = NS_IMIMEINFO_IID;
26 
27 extern(System):
28   nsresult GetFileExtensions(nsIUTF8StringEnumerator *_retval);
29   nsresult SetFileExtensions(nsACString * aExtensions);
30   nsresult ExtensionExists(nsACString * aExtension, PRBool *_retval);
31   nsresult AppendExtension(nsACString * aExtension);
32   nsresult GetPrimaryExtension(nsACString * aPrimaryExtension);
33   nsresult SetPrimaryExtension(nsACString * aPrimaryExtension);
34   nsresult GetMIMEType(nsACString * aMIMEType);
35   nsresult SetDescription(nsAString * aDescription);
36   nsresult GetMacType(PRUint32 *aMacType);
37   nsresult SetMacType(PRUint32 aMacType);
38   nsresult GetMacCreator(PRUint32 *aMacCreator);
39   nsresult SetMacCreator(PRUint32 aMacCreator);
40   nsresult Equals(nsIMIMEInfo aMIMEInfo, PRBool *_retval);
41   nsresult GetPreferredApplicationHandler(nsIFile  *aPreferredApplicationHandler);
42   nsresult SetPreferredApplicationHandler(nsIFile  aPreferredApplicationHandler);
43   nsresult GetApplicationDescription(nsAString * aApplicationDescription);
44   nsresult SetApplicationDescription(nsAString * aApplicationDescription);
45   nsresult GetHasDefaultHandler(PRBool *aHasDefaultHandler);
46   nsresult GetDefaultDescription(nsAString * aDefaultDescription);
47   nsresult LaunchWithFile(nsIFile aFile);
48 
49   enum { saveToDisk = 0 };
50   enum { alwaysAsk = 1 };
51   enum { useHelperApp = 2 };
52   enum { handleInternally = 3 };
53   enum { useSystemDefault = 4 };
54 
55   nsresult GetPreferredAction(nsMIMEInfoHandleAction *aPreferredAction);
56   nsresult SetPreferredAction(nsMIMEInfoHandleAction aPreferredAction);
57   nsresult GetAlwaysAskBeforeHandling(PRBool *aAlwaysAskBeforeHandling);
58   nsresult SetAlwaysAskBeforeHandling(PRBool aAlwaysAskBeforeHandling);
59 
60 }
61