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