1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 : #ifndef POfflineCacheUpdateParent_h
7 : #define POfflineCacheUpdateParent_h
8 :
9 : #include "mozilla/docshell/POfflineCacheUpdate.h"
10 : namespace mozilla {
11 : namespace dom {
12 : class PBrowserParent;
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 PBrowserParent;
26 : } // namespace dom
27 : } // namespace mozilla
28 :
29 : namespace mozilla {
30 : namespace docshell {
31 :
32 :
33 : class /*NS_ABSTRACT_CLASS*/ POfflineCacheUpdateParent :
34 : protected mozilla::ipc::RPCChannel::RPCListener,
35 : protected mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>
36 : {
37 : friend class mozilla::dom::PBrowserParent;
38 :
39 : protected:
40 : typedef mozilla::ipc::ActorHandle ActorHandle;
41 : typedef mozilla::ipc::Shmem Shmem;
42 : typedef IPC::URI URI;
43 : typedef mozilla::dom::PBrowserParent PBrowserParent;
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 : Recv__delete__();
53 :
54 : virtual void
55 : ActorDestroy(ActorDestroyReason why);
56 :
57 : public:
58 : typedef IPC::Message Message;
59 : typedef mozilla::ipc::RPCChannel Channel;
60 : typedef mozilla::ipc::RPCChannel::RPCListener ChannelListener;
61 : typedef base::ProcessHandle ProcessHandle;
62 : typedef mozilla::ipc::AsyncChannel AsyncChannel;
63 : typedef mozilla::ipc::SharedMemory SharedMemory;
64 : typedef mozilla::ipc::Trigger Trigger;
65 :
66 : public:
67 : POfflineCacheUpdateParent();
68 :
69 : virtual ~POfflineCacheUpdateParent();
70 :
71 : PBrowserParent*
72 : Manager();
73 :
74 : POfflineCacheUpdate::State
75 : state();
76 :
77 : bool
78 : SendNotifyStateEvent(const PRUint32& stateEvent) NS_WARN_UNUSED_RESULT;
79 :
80 : bool
81 : SendAssociateDocuments(
82 : const nsCString& cacheGroupId,
83 : const nsCString& cacheClientId) NS_WARN_UNUSED_RESULT;
84 :
85 : bool
86 : SendFinish(
87 : const bool& succeded,
88 : const bool& isUpgrate) NS_WARN_UNUSED_RESULT;
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 : POfflineCacheUpdateParent* __v,
206 : Message* __msg,
207 : bool __nullable);
208 :
209 : bool
210 : Read(
211 : POfflineCacheUpdateParent** __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 docshell
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 docshell {
234 : class OfflineCacheUpdateParent :
235 : public POfflineCacheUpdateParent
236 : {
237 : OfflineCacheUpdateParent();
238 : virtual ~OfflineCacheUpdateParent();
239 : };
240 : } // namespace docshell
241 : } // namespace mozilla
242 :
243 :
244 : // C++ file contents
245 : namespace mozilla {
246 : namespace docshell {
247 : OfflineCacheUpdateParent::OfflineCacheUpdateParent()
248 : {
249 : MOZ_COUNT_CTOR(OfflineCacheUpdateParent);
250 : }
251 :
252 : OfflineCacheUpdateParent::~OfflineCacheUpdateParent()
253 : {
254 : MOZ_COUNT_DTOR(OfflineCacheUpdateParent);
255 : }
256 :
257 : } // namespace docshell
258 : } // namespace mozilla
259 : #endif // if 0
260 :
261 : #endif // ifndef POfflineCacheUpdateParent_h
|