Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIContentSniffer.idl
3 : */
4 :
5 : #ifndef __gen_nsIContentSniffer_h__
6 : #define __gen_nsIContentSniffer_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 nsIRequest; /* forward declaration */
18 :
19 :
20 : /* starting interface: nsIContentSniffer */
21 : #define NS_ICONTENTSNIFFER_IID_STR "a5772d1b-fc63-495e-a169-96e8d3311af0"
22 :
23 : #define NS_ICONTENTSNIFFER_IID \
24 : {0xa5772d1b, 0xfc63, 0x495e, \
25 : { 0xa1, 0x69, 0x96, 0xe8, 0xd3, 0x31, 0x1a, 0xf0 }}
26 :
27 5 : class NS_NO_VTABLE nsIContentSniffer : public nsISupports {
28 : public:
29 :
30 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICONTENTSNIFFER_IID)
31 :
32 : /* ACString getMIMETypeFromContent (in nsIRequest aRequest, [array, size_is (aLength), const] in octet aData, in unsigned long aLength); */
33 : NS_IMETHOD GetMIMETypeFromContent(nsIRequest *aRequest, const uint8_t *aData, uint32_t aLength, nsACString & _retval) = 0;
34 :
35 : };
36 :
37 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIContentSniffer, NS_ICONTENTSNIFFER_IID)
38 :
39 : /* Use this macro when declaring classes that implement this interface. */
40 : #define NS_DECL_NSICONTENTSNIFFER \
41 : NS_IMETHOD GetMIMETypeFromContent(nsIRequest *aRequest, const uint8_t *aData, uint32_t aLength, nsACString & _retval) override;
42 :
43 : /* Use this macro when declaring the members of this interface when the
44 : class doesn't implement the interface. This is useful for forwarding. */
45 : #define NS_DECL_NON_VIRTUAL_NSICONTENTSNIFFER \
46 : nsresult GetMIMETypeFromContent(nsIRequest *aRequest, const uint8_t *aData, uint32_t aLength, nsACString & _retval);
47 :
48 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
49 : #define NS_FORWARD_NSICONTENTSNIFFER(_to) \
50 : NS_IMETHOD GetMIMETypeFromContent(nsIRequest *aRequest, const uint8_t *aData, uint32_t aLength, nsACString & _retval) override { return _to GetMIMETypeFromContent(aRequest, aData, aLength, _retval); }
51 :
52 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
53 : #define NS_FORWARD_SAFE_NSICONTENTSNIFFER(_to) \
54 : NS_IMETHOD GetMIMETypeFromContent(nsIRequest *aRequest, const uint8_t *aData, uint32_t aLength, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMIMETypeFromContent(aRequest, aData, aLength, _retval); }
55 :
56 : #if 0
57 : /* Use the code below as a template for the implementation class for this interface. */
58 :
59 : /* Header file */
60 : class nsContentSniffer : public nsIContentSniffer
61 : {
62 : public:
63 : NS_DECL_ISUPPORTS
64 : NS_DECL_NSICONTENTSNIFFER
65 :
66 : nsContentSniffer();
67 :
68 : private:
69 : ~nsContentSniffer();
70 :
71 : protected:
72 : /* additional members */
73 : };
74 :
75 : /* Implementation file */
76 : NS_IMPL_ISUPPORTS(nsContentSniffer, nsIContentSniffer)
77 :
78 : nsContentSniffer::nsContentSniffer()
79 : {
80 : /* member initializers and constructor code */
81 : }
82 :
83 : nsContentSniffer::~nsContentSniffer()
84 : {
85 : /* destructor code */
86 : }
87 :
88 : /* ACString getMIMETypeFromContent (in nsIRequest aRequest, [array, size_is (aLength), const] in octet aData, in unsigned long aLength); */
89 : NS_IMETHODIMP nsContentSniffer::GetMIMETypeFromContent(nsIRequest *aRequest, const uint8_t *aData, uint32_t aLength, nsACString & _retval)
90 : {
91 : return NS_ERROR_NOT_IMPLEMENTED;
92 : }
93 :
94 : /* End of implementation class template. */
95 : #endif
96 :
97 :
98 : #endif /* __gen_nsIContentSniffer_h__ */
|