Free Electron
Client.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_Client_h__
8 #define __netsignal_Client_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 class FE_DL_EXPORT ClientI:
16  virtual public Component,
17  public CastableAs<ClientI>
18 {
19  public:
20 virtual void setScope(sp<Scope> spScope) = 0;
21 virtual void addLayout(sp<Layout> spLayout) = 0;
22 virtual void start(sp<SignalerI> spSignalerI,
23  String a_host,
24  unsigned short a_port,
25  sp<Layout> spPollLayout,
26  Socket::Transport transport=Socket::e_tcp,
27  String ioPriority="normal") = 0;
28 virtual void stop(void) = 0;
29 virtual BWORD receiving(void) = 0;
30 };
31 
32 class BSDClient : public ClientI
33 {
34  public:
35  BSDClient(void);
36 virtual ~BSDClient(void);
37 
38 virtual void setScope(sp<Scope> spScope);
39 virtual void addLayout(sp<Layout> spLayout);
40 virtual void start(sp<SignalerI> spSignalerI,
41  String a_host,
42  unsigned short a_port,
43  sp<Layout> spPollLayout,
44  Socket::Transport transport=Socket::e_tcp,
45  String ioPriority="normal");
46 virtual void stop(void);
47 virtual bool receiving(void)
48  { return (m_spChunkReceiver.isValid() &&
49  m_spChunkReceiver->live()); }
50 
51  private:
52  sp<SignalerI> m_spSignalerI;
53  sp<Scope> m_spScope;
54  sp<HandlerI> m_spSignalSender;
55  sp<HandlerI> m_spSignalReceiver;
56  SockAddr m_serverAddr;
57  std::list<sp<Layout> > m_layouts;
58  bool m_operating;
59  sp<Layout> m_spPollLayout;
60  sp<ChunkReceiver> m_spChunkReceiver;
61  sp<ChunkSender> m_spChunkSender;
62 
63 
64 };
65 
66 } /* namespace ext */
67 } /* namespace fe */
68 
69 #endif /* __netsignal_Client_h__ */
70 
kernel
Definition: namespace.dox:3