17 #include <pia/inet/inet_definitions.h> 18 #include <pia/common/common_SignatureSetting.h> 19 #include <pia/transport/transport_NetworkFactory.h> 24 #pragma diag_suppress 1300 27 #include <OnlineCore/src/Platform/Core/qList.h> 28 #include <OnlineCore/src/Transport/Interface/StationURL.h> 29 #include <RendezVous/Core/src/Client/Credentials.h> 30 #include <RendezVous/Core/src/Common/Constants/NotificationEvents.h> 31 #if NN_PIA_ENABLE_LOOSE_COUPLING_NEX 32 #include <RendezVous/Services/NATTraversal/src/Client/NATTraversalClient.h> 35 #include <RendezVous/Services/MatchMaking.h> 37 #include <RendezVous/Services/Jugem/Login/src/Client/NgsFacade.h> 39 #if NN_PIA_ENABLE_NGS_BRIDGE 41 #include <RendezVous\/Services/Jugem/Login/src/Client/NgsBridgeInterface.h> 44 #include <RendezVous/Services/Jugem/Matchmake/src/Client/MatchmakeExtensionClient.h> 46 #if NN_PIA_ENABLE_MATCHMAKE_REFEREE 47 #include <RendezVous/Services/Jugem/MatchmakeReferee/src/Client/MatchmakeRefereeClient.h> 51 #pragma diag_default 1300 54 #else // Not NN_PIA_NEX_3. 56 #include <Platform/Core/String.h> 57 #include <Platform/Core/qList.h> 58 #include <Plugins/Transport/Interface/StationURL.h> 59 #include <Services/Foundation/Client/Credentials.h> 60 #include <Services/MatchMaking.h> 61 #if NN_PIA_ENABLE_LOOSE_COUPLING_NEX 62 #include <Services/NATTraversalClient.h> 65 #include <RVPackages/Jugem/Game/Login/Client/NgsFacade.h> 66 #include <RVPackages/Jugem/Game/Matchmake/Client/MatchmakeExtensionClient.h> 68 #endif // end NN_PIA_NEX_3 87 class StationConnectionInfo;
98 #if NN_PIA_ENABLE_LOOSE_COUPLING_NEX 101 class NexNatTraversalClient;
102 class NexNotificationDataJob;
105 class SocketOutputStream;
106 class SocketInputStream;
156 FILTERING_UNKNOWN = 0,
167 : pNgsFacade(NULL), gameServerId(0)
182 static nn::Result CreateInstance(
void);
190 static void DestroyInstance(
void);
214 static nn::Result ConvertNexStationUrlToStationConnectionInfo(
215 const nn::nex::qList<nn::nex::StationURL>& nexStationUrlList,
294 static void ConvertStationLocationToStationUrlNexList(
295 const nn::nex::qList<transport::StationLocation>& stationLocationList,
296 nn::nex::qList<nn::nex::StationURL>* pStationUrlList);
302 static void ConvertStationUrlToStationLocationNexList(
303 const nn::nex::qList<nn::nex::StationURL>& stationUrlList,
304 nn::nex::qList<transport::StationLocation>* pStationLocationList);
329 static nn::Result ConvertNexSignatureKeyToSignatureSetting(
330 const nn::nex::qVector<nn::nex::qByte>& nexSignatureKey,
337 static void EnableLanNetwork(
bool o)
347 static bool IsLanNetwork()
356 nn::Result CreateProtocols();
396 Result UpdateNotificationDataAsync(nn::nex::NotificationEvents::NotificationEvents gameNotificationType, u32 param1, u32 param2,
const wchar_t* strParam,
size_t strParamLength);
404 bool IsCompletedUpdateNotificationData()
const;
415 Result GetUpdateNotificationDataResult()
const;
429 Result RetrieveNotificationDataAsync(u8 gameNotificationTypeBitMask, nn::nex::qList<nn::nex::NotificationEvent>* pRetrievedEventList);
437 bool IsCompletedRetrieveNotificationData()
const;
448 Result GetRetrieveNotificationDataResult()
const;
467 virtual nn::Result Startup();
474 virtual void Cleanup();
526 virtual nn::Result StartNatSession(
575 virtual nn::Result StartNatSessionAsync();
584 virtual bool IsCompletedStartNatSession()
const;
599 virtual nn::Result GetStartNatSessionResult()
const;
612 virtual nn::Result CancelStartNatSessionAsync();
619 virtual void StopNatSession();
625 nn::Result CompleteStartNatSession(u16 port);
632 virtual void Trace(u64 flag)
const;
641 return m_IsStartedUp;
651 return m_IsStartedNatSession;
658 NatTraverser* GetNatTraverser()
660 return m_pNatTraverser;
669 nn::nex::MatchmakeExtensionClient* GetMatchMakingClient()
671 return &m_MatchMakingClient;
674 #if NN_PIA_ENABLE_NGS_BRIDGE 682 nn::nex::NgsBridgeInterface* GetNgsInterface()
684 return m_pNgsInterface;
694 nn::nex::NgsFacade* GetNgsInterface()
696 return m_pNgsInterface;
707 u32 GetGameServerId()
const 709 return m_GameServerId;
719 void UpdateGatheringID(nn::nex::GatheringID gatheringID);
728 nn::nex::GatheringID GetGatheringID()
730 return m_GatheringID;
739 Mapping GetNatPropertyMapping();
753 u32 GetNatPropertyPortIncrement();
760 u16 GetNatPropertyPublicPort();
767 u16 GetNatPropertyInterfacePort();
781 nn::Result SetNatTraversalTimeout(s32 timeout);
787 s32 GetNatTraversalTimeout()
789 return m_NatTraversalTimeout;
804 nn::Result SetNatTraversalTimeoutEdmExtension(s32 timeout);
810 s32 GetNatTraversalTimeoutEdmExtension()
812 return m_NatTraversalTimeoutEdmExtension;
831 void SetSuspendBossDaemonOnNATSession(
bool isSuspendBossDaemon)
833 m_IsSuspendBossDaemon = isSuspendBossDaemon;
843 bool GetSuspendBossDaemonOnNATSession()
const 845 return m_IsSuspendBossDaemon;
857 bool RegisterNexNotificationEventHandler4Pia(nn::nex::NotificationEventHandler* pEventHandler);
866 bool UnregisterNexNotificationEventHandler4Pia(nn::nex::NotificationEventHandler* pEventHandler);
868 #if NN_PIA_ENABLE_MATCHMAKE_REFEREE 869 nn::nex::MatchmakeRefereeClient* GetMatchmakeRefereeClient()
871 return m_pMatchmakeRefereeClient;
878 static bool s_LanNetwork;
904 void suspendBossDaemon();
905 void resumeBossDaemon();
911 #if NN_PIA_ENABLE_NGS_BRIDGE 912 nn::nex::NgsBridgeInterface* m_pNgsInterface;
914 nn::nex::NgsFacade* m_pNgsInterface;
916 nn::nex::MatchmakeExtensionClient m_MatchMakingClient;
917 nn::nex::GatheringID m_GatheringID;
919 u8* m_pNatTraversalClientBuffer;
920 #if NN_PIA_ENABLE_LOOSE_COUPLING_NEX 921 nn::nex::NATTraversalRelayClient* m_pNatTraversalRelayClient;
922 NexNatRelay* m_pNexNatRelay;
924 NexNatTraversalClient* m_pNatTraversalClient;
927 NatTraverser* m_pNatTraverser;
929 #if NN_PIA_ENABLE_MATCHMAKE_REFEREE 930 u8* m_pMatchmakeRefereeClientBuffer;
931 nn::nex::MatchmakeRefereeClient* m_pMatchmakeRefereeClient;
934 SocketOutputStream* m_pOutputStream;
935 SocketInputStream* m_pInputStream;
938 bool m_IsStartedNatSession;
940 s32 m_NatTraversalTimeout;
941 s32 m_NatTraversalTimeoutEdmExtension;
944 bool m_IsSuspendBossDaemon;
945 s32 m_NdmInitializeCount;
948 nn::nex::NotificationEventHandler* m_pNexNotificationEventHandler;
950 NexNotificationDataJob* m_pNexNotificationDataJob;
952 u8 m_InternalAsyncProcessType;
Information about the NEX game server that was logged in to.
Definition: inet_NexFacade.h:164
void Finalize(void)
Finalizes the common module.
This class maintains signature setting information.
Definition: common_SignatureSetting.h:33
static const TraceFlag TRACE_FLAG_INET
Flag for tracing the PiaInet module.
Definition: common_Trace.h:141
void Unbind()
Deletes the information on the registered local address.
nn::Result Bind(u32 localAddress)
Registers a local address.
static NexFacade * GetInstance(void)
Gets the pointer to the NexFacade instance (singleton pattern).
Definition: inet_NexFacade.h:197
Specifies port independent filtering (PIF).
Definition: inet_NexFacade.h:157
Class for representing strings.
Definition: common_String.h:35
bool IsStartedNatSession()
Checks whether the NAT session (P2P communication) has started.
Definition: inet_NexFacade.h:649
Filtering
The NAT filtering type.
Definition: inet_NexFacade.h:154
Represents the calling context.
Definition: common_CallContext.h:43
Represents an address used to uniquely identify stations.
Definition: transport_StationConnectionInfo.h:35
nn::Result Initialize(void *pMem, u32 size)
Initializes the common module.
Mapping
The NAT port mapping type.
Definition: inet_NexFacade.h:143
Represents the NEX library facade (interface wrapper) class.
Definition: inet_NexFacade.h:136
u32 gameServerId
The game server ID specified when logging in to the game server.
Definition: inet_NexFacade.h:171
nn::nex::NgsFacade * pNgsFacade
The nn::nex::NgsFacade instance that was logged in to on the game server.
Definition: inet_NexFacade.h:170
Class that represents an Internet address.
Definition: common_InetAddress.h:52
bool IsStartedUp()
Checks whether the NexFacade feature is in a started state.
Definition: inet_NexFacade.h:639
Specifies endpoint independent mapping (EIM).
Definition: inet_NexFacade.h:146
Represents an address used to uniquely identify stations.
Definition: transport_StationLocation.h:59
This is the common base class used inside the Pia library.
Definition: common_RootObject.h:40