Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/nsIThreadPool.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /src/mozilla-central/xpcom/threads/nsIThreadPool.idl
3
 */
4
5
#ifndef __gen_nsIThreadPool_h__
6
#define __gen_nsIThreadPool_h__
7
8
9
#ifndef __gen_nsIEventTarget_h__
10
#include "nsIEventTarget.h"
11
#endif
12
13
#include "js/GCAnnotations.h"
14
15
/* For IDL files that don't want to include root IDL files. */
16
#ifndef NS_NO_VTABLE
17
#define NS_NO_VTABLE
18
#endif
19
20
/* starting interface:    nsIThreadPoolListener */
21
#define NS_ITHREADPOOLLISTENER_IID_STR "ef194cab-3f86-4b61-b132-e5e96a79e5d1"
22
23
#define NS_ITHREADPOOLLISTENER_IID \
24
  {0xef194cab, 0x3f86, 0x4b61, \
25
    { 0xb1, 0x32, 0xe5, 0xe9, 0x6a, 0x79, 0xe5, 0xd1 }}
26
27
class NS_NO_VTABLE nsIThreadPoolListener : public nsISupports {
28
 public:
29
30
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITHREADPOOLLISTENER_IID)
31
32
  /* void onThreadCreated (); */
33
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnThreadCreated(void) = 0;
34
35
  /* void onThreadShuttingDown (); */
36
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnThreadShuttingDown(void) = 0;
37
38
};
39
40
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIThreadPoolListener, NS_ITHREADPOOLLISTENER_IID)
41
42
/* Use this macro when declaring classes that implement this interface. */
43
#define NS_DECL_NSITHREADPOOLLISTENER \
44
  NS_IMETHOD OnThreadCreated(void) override; \
45
  NS_IMETHOD OnThreadShuttingDown(void) override; 
46
47
/* Use this macro when declaring the members of this interface when the
48
   class doesn't implement the interface. This is useful for forwarding. */
49
#define NS_DECL_NON_VIRTUAL_NSITHREADPOOLLISTENER \
50
  nsresult OnThreadCreated(void); \
51
  nsresult OnThreadShuttingDown(void); 
52
53
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
54
#define NS_FORWARD_NSITHREADPOOLLISTENER(_to) \
55
  NS_IMETHOD OnThreadCreated(void) override { return _to OnThreadCreated(); } \
56
  NS_IMETHOD OnThreadShuttingDown(void) override { return _to OnThreadShuttingDown(); } 
57
58
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
59
#define NS_FORWARD_SAFE_NSITHREADPOOLLISTENER(_to) \
60
  NS_IMETHOD OnThreadCreated(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnThreadCreated(); } \
61
  NS_IMETHOD OnThreadShuttingDown(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnThreadShuttingDown(); } 
62
63
64
/* starting interface:    nsIThreadPool */
65
#define NS_ITHREADPOOL_IID_STR "76ce99c9-8e43-489a-9789-f27cc4424965"
66
67
#define NS_ITHREADPOOL_IID \
68
  {0x76ce99c9, 0x8e43, 0x489a, \
69
    { 0x97, 0x89, 0xf2, 0x7c, 0xc4, 0x42, 0x49, 0x65 }}
70
71
class NS_NO_VTABLE nsIThreadPool : public nsIEventTarget {
72
 public:
73
74
  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITHREADPOOL_IID)
75
76
  /* void shutdown (); */
77
  NS_IMETHOD Shutdown(void) = 0;
78
79
  /* attribute unsigned long threadLimit; */
80
  NS_IMETHOD GetThreadLimit(uint32_t *aThreadLimit) = 0;
81
  NS_IMETHOD SetThreadLimit(uint32_t aThreadLimit) = 0;
82
83
  /* attribute unsigned long idleThreadLimit; */
84
  NS_IMETHOD GetIdleThreadLimit(uint32_t *aIdleThreadLimit) = 0;
85
  NS_IMETHOD SetIdleThreadLimit(uint32_t aIdleThreadLimit) = 0;
86
87
  /* attribute unsigned long idleThreadTimeout; */
88
  NS_IMETHOD GetIdleThreadTimeout(uint32_t *aIdleThreadTimeout) = 0;
89
  NS_IMETHOD SetIdleThreadTimeout(uint32_t aIdleThreadTimeout) = 0;
90
91
  /* attribute unsigned long threadStackSize; */
92
  NS_IMETHOD GetThreadStackSize(uint32_t *aThreadStackSize) = 0;
93
  NS_IMETHOD SetThreadStackSize(uint32_t aThreadStackSize) = 0;
94
95
  /* attribute nsIThreadPoolListener listener; */
96
  NS_IMETHOD GetListener(nsIThreadPoolListener **aListener) = 0;
97
  NS_IMETHOD SetListener(nsIThreadPoolListener *aListener) = 0;
98
99
  /* void setName (in ACString aName); */
100
  NS_IMETHOD SetName(const nsACString& aName) = 0;
101
102
};
103
104
  NS_DEFINE_STATIC_IID_ACCESSOR(nsIThreadPool, NS_ITHREADPOOL_IID)
105
106
/* Use this macro when declaring classes that implement this interface. */
107
#define NS_DECL_NSITHREADPOOL \
108
  NS_IMETHOD Shutdown(void) override; \
109
  NS_IMETHOD GetThreadLimit(uint32_t *aThreadLimit) override; \
110
  NS_IMETHOD SetThreadLimit(uint32_t aThreadLimit) override; \
111
  NS_IMETHOD GetIdleThreadLimit(uint32_t *aIdleThreadLimit) override; \
