wavelength 1.0.0
Loading...
Searching...
No Matches
mcnetconfigtask.h
Go to the documentation of this file.
1#pragma once
2
3#include <list>
4
5#include "app/msgsink.h"
7#include "msg/message.h"
10
18class MCNetConfigTask : public MemcardTask, public MsgSink {
19public:
26 ~MCNetConfigTask() override = default;
27
34 MCNetConfigTask() = default;
35
43 void Set(int nPort);
44
53 bool DispatchPriv(Message *pMsg) override;
54
56 std::list<InetConfig> &GetConfigs() {
57 return mConfigs;
58 }
59
61 const std::list<InetConfig> &GetConfigs() const {
62 return mConfigs;
63 }
64
65protected:
72 void OnStart() override;
73
74private:
83 bool OnConfigsResult(InetConfigsResultMsg *pMsg);
84
85 std::list<InetConfig> mConfigs;
86};
Message that reports the network configurations NetInet::RequestConfigs() found.
Definition inetconfigsresultmsg.h:23
std::list< InetConfig > & GetConfigs()
Definition mcnetconfigtask.h:56
bool DispatchPriv(Message *pMsg) override
Pass the result of the request to OnConfigsResult().
MCNetConfigTask()=default
Construct the task.
void Set(int nPort)
Prepare the task.
void OnStart() override
Clear mConfigs and send the request.
~MCNetConfigTask() override=default
Destroy the object.
const std::list< InetConfig > & GetConfigs() const
Definition mcnetconfigtask.h:61
MemcardTask()
Construct an idle task for the first slot.
Definition memcardtask.h:41
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
Receiver of engine messages.
Definition msgsink.h:21