-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Luke Gehorsam
committed
May 11, 2021
1 parent
9c9716e
commit c69fd1c
Showing
40 changed files
with
1,752 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/** | ||
* Copyright 2021 The Nakama Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
namespace Nakama | ||
{ | ||
/// <summary> | ||
/// Incoming information about a party. | ||
/// </summary> | ||
public interface IParty | ||
{ | ||
/// <summary> | ||
/// Unique party identifier. | ||
/// </summary> | ||
string PartyId { get; } | ||
|
||
/// <summary> | ||
/// Open flag. | ||
/// </summary> | ||
bool Open { get; } | ||
|
||
/// <summary> | ||
/// Maximum number of party members. | ||
/// </summary> | ||
int MaxSize { get; } | ||
|
||
/// <summary> | ||
/// Self. | ||
/// </summary> | ||
IUserPresence Self { get; } | ||
|
||
/// <summary> | ||
/// Leader | ||
/// </summary> | ||
IUserPresence Leader { get; } | ||
|
||
/// <summary> | ||
/// All current party members. | ||
/// </summary> | ||
IUserPresence[] Presences { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* Copyright 2021 The Nakama Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
namespace Nakama | ||
{ | ||
// Accept a request to join. | ||
public interface IPartyAccept | ||
{ | ||
/// <summary> | ||
/// Party ID to accept a join request for. | ||
/// </summary> | ||
string PartyId { get; set; } | ||
|
||
/// <summary> | ||
/// The presence to accept as a party member. | ||
/// </summary> | ||
IUserPresence Presence { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* Copyright 2021 The Nakama Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
namespace Nakama | ||
{ | ||
/// <summary> | ||
/// End a party, kicking all party members and closing it. | ||
/// </summary> | ||
public interface IPartyClose | ||
{ | ||
/// <summary> | ||
/// Party ID to close. | ||
/// </summary> | ||
string PartyId { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
|
||
/** | ||
* Copyright 2021 The Nakama Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
namespace Nakama | ||
{ | ||
/// <summary> | ||
/// Create a party. | ||
/// </summary> | ||
public interface IPartyCreate | ||
{ | ||
/// <summary> | ||
/// Whether or not the party will require join requests to be approved by the party leader. | ||
/// </summary> | ||
bool Open { get; } | ||
|
||
/// <summary> | ||
/// Maximum number of party members. | ||
/// </summary> | ||
int MaxSize { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* Copyright 2021 The Nakama Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
namespace Nakama | ||
{ | ||
/// <summary> | ||
/// Incoming party data delivered from the server. | ||
/// </summary> | ||
public interface IPartyData | ||
{ | ||
/// <summary> | ||
/// The party ID. | ||
/// </summary> | ||
string PartyId { get; } | ||
|
||
/// <summary> | ||
/// A reference to the user presence that sent this data, if any. | ||
/// </summary> | ||
IUserPresence Presence { get; } | ||
|
||
/// <summary> | ||
/// Op code value. | ||
/// </summary> | ||
int OpCode { get; } | ||
|
||
/// <summary> | ||
/// Data payload, if any. | ||
/// </summary> | ||
byte[] Data { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* Copyright 2021 The Nakama Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
namespace Nakama | ||
{ | ||
/// <summary> | ||
// Send data to a party. | ||
/// </summary> | ||
public interface IPartyDataSend | ||
{ | ||
/// <summary> | ||
/// Party ID to send to. | ||
/// </summary> | ||
string PartyId { get; } | ||
|
||
/// <summary> | ||
/// Op code value. | ||
/// </summary> | ||
int OpCode { get; } | ||
|
||
/// <summary> | ||
/// Data payload, if any. | ||
/// </summary> | ||
byte[] Data { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* Copyright 2021 The Nakama Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
namespace Nakama | ||
{ | ||
/// <summary> | ||
/// Join a party, or request to join if the party is not open. | ||
/// </summary> | ||
public interface IPartyJoin | ||
{ | ||
/// <summary> | ||
/// Party ID to join. | ||
/// </summary> | ||
string PartyId { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* Copyright 2021 The Nakama Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
namespace Nakama | ||
{ | ||
/// <summary> | ||
/// Incoming notification for one or more new presences attempting to join the party. | ||
/// </summary> | ||
public interface IPartyJoinRequest | ||
{ | ||
/// <summary> | ||
/// Party ID to get a list of join requests for. | ||
/// </summary> | ||
string PartyId { get; } | ||
|
||
/// <summary> | ||
/// Presences attempting to join. | ||
/// </summary> | ||
IUserPresence[] Presences { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* Copyright 2021 The Nakama Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
namespace Nakama | ||
{ | ||
/// <summary> | ||
/// Request a list of pending join requests for a party. | ||
/// </summary> | ||
public interface IPartyJoinRequestList | ||
{ | ||
/// <summary> | ||
/// Party ID to get a list of join requests for. | ||
/// </summary> | ||
string PartyId { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* Copyright 2021 The Nakama Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
namespace Nakama | ||
{ | ||
/// <summary> | ||
/// Announcement of a new party leader. | ||
/// </summary> | ||
public interface IPartyLeader | ||
{ | ||
/// <summary> | ||
/// Party ID to announce the new leader for. | ||
/// </summary> | ||
string PartyId { get; } | ||
|
||
/// <summary> | ||
/// The presence of the new party leader. | ||
/// </summary> | ||
IUserPresence Presence { get; } | ||
} | ||
} |
Oops, something went wrong.