-
Notifications
You must be signed in to change notification settings - Fork 4
/
SessionEssentialsOnlineSession_Starter.cpp
63 lines (48 loc) · 1.68 KB
/
SessionEssentialsOnlineSession_Starter.cpp
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// Copyright (c) 2023 AccelByte Inc. All Rights Reserved.
// This is licensed software from AccelByte Inc, for limitations
// and restrictions contact your company contract manager.
#include "SessionEssentialsOnlineSession_Starter.h"
#include "OnlineSubsystemAccelByteSessionSettings.h"
#include "Play/OnlineSessionUtils/AccelByteWarsOnlineSessionLog.h"
void USessionEssentialsOnlineSession_Starter::RegisterOnlineDelegates()
{
Super::RegisterOnlineDelegates();
// TODO: Register OSS delegates
}
void USessionEssentialsOnlineSession_Starter::ClearOnlineDelegates()
{
Super::ClearOnlineDelegates();
// TODO: Unregister OSS delegates
}
FNamedOnlineSession* USessionEssentialsOnlineSession_Starter::GetSession(const FName SessionName)
{
return GetSessionInt()->GetNamedSession(SessionName);
}
EAccelByteV2SessionType USessionEssentialsOnlineSession_Starter::GetSessionType(const FName SessionName)
{
const FNamedOnlineSession* OnlineSession = GetSession(SessionName);
if (!OnlineSession)
{
return EAccelByteV2SessionType::Unknown;
}
const FOnlineSessionSettings& OnlineSessionSettings = OnlineSession->SessionSettings;
return GetABSessionInt()->GetSessionTypeFromSettings(OnlineSessionSettings);
}
FName USessionEssentialsOnlineSession_Starter::GetPredefinedSessionNameFromType(const EAccelByteV2SessionType SessionType)
{
FName SessionName = FName();
switch (SessionType)
{
case EAccelByteV2SessionType::GameSession:
SessionName = GameSessionName;
break;
case EAccelByteV2SessionType::PartySession:
SessionName = PartySessionName;
break;
default: ;
}
return SessionName;
}
#pragma region "Funtions implementation"
// TODO: implement your functions here
#pragma endregion