Free Electron
ChunkReceiver.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __netsignal_ChunkReceiver_h__
8 #define __netsignal_ChunkReceiver_h__
9 namespace fe
10 {
11 namespace ext
12 {
13 
14 class ChunkReceiver;
15 
16 class FE_DL_EXPORT ChunkReceiverTask: public Thread::Functor
17 {
18  public:
19  ChunkReceiverTask(void);
20 virtual void operate(void);
21 
22  sp<ChunkSpool> m_spChunkSpool;
23  sp<Socket> m_spSocket;
24  ChunkReceiver *m_pChunkReceiver;
25 
26  Array< sp<Chunk> > m_spChunkPool;
27  I32 m_poolIndex;
28 };
29 
30 class FE_DL_EXPORT ChunkReceiver : public Component
31 {
32  public:
33  ChunkReceiver(void);
34 virtual ~ChunkReceiver(void);
35 
36 virtual void start(sp<ChunkSpool> spChunkSpool, sp<Socket> spSocket,
37  String ioPriority="normal");
38 virtual void stop(void);
39 virtual bool live(void);
40 
41 virtual void setLive(bool setting);
42 
43  void setPolling(sp<SignalerI> a_spSignaler,
44  sp<Layout> a_spPollLayout);
45  void poll(void);
46 
47  private:
48  Thread* m_pChunkReceiverThread;
49  ChunkReceiverTask m_chunkReceiverTask;
50  bool m_operating;
51  Poison m_poison;
52  bool m_live;
53  Mutex m_liveMutex;
54  sp<SignalerI> m_spSignaler;
55  Record m_poll;
56 
57 };
58 
59 } /* namespace ext */
60 } /* namespace fe */
61 
62 #endif /* __netsignal_ChunkReceiver_h__ */
63 
kernel
Definition: namespace.dox:3