1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 : #ifndef PCookieServiceParent_h
7 : #define PCookieServiceParent_h
8 :
9 : #include "mozilla/net/PCookieService.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*/ PCookieServiceParent :
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 PCookieService::State State;
50 :
51 : virtual bool
52 : RecvGetCookieString(
53 : const URI& host,
54 : const bool& isForeign,
55 : const bool& fromHttp,
56 : nsCString* result) = 0;
57 : virtual bool
58 : RecvSetCookieString(
59 : const URI& host,
60 : const bool& isForeign,
61 : const nsCString& cookieString,
62 : const nsCString& serverTime,
63 : const bool& fromHttp) = 0;
64 : virtual bool
65 : Recv__delete__();
66 :
67 : virtual void
68 : ActorDestroy(ActorDestroyReason why);
69 :
70 : public:
71 : typedef IPC::Message Message;
72 : typedef mozilla::ipc::RPCChannel Channel;
73 : typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
74 : typedef base::ProcessHandle ProcessHandle;
75 : typedef mozilla::ipc::AsyncChannel AsyncChannel;
76 : typedef mozilla::ipc::SharedMemory SharedMemory;
77 : typedef mozilla::ipc::Trigger Trigger;
78 :
79 : public:
80 : PCookieServiceParent();
81 :
82 : virtual ~PCookieServiceParent();
83 :
84 : PNeckoParent*
85 : Manager();
86 :
87 : PCookieService::State
88 : state();
89 :
90 : virtual int32
91 : Register(ChannelListener* aRouted);
92 : virtual int32
93 : RegisterID(
94 : ChannelListener* aRouted,
95 : int32 aId);
96 : virtual ChannelListener*
97 : Lookup(int32 aId);
98 : virtual void
99 : Unregister(int32 aId);
100 : virtual void
101 : RemoveManagee(
102 : int32 aProtocolId,
103 : ChannelListener* aListener);
104 : virtual Shmem::SharedMemory*
105 : CreateSharedMemory(
106 : size_t aSize,
107 : Shmem::SharedMemory::SharedMemoryType type,
108 : bool unsafe,
109 : Shmem::id_t* aId);
110 : virtual bool
111 : AdoptSharedMemory(
112 : Shmem::SharedMemory* segment,
113 : Shmem::id_t* aId);
114 : virtual Shmem::SharedMemory*
115 : LookupSharedMemory(Shmem::id_t aId);
116 : virtual bool
117 : IsTrackingSharedMemory(Shmem::SharedMemory* segment);
118 : virtual bool
119 : DestroySharedMemory(Shmem& aShmem);
120 : virtual ProcessHandle
121 : OtherProcess() const;
122 : virtual AsyncChannel*
123 : GetIPCChannel();
124 :
125 : virtual Result
126 : OnMessageReceived(const Message& __msg);
127 :
128 : virtual Result
129 : OnMessageReceived(
130 : const Message& __msg,
131 : Message*& __reply);
132 :
133 : virtual Result
134 : OnCallReceived(
135 : const Message& __msg,
136 : Message*& __reply);
137 :
138 : void
139 : OnProcessingError(Result code);
140 :
141 : bool
142 : OnReplyTimeout();
143 :
144 : void
145 : OnChannelClose();
146 :
147 : void
148 : OnChannelError();
149 :
150 : void
151 : OnChannelConnected(int32 pid);
152 :
153 : // Methods for managing shmem
154 : bool
155 : AllocShmem(
156 : size_t aSize,
157 : Shmem::SharedMemory::SharedMemoryType aType,
158 : Shmem* aMem);
159 :
160 : bool
161 : AllocUnsafeShmem(
162 : size_t aSize,
163 : Shmem::SharedMemory::SharedMemoryType aType,
164 : Shmem* aMem);
165 :
166 : bool
167 : AdoptShmem(
168 : Shmem& aMem,
169 : Shmem* aOutMem);
170 :
171 : bool
172 : DeallocShmem(Shmem& aMem);
173 :
174 : private:
175 : virtual void
176 : FatalError(const char* const msg) const;
177 :
178 : void
179 : DestroySubtree(ActorDestroyReason why);
180 :
181 : void
182 : DeallocSubtree();
183 :
184 : template<typename T>
185 : void
186 0 : Write(
187 : const T& __v,
188 : Message* __msg)
189 : {
190 0 : IPC::WriteParam(__msg, __v);
191 0 : }
192 :
193 : template<typename T>
194 : bool
195 0 : Read(
196 : T* __v,
197 : const Message* __msg,
198 : void** __iter)
199 : {
200 0 : return IPC::ReadParam(__msg, __iter, __v);
201 : }
202 :
203 : void
204 : Write(
205 : PCookieServiceParent* __v,
206 : Message* __msg,
207 : bool __nullable);
208 :
209 : bool
210 : Read(
211 : PCookieServiceParent** __v,
212 : const Message* __msg,
213 : void** __iter,
214 : bool __nullable) NS_WARN_UNUSED_RESULT;
215 :
216 : Channel* mChannel;
217 : int32 mId;
218 : mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>* mManager;
219 : State mState;
220 : };
221 :
222 :
223 : } // namespace net
224 : } // namespace mozilla
225 :
226 : #if 0
227 :
228 : //-----------------------------------------------------------------------------
229 : // Skeleton implementation of abstract actor class
230 :
231 : // Header file contents
232 : namespace mozilla {
233 : namespace net {
234 : class CookieServiceParent :
235 : public PCookieServiceParent
236 : {
237 : virtual bool
238 : RecvGetCookieString(
239 : const URI& host,
240 : const bool& isForeign,
241 : const bool& fromHttp,
242 : nsCString* result);
243 :
244 : virtual bool
245 : RecvSetCookieString(
246 : const URI& host,
247 : const bool& isForeign,
248 : const nsCString& cookieString,
249 : const nsCString& serverTime,
250 : const bool& fromHttp);
251 :
252 : CookieServiceParent();
253 : virtual ~CookieServiceParent();
254 : };
255 : } // namespace net
256 : } // namespace mozilla
257 :
258 :
259 : // C++ file contents
260 : namespace mozilla {
261 : namespace net {
262 : bool
263 : CookieServiceParent::RecvGetCookieString(
264 : const URI& host,
265 : const bool& isForeign,
266 : const bool& fromHttp,
267 : nsCString* result)
268 : {
269 : return false;
270 : }
271 :
272 : bool
273 : CookieServiceParent::RecvSetCookieString(
274 : const URI& host,
275 : const bool& isForeign,
276 : const nsCString& cookieString,
277 : const nsCString& serverTime,
278 : const bool& fromHttp)
279 : {
280 : return false;
281 : }
282 :
283 : CookieServiceParent::CookieServiceParent()
284 : {
285 : MOZ_COUNT_CTOR(CookieServiceParent);
286 : }
287 :
288 : CookieServiceParent::~CookieServiceParent()
289 : {
290 : MOZ_COUNT_DTOR(CookieServiceParent);
291 : }
292 :
293 : } // namespace net
294 : } // namespace mozilla
295 : #endif // if 0
296 :
297 : #endif // ifndef PCookieServiceParent_h
|