| 14 | #include <engine/shared/uuid_manager.h> |
| 15 | |
| 16 | class CRegister : public IRegister |
| 17 | { |
| 18 | enum |
| 19 | { |
| 20 | STATUS_NONE = 0, |
| 21 | STATUS_OK, |
| 22 | STATUS_NEEDCHALLENGE, |
| 23 | STATUS_NEEDINFO, |
| 24 | STATUS_ERROR, |
| 25 | }; |
| 26 | |
| 27 | enum |
| 28 | { |
| 29 | PROTOCOL_TW6_IPV6 = 0, |
| 30 | PROTOCOL_TW6_IPV4, |
| 31 | PROTOCOL_TW7_IPV6, |
| 32 | PROTOCOL_TW7_IPV4, |
| 33 | NUM_PROTOCOLS, |
| 34 | }; |
| 35 | |
| 36 | static bool StatusFromString(int *pResult, const char *pString); |
| 37 | static const char *ProtocolToScheme(int Protocol); |
| 38 | static const char *ProtocolToString(int Protocol); |
| 39 | static bool ProtocolFromString(int *pResult, const char *pString); |
| 40 | static const char *ProtocolToSystem(int Protocol); |
| 41 | static IPRESOLVE ProtocolToIpresolve(int Protocol); |
| 42 | |
| 43 | static void ConchainOnConfigChange(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
| 44 | |
| 45 | class CGlobal |
| 46 | { |
| 47 | public: |
| 48 | CLock m_Lock; |
| 49 | int m_InfoSerial GUARDED_BY(m_Lock) = -1; |
| 50 | int m_LatestSuccessfulInfoSerial GUARDED_BY(m_Lock) = -1; |
| 51 | }; |
| 52 | |
| 53 | class CProtocol |
| 54 | { |
| 55 | class CShared |
| 56 | { |
| 57 | public: |
| 58 | CShared(std::shared_ptr<CGlobal> pGlobal) : |
| 59 | m_pGlobal(std::move(pGlobal)) |
| 60 | { |
| 61 | } |
| 62 | |
| 63 | std::shared_ptr<CGlobal> m_pGlobal; |
| 64 | CLock m_Lock; |
| 65 | int m_NumTotalRequests GUARDED_BY(m_Lock) = 0; |
| 66 | int m_LatestResponseStatus GUARDED_BY(m_Lock) = STATUS_NONE; |
| 67 | int m_LatestResponseIndex GUARDED_BY(m_Lock) = -1; |
| 68 | }; |
| 69 | |
| 70 | class CJob : public IJob |
| 71 | { |
| 72 | int m_Protocol; |
| 73 | int m_ServerPort; |
nothing calls this directly
no test coverage detected