1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 : #ifndef PWyciwygChannelParent_h
7 : #define PWyciwygChannelParent_h
8 :
9 : #include "mozilla/net/PWyciwygChannel.h"
10 : namespace mozilla {
11 : namespace net {
12 : class PNeckoParent;
13 : } // namespace net
14 : } // namespace mozilla
15 :
16 : #ifdef DEBUG
17 : #include "prenv.h"
18 : #endif // DEBUG
19 : #include "base/id_map.h"
20 : #include "mozilla/ipc/RPCChannel.h"
21 :
22 :
23 : namespace mozilla {
24 : namespace net {
25 : class PNeckoParent;
26 : } // namespace net
27 : } // namespace mozilla
28 :
29 : namespace mozilla {
30 : namespace net {
31 :
32 :
33 : class /*NS_ABSTRACT_CLASS*/ PWyciwygChannelParent :
34 : protected mozilla::ipc::RPCChannel::RPCListener,
35 : protected mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>
36 : {
37 : friend class mozilla::net::PNeckoParent;
38 :
39 : protected:
40 : typedef mozilla::ipc::ActorHandle ActorHandle;
41 : typedef mozilla::ipc::Shmem Shmem;
42 : typedef IPC::URI URI;
43 : typedef mozilla::net::PNeckoParent PNeckoParent;
44 : typedef base::ProcessId ProcessId;
45 : typedef mozilla::ipc::ProtocolId ProtocolId;
46 : typedef mozilla::ipc::Transport Transport;
47 : typedef mozilla::ipc::TransportDescriptor TransportDescriptor;
48 :
49 : typedef PWyciwygChannel::State State;
50 :
51 : virtual bool
52 : Recv__delete__();
53 : virtual bool
54 : RecvInit(const URI& uri) = 0;
55 : virtual bool
56 : RecvAsyncOpen(
57 : const URI& originalURI,
58 : const PRUint32& loadFlags) = 0;
59 : virtual bool
60 : RecvWriteToCacheEntry(const nsString& data) = 0;
61 : virtual bool
62 : RecvCloseCacheEntry(const nsresult& reason) = 0;
63 : virtual bool
64 : RecvSetCharsetAndSource(
65 : const PRInt32& source,
66 : const nsCString& charset) = 0;
67 : virtual bool
68 : RecvSetSecurityInfo(const nsCString& securityInfo) = 0;
69 : virtual bool
70 : RecvCancel(const nsresult& status) = 0;
71 :
72 : virtual void
73 : ActorDestroy(ActorDestroyReason why);
74 :
75 : public:
76 : typedef IPC::Message Message;
77 : typedef mozilla::ipc::RPCChannel Channel;
78 : typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
79 : typedef base::ProcessHandle ProcessHandle;
80 : typedef mozilla::ipc::AsyncChannel AsyncChannel;
81 : typedef mozilla::ipc::SharedMemory SharedMemory;
82 : typedef mozilla::ipc::Trigger Trigger;
83 :
84 : public:
85 : PWyciwygChannelParent();
86 :
87 : virtual ~PWyciwygChannelParent();
88 :
89 : PNeckoParent*
90 : Manager();
91 :
92 : PWyciwygChannel::State
93 : state();
94 :
95 : bool
96 : SendOnStartRequest(
97 : const nsresult& statusCode,
98 : const PRInt32& contentLength,
99 : const PRInt32& source,
100 : const nsCString& charset,
101 : const nsCString& securityInfo) NS_WARN_UNUSED_RESULT;
102 :
103 : bool
104 : SendOnDataAvailable(
105 : const nsCString& data,
106 : const PRUint32& offset) NS_WARN_UNUSED_RESULT;
107 :
108 : bool
109 : SendOnStopRequest(const nsresult& statusCode) NS_WARN_UNUSED_RESULT;
110 :
111 : bool
112 : SendCancelEarly(const nsresult& statusCode) NS_WARN_UNUSED_RESULT;
113 :
114 : virtual int32
115 : Register(ChannelListener* aRouted);
116 : virtual int32
117 : RegisterID(
118 : ChannelListener* aRouted,
119 : int32 aId);
120 : virtual ChannelListener*
121 : Lookup(int32 aId);
122 : virtual void
123 : Unregister(int32 aId);
124 : virtual void
125 : RemoveManagee(
126 : int32 aProtocolId,
127 : ChannelListener* aListener);
128 : virtual Shmem::SharedMemory*
129 : CreateSharedMemory(
130 : size_t aSize,
131 : Shmem::SharedMemory::SharedMemoryType type,
132 : bool unsafe,
133 : Shmem::id_t* aId);
134 : virtual bool
135 : AdoptSharedMemory(
136 : Shmem::SharedMemory* segment,
137 : Shmem::id_t* aId);
138 : virtual Shmem::SharedMemory*
139 : LookupSharedMemory(Shmem::id_t aId);
140 : virtual bool
141 : IsTrackingSharedMemory(Shmem::SharedMemory* segment);
142 : virtual bool
143 : DestroySharedMemory(Shmem& aShmem);
144 : virtual ProcessHandle
145 : OtherProcess() const;
146 : virtual AsyncChannel*
147 : GetIPCChannel();
148 :
149 : virtual Result
150 : OnMessageReceived(const Message& __msg);
151 :
152 : virtual Result
153 : OnMessageReceived(
154 : const Message& __msg,
155 : Message*& __reply);
156 :
157 : virtual Result
158 : OnCallReceived(
159 : const Message& __msg,
160 : Message*& __reply);
161 :
162 : void
163 : OnProcessingError(Result code);
164 :
165 : bool
166 : OnReplyTimeout();
167 :
168 : void
169 : OnChannelClose();
170 :
171 : void
172 : OnChannelError();
173 :
174 : void
175 : OnChannelConnected(int32 pid);
176 :
177 : // Methods for managing shmem
178 : bool
179 : AllocShmem(
180 : size_t aSize,
181 : Shmem::SharedMemory::SharedMemoryType aType,
182 : Shmem* aMem);
183 :
184 : bool
185 : AllocUnsafeShmem(
186 : size_t aSize,
187 : Shmem::SharedMemory::SharedMemoryType aType,
188 : Shmem* aMem);
189 :
190 : bool
191 : AdoptShmem(
192 : Shmem& aMem,
193 : Shmem* aOutMem);
194 :
195 : bool
196 : DeallocShmem(Shmem& aMem);
197 :
198 : private:
199 : virtual void
200 : FatalError(const char* const msg) const;
201 :
202 : void
203 : DestroySubtree(ActorDestroyReason why);
204 :
205 : void
206 : DeallocSubtree();
207 :
208 : template<typename T>
209 : void
210 0 : Write(
211 : const T& __v,
212 : Message* __msg)
213 : {
214 0 : IPC::WriteParam(__msg, __v);
215 0 : }
216 :
217 : template<typename T>
218 : bool
219 0 : Read(
220 : T* __v,
221 : const Message* __msg,
222 : void** __iter)
223 : {
224 0 : return IPC::ReadParam(__msg, __iter, __v);
225 : }
226 :
227 : void
228 : Write(
229 : PWyciwygChannelParent* __v,
230 : Message* __msg,
231 : bool __nullable);
232 :
233 : bool
234 : Read(
235 : PWyciwygChannelParent** __v,
236 : const Message* __msg,
237 : void** __iter,
238 : bool __nullable) NS_WARN_UNUSED_RESULT;
239 :
240 : Channel* mChannel;
241 : int32 mId;
242 : mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>* mManager;
243 : State mState;
244 : };
245 :
246 :
247 : } // namespace net
248 : } // namespace mozilla
249 :
250 : #if 0
251 :
252 : //-----------------------------------------------------------------------------
253 : // Skeleton implementation of abstract actor class
254 :
255 : // Header file contents
256 : namespace mozilla {
257 : namespace net {
258 : class WyciwygChannelParent :
259 : public PWyciwygChannelParent
260 : {
261 : virtual bool
262 : RecvInit(const URI& uri);
263 :
264 : virtual bool
265 : RecvAsyncOpen(
266 : const URI& originalURI,
267 : const PRUint32& loadFlags);
268 :
269 : virtual bool
270 : RecvWriteToCacheEntry(const nsString& data);
271 :
272 : virtual bool
273 : RecvCloseCacheEntry(const nsresult& reason);
274 :
275 : virtual bool
276 : RecvSetCharsetAndSource(
277 : const PRInt32& source,
278 : const nsCString& charset);
279 :
280 : virtual bool
281 : RecvSetSecurityInfo(const nsCString& securityInfo);
282 :
283 : virtual bool
284 : RecvCancel(const nsresult& status);
285 :
286 : WyciwygChannelParent();
287 : virtual ~WyciwygChannelParent();
288 : };
289 : } // namespace net
290 : } // namespace mozilla
291 :
292 :
293 : // C++ file contents
294 : namespace mozilla {
295 : namespace net {
296 : bool
297 : WyciwygChannelParent::RecvInit(const URI& uri)
298 : {
299 : return false;
300 : }
301 :
302 : bool
303 : WyciwygChannelParent::RecvAsyncOpen(
304 : const URI& originalURI,
305 : const PRUint32& loadFlags)
306 : {
307 : return false;
308 : }
309 :
310 : bool
311 : WyciwygChannelParent::RecvWriteToCacheEntry(const nsString& data)
312 : {
313 : return false;
314 : }
315 :
316 : bool
317 : WyciwygChannelParent::RecvCloseCacheEntry(const nsresult& reason)
318 : {
319 : return false;
320 : }
321 :
322 : bool
323 : WyciwygChannelParent::RecvSetCharsetAndSource(
324 : const PRInt32& source,
325 : const nsCString& charset)
326 : {
327 : return false;
328 : }
329 :
330 : bool
331 : WyciwygChannelParent::RecvSetSecurityInfo(const nsCString& securityInfo)
332 : {
333 : return false;
334 : }
335 :
336 : bool
337 : WyciwygChannelParent::RecvCancel(const nsresult& status)
338 : {
339 : return false;
340 : }
341 :
342 : WyciwygChannelParent::WyciwygChannelParent()
343 : {
344 : MOZ_COUNT_CTOR(WyciwygChannelParent);
345 : }
346 :
347 : WyciwygChannelParent::~WyciwygChannelParent()
348 : {
349 : MOZ_COUNT_DTOR(WyciwygChannelParent);
350 : }
351 :
352 : } // namespace net
353 : } // namespace mozilla
354 : #endif // if 0
355 :
356 : #endif // ifndef PWyciwygChannelParent_h
|