1 : //
2 : // Automatically generated by ipdlc.
3 : // Edit at your own risk
4 : //
5 :
6 : #ifndef PPluginIdentifierParent_h
7 : #define PPluginIdentifierParent_h
8 :
9 : #include "mozilla/plugins/PPluginIdentifier.h"
10 : namespace mozilla {
11 : namespace plugins {
12 : class PPluginModuleParent;
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 PPluginScriptableObjectParent;
26 : } // namespace plugins
27 : } // namespace mozilla
28 :
29 :
30 : namespace mozilla {
31 : namespace plugins {
32 : class PPluginModuleParent;
33 : } // namespace plugins
34 : } // namespace mozilla
35 :
36 : namespace mozilla {
37 : namespace plugins {
38 :
39 :
40 : class /*NS_ABSTRACT_CLASS*/ PPluginIdentifierParent :
41 : protected mozilla::ipc::RPCChannel::RPCListener,
42 : protected mozilla::ipc::IProtocolManager<mozilla::ipc::RPCChannel::RPCListener>
43 : {
44 : friend class mozilla::plugins::PPluginScriptableObjectParent;
45 :
46 : friend class mozilla::plugins::PPluginModuleParent;
47 :
48 : protected:
49 : typedef mozilla::ipc::ActorHandle ActorHandle;
50 : typedef mozilla::ipc::Shmem Shmem;
51 : typedef mozilla::plugins::PPluginModuleParent PPluginModuleParent;
52 : typedef base::ProcessId ProcessId;
53 : typedef mozilla::ipc::ProtocolId ProtocolId;
54 : typedef mozilla::ipc::Transport Transport;
55 : typedef mozilla::ipc::TransportDescriptor TransportDescriptor;
56 :
57 : typedef PPluginIdentifier::State State;
58 :
59 : virtual bool
60 : RecvRetain() = 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 : PPluginIdentifierParent();
76 :
77 : virtual ~PPluginIdentifierParent();
78 :
79 : PPluginModuleParent*
80 : Manager();
81 :
82 : PPluginIdentifier::State
83 : state();
84 :
85 : static bool
86 : Send__delete__(PPluginIdentifierParent* actor) NS_WARN_UNUSED_RESULT;
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 : PPluginIdentifierParent* __v,
204 : Message* __msg,
205 : bool __nullable);
206 :
207 : bool
208 : Read(
209 : PPluginIdentifierParent** __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 plugins
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 plugins {
232 : class PluginIdentifierParent :
233 : public PPluginIdentifierParent
234 : {
235 : virtual bool
236 : RecvRetain();
237 :
238 : PluginIdentifierParent();
239 : virtual ~PluginIdentifierParent();
240 : };
241 : } // namespace plugins
242 : } // namespace mozilla
243 :
244 :
245 : // C++ file contents
246 : namespace mozilla {
247 : namespace plugins {
248 : bool
249 : PluginIdentifierParent::RecvRetain()
250 : {
251 : return false;
252 : }
253 :
254 : PluginIdentifierParent::PluginIdentifierParent()
255 : {
256 : MOZ_COUNT_CTOR(PluginIdentifierParent);
257 : }
258 :
259 : PluginIdentifierParent::~PluginIdentifierParent()
260 : {
261 : MOZ_COUNT_DTOR(PluginIdentifierParent);
262 : }
263 :
264 : } // namespace plugins
265 : } // namespace mozilla
266 : #endif // if 0
267 :
268 : #endif // ifndef PPluginIdentifierParent_h
|