wavelength 1.0.0
Loading...
Searching...
No Matches
inetimpl.h
Go to the documentation of this file.
1#pragma once
2
3#include <libeznetcnf.h>
4
5#include "netflow/netinet.h"
6#include "os/string.h"
7
16class InetImpl : public NetInet {
17public:
25
33
40 ~InetImpl() override;
41
48 void LaunchConfigTool() override;
49
57 void RequestConfigs(MsgSink *pSink) override;
58
67 void Connect(MsgSink *pSink, int nConfig) override;
68
76 void Disconnect(MsgSink *pSink) override;
77
86 void LookupHost(MsgSink *pSink, const char *pszHost) override;
87
94 void ClearPending() override;
95
103 void CheckConnection(MsgSink *pSink) override;
104
112 int GetConnectionType() override {
113 return mConnectionType;
114 }
115
116#ifdef VIDEO_STANDARD_PAL
123 int IsDNASPending() override;
124
130 void ClearDNASPending() override;
131#endif
132
139 void RequestPowerOff() override;
140
148 void Poll();
149
150private:
158 static int DownInterface();
159
167 static int ConfigsTask();
168
176 static void OnConfigsTaskDone(int nResult);
177
185 void DeliverConfigs(int nResult);
186
195 static int ConnectTask();
196
204 static void OnConnectTaskDone(int nResult);
205
213 static int LookupTask();
214
222 static void OnLookupTaskDone(int nResult);
223
231 static int StatusTask();
232
240 static void OnStatusTaskDone(int nResult);
241
249 static void AddModule(const char *pszName);
250
259 static int LoadModules();
260
270 static int SelectModules(const ezNetCnfData_t *pData);
271
279 static void OnPowerOff(void *pArg);
280
281 int mState;
282 float mStartTime;
283 int mLinkStatus;
284 String mStatusText;
285 float mTimeout;
286 int mConnectionType;
287 int mConfigId;
288 int mPowerOffRequested;
289 String mHost;
290 int mLookupPending;
291#ifdef VIDEO_STANDARD_PAL
292 int mDNASPending;
293#endif
294 MsgSink *mConnectSink;
295 MsgSink *mLookupSink;
296 MsgSink *mCheckSink;
297 MsgSink *mConfigsSink;
298 MsgSink *mDisconnectSink;
299
306 static InetImpl *sInstance;
307};
State
Values of mState.
Definition inetimpl.h:19
@ kStateStarting
Definition inetimpl.h:21
@ kStateIdle
Definition inetimpl.h:20
@ kStateConnected
Definition inetimpl.h:23
@ kStateConnecting
Definition inetimpl.h:22
void LookupHost(MsgSink *pSink, const char *pszHost) override
Vtable slot 6.
void Connect(MsgSink *pSink, int nConfig) override
Vtable slot 4.
int GetConnectionType() override
Vtable slot 9.
Definition inetimpl.h:112
InetImpl()
Construct the connection and make it TheNetInet.
void RequestPowerOff() override
Vtable slot 10, and slot 12 in the European release.
void ClearPending() override
Vtable slot 7.
~InetImpl() override
Vtable slot 1.
void Poll()
Service the connection once per frame: report the disconnection, the progress of a connection,...
void CheckConnection(MsgSink *pSink) override
Vtable slot 8.
void RequestConfigs(MsgSink *pSink) override
Vtable slot 3.
void Disconnect(MsgSink *pSink) override
Vtable slot 5.
void LaunchConfigTool() override
Vtable slot 2.
Receiver of engine messages.
Definition msgsink.h:21
Network connection of the console.
Definition netinet.h:13
Growable text buffer that is also a PrnStream.
Definition string.h:19