aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Orbis/Network/Orbis_NPToolkit.h
blob: 1ea72c4f085f87b2723b680b58fb5bcd96a02797 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#pragma once

#include <np_toolkit.h>
#include <np_toolkit/game_custom_data_interface.h>


class OrbisNPToolkit
{
public:
	void init();
	static void sceNpToolkitCallback( const sce::Toolkit::NP::Event& event);
	static void coreCallback( const sce::Toolkit::NP::Event& event);
	static void presenceCallback( const sce::Toolkit::NP::Event& event);
	static void sessionsCallback( const sce::Toolkit::NP::Event& event);
	static void gameCustomDataCallback( const sce::Toolkit::NP::Event& event);
	static void messagingCallback( const sce::Toolkit::NP::Event& event);

	static void createNPSession();
	static void destroyNPSession();
	static void joinNPSession();
	static void leaveNPSession();
	static SceNpSessionId* getNPSessionID() { return &m_currentSessionInfo.npSessionId; }

	static void getMessageData(SceNpGameCustomDataEventParam* paramData);
private:
	static sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::NpSessionInformation> sm_createJoinFuture;
 	static sce::Toolkit::NP::NpSessionInformation m_currentSessionInfo;
	static sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::MessageAttachment> m_messageData;

};

// Singleton
extern OrbisNPToolkit NPToolkit;