Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/mozIDownloadPlatform.idl
3 : */
4 :
5 : #ifndef __gen_mozIDownloadPlatform_h__
6 : #define __gen_mozIDownloadPlatform_h__
7 :
8 :
9 : #ifndef __gen_nsISupports_h__
10 : #include "nsISupports.h"
11 : #endif
12 :
13 : /* For IDL files that don't want to include root IDL files. */
14 : #ifndef NS_NO_VTABLE
15 : #define NS_NO_VTABLE
16 : #endif
17 : class nsIURI; /* forward declaration */
18 :
19 : class nsIFile; /* forward declaration */
20 :
21 :
22 : /* starting interface: mozIDownloadPlatform */
23 : #define MOZIDOWNLOADPLATFORM_IID_STR "9f556e4a-d9b3-46c3-9f8f-d0db1ac6c8c1"
24 :
25 : #define MOZIDOWNLOADPLATFORM_IID \
26 : {0x9f556e4a, 0xd9b3, 0x46c3, \
27 : { 0x9f, 0x8f, 0xd0, 0xdb, 0x1a, 0xc6, 0xc8, 0xc1 }}
28 :
29 0 : class NS_NO_VTABLE mozIDownloadPlatform : public nsISupports {
30 : public:
31 :
32 : NS_DECLARE_STATIC_IID_ACCESSOR(MOZIDOWNLOADPLATFORM_IID)
33 :
34 : /* void downloadDone (in nsIURI aSource, in nsIURI aReferrer, in nsIFile aTarget, in ACString aContentType, in boolean aIsPrivate); */
35 : NS_IMETHOD DownloadDone(nsIURI *aSource, nsIURI *aReferrer, nsIFile *aTarget, const nsACString & aContentType, bool aIsPrivate) = 0;
36 :
37 : enum {
38 : ZONE_MY_COMPUTER = 0U,
39 : ZONE_INTRANET = 1U,
40 : ZONE_TRUSTED = 2U,
41 : ZONE_INTERNET = 3U,
42 : ZONE_RESTRICTED = 4U
43 : };
44 :
45 : /* unsigned long mapUrlToZone (in AString aURL); */
46 : NS_IMETHOD MapUrlToZone(const nsAString & aURL, uint32_t *_retval) = 0;
47 :
48 : };
49 :
50 : NS_DEFINE_STATIC_IID_ACCESSOR(mozIDownloadPlatform, MOZIDOWNLOADPLATFORM_IID)
51 :
52 : /* Use this macro when declaring classes that implement this interface. */
53 : #define NS_DECL_MOZIDOWNLOADPLATFORM \
54 : NS_IMETHOD DownloadDone(nsIURI *aSource, nsIURI *aReferrer, nsIFile *aTarget, const nsACString & aContentType, bool aIsPrivate) override; \
55 : NS_IMETHOD MapUrlToZone(const nsAString & aURL, uint32_t *_retval) override;
56 :
57 : /* Use this macro when declaring the members of this interface when the
58 : class doesn't implement the interface. This is useful for forwarding. */
59 : #define NS_DECL_NON_VIRTUAL_MOZIDOWNLOADPLATFORM \
60 : nsresult DownloadDone(nsIURI *aSource, nsIURI *aReferrer, nsIFile *aTarget, const nsACString & aContentType, bool aIsPrivate); \
61 : nsresult MapUrlToZone(const nsAString & aURL, uint32_t *_retval);
62 :
63 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
64 : #define NS_FORWARD_MOZIDOWNLOADPLATFORM(_to) \
65 : NS_IMETHOD DownloadDone(nsIURI *aSource, nsIURI *aReferrer, nsIFile *aTarget, const nsACString & aContentType, bool aIsPrivate) override { return _to DownloadDone(aSource, aReferrer, aTarget, aContentType, aIsPrivate); } \
66 : NS_IMETHOD MapUrlToZone(const nsAString & aURL, uint32_t *_retval) override { return _to MapUrlToZone(aURL, _retval); }
67 :
68 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
69 : #define NS_FORWARD_SAFE_MOZIDOWNLOADPLATFORM(_to) \
70 : NS_IMETHOD DownloadDone(nsIURI *aSource, nsIURI *aReferrer, nsIFile *aTarget, const nsACString & aContentType, bool aIsPrivate) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DownloadDone(aSource, aReferrer, aTarget, aContentType, aIsPrivate); } \
71 : NS_IMETHOD MapUrlToZone(const nsAString & aURL, uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->MapUrlToZone(aURL, _retval); }
72 :
73 : #if 0
74 : /* Use the code below as a template for the implementation class for this interface. */
75 :
76 : /* Header file */
77 : class _MYCLASS_ : public mozIDownloadPlatform
78 : {
79 : public:
80 : NS_DECL_ISUPPORTS
81 : NS_DECL_MOZIDOWNLOADPLATFORM
82 :
83 : _MYCLASS_();
84 :
85 : private:
86 : ~_MYCLASS_();
87 :
88 : protected:
89 : /* additional members */
90 : };
91 :
92 : /* Implementation file */
93 : NS_IMPL_ISUPPORTS(_MYCLASS_, mozIDownloadPlatform)
94 :
95 : _MYCLASS_::_MYCLASS_()
96 : {
97 : /* member initializers and constructor code */
98 : }
99 :
100 : _MYCLASS_::~_MYCLASS_()
101 : {
102 : /* destructor code */
103 : }
104 :
105 : /* void downloadDone (in nsIURI aSource, in nsIURI aReferrer, in nsIFile aTarget, in ACString aContentType, in boolean aIsPrivate); */
106 : NS_IMETHODIMP _MYCLASS_::DownloadDone(nsIURI *aSource, nsIURI *aReferrer, nsIFile *aTarget, const nsACString & aContentType, bool aIsPrivate)
107 : {
108 : return NS_ERROR_NOT_IMPLEMENTED;
109 : }
110 :
111 : /* unsigned long mapUrlToZone (in AString aURL); */
112 : NS_IMETHODIMP _MYCLASS_::MapUrlToZone(const nsAString & aURL, uint32_t *_retval)
113 : {
114 : return NS_ERROR_NOT_IMPLEMENTED;
115 : }
116 :
117 : /* End of implementation class template. */
118 : #endif
119 :
120 :
121 : #endif /* __gen_mozIDownloadPlatform_h__ */
|