Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions Modules/EpicOnlineServices/RNEOSLobbyManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,25 @@ namespace RN
return RNSTR("<" << GetClass()->GetFullname() << ":" << (void *)this << ">\n{\n lobbyName: " << lobbyName << ",\n lobbyLevel: " << lobbyLevel << ",\n lobbyVersion: " << lobbyVersion << ",\n maximumPlayerCount: " << maximumPlayerCount << ",\n currentPlayerCount: " << currentPlayerCount << "\n}");
}

String *EOSLobbyInfo::GetAttribute(const String *key) const
{
if(!lobbyHandle || !key) return nullptr;

EOS_LobbyDetails_CopyAttributeByKeyOptions options;
options.ApiVersion = EOS_LOBBYDETAILS_COPYATTRIBUTEBYKEY_API_LATEST;
options.AttrKey = key->GetUTF8String();

EOS_Lobby_Attribute *attribute = nullptr;
if(EOS_LobbyDetails_CopyAttributeByKey(lobbyHandle, &options, &attribute) == EOS_EResult::EOS_Success && attribute)
{
String *value = new String(attribute->Data->Value.AsUtf8);
EOS_Lobby_Attribute_Release(attribute);
return value->Autorelease();
}

return nullptr;
}

EOSLobbyManager::EOSLobbyManager(EOSWorld *world) :
_isVoiceEnabled(false), _isVoiceUnmixed(true), _isLocalPlayerMuted(false), _audioReceivedCallback(nullptr), _audioBeforeSendCallback(nullptr)
{
Expand Down
1 change: 1 addition & 0 deletions Modules/EpicOnlineServices/RNEOSLobbyManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ namespace RN
EOS_ProductUserId ownerHandle;

EOSAPI const String *GetDescription() const override;
EOSAPI String *GetAttribute(const String *key) const;

private:
RNDeclareMetaAPI(EOSLobbyInfo, EOSAPI)
Expand Down