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