112
  NS_IMETHOD SetIdleThreadLimit(uint32_t aIdleThreadLimit) override; \
113
  NS_IMETHOD GetIdleThreadTimeout(uint32_t *aIdleThreadTimeout) override; \
114
  NS_IMETHOD SetIdleThreadTimeout(uint32_t aIdleThreadTimeout) override; \
115
  NS_IMETHOD GetThreadStackSize(uint32_t *aThreadStackSize) override; \
116
  NS_IMETHOD SetThreadStackSize(uint32_t aThreadStackSize) override; \
117
  NS_IMETHOD GetListener(nsIThreadPoolListener **aListener) override; \
118
  NS_IMETHOD SetListener(nsIThreadPoolListener *aListener) override; \
119
  NS_IMETHOD SetName(const nsACString& aName) override; 
120
121
/* Use this macro when declaring the members of this interface when the
122
   class doesn't implement the interface. This is useful for forwarding. */
123
#define NS_DECL_NON_VIRTUAL_NSITHREADPOOL \
124
  nsresult Shutdown(void); \
125
  nsresult GetThreadLimit(uint32_t *aThreadLimit); \
126
  nsresult SetThreadLimit(uint32_t aThreadLimit); \
127
  nsresult GetIdleThreadLimit(uint32_t *aIdleThreadLimit); \
128
  nsresult SetIdleThreadLimit(uint32_t aIdleThreadLimit); \
129
  nsresult GetIdleThreadTimeout(uint32_t *aIdleThreadTimeout); \
130
  nsresult SetIdleThreadTimeout(uint32_t aIdleThreadTimeout); \
131
  nsresult GetThreadStackSize(uint32_t *aThreadStackSize); \
132
  nsresult SetThreadStackSize(uint32_t aThreadStackSize); \
133
  nsresult GetListener(nsIThreadPoolListener **aListener); \
134
  nsresult SetListener(nsIThreadPoolListener *aListener); \
135
  nsresult SetName(const nsACString& aName); 
136
137
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
138
#define NS_FORWARD_NSITHREADPOOL(_to) \
139
  NS_IMETHOD Shutdown(void) override { return _to Shutdown(); } \
140
  NS_IMETHOD GetThreadLimit(uint32_t *aThreadLimit) override { return _to GetThreadLimit(aThreadLimit); } \
141
  NS_IMETHOD SetThreadLimit(uint32_t aThreadLimit) override { return _to SetThreadLimit(aThreadLimit); } \
142
  NS_IMETHOD GetIdleThreadLimit(uint32_t *aIdleThreadLimit) override { return _to GetIdleThreadLimit(aIdleThreadLimit); } \
143
  NS_IMETHOD SetIdleThreadLimit(uint32_t aIdleThreadLimit) override { return _to SetIdleThreadLimit(aIdleThreadLimit); } \
144
  NS_IMETHOD GetIdleThreadTimeout(uint32_t *aIdleThreadTimeout) override { return _to GetIdleThreadTimeout(aIdleThreadTimeout); } \
145
  NS_IMETHOD SetIdleThreadTimeout(uint32_t aIdleThreadTimeout) override { return _to SetIdleThreadTimeout(aIdleThreadTimeout); } \
146
  NS_IMETHOD GetThreadStackSize(uint32_t *aThreadStackSize) override { return _to GetThreadStackSize(aThreadStackSize); } \
147
  NS_IMETHOD SetThreadStackSize(uint32_t aThreadStackSize) override { return _to SetThreadStackSize(aThreadStackSize); } \
148
  NS_IMETHOD GetListener(nsIThreadPoolListener **aListener) override { return _to GetListener(aListener); } \
149
  NS_IMETHOD SetListener(nsIThreadPoolListener *aListener) override { return _to SetListener(aListener); } \
150
  NS_IMETHOD SetName(const nsACString& aName) override { return _to SetName(aName); } 
151
152
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
153
#define NS_FORWARD_SAFE_NSITHREADPOOL(_to) \
154
0
  NS_IMETHOD Shutdown(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Shutdown(); } \
155
0
  NS_IMETHOD GetThreadLimit(uint32_t *aThreadLimit) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetThreadLimit(aThreadLimit); } \
156
0
  NS_IMETHOD SetThreadLimit(uint32_t aThreadLimit) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetThreadLimit(aThreadLimit); } \
157
0
  NS_IMETHOD GetIdleThreadLimit(uint32_t *aIdleThreadLimit) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIdleThreadLimit(aIdleThreadLimit); } \
158
0
  NS_IMETHOD SetIdleThreadLimit(uint32_t aIdleThreadLimit) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIdleThreadLimit(aIdleThreadLimit); } \
159
0
  NS_IMETHOD GetIdleThreadTimeout(uint32_t *aIdleThreadTimeout) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIdleThreadTimeout(aIdleThreadTimeout); } \
160
0
  NS_IMETHOD SetIdleThreadTimeout(uint32_t aIdleThreadTimeout) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIdleThreadTimeout(aIdleThreadTimeout); } \
161
0
  NS_IMETHOD GetThreadStackSize(uint32_t *aThreadStackSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetThreadStackSize(aThreadStackSize); } \
162
0
  NS_IMETHOD SetThreadStackSize(uint32_t aThreadStackSize) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetThreadStackSize(aThreadStackSize); } \
163
0
  NS_IMETHOD GetListener(nsIThreadPoolListener **aListener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetListener(aListener); } \
164
0
  NS_IMETHOD SetListener(nsIThreadPoolListener *aListener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetListener(aListener); } \
165
0
  NS_IMETHOD SetName(const nsACString& aName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetName(aName); } 
166
167
168
#endif /* __gen_nsIThreadPool_h__ */