mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2024-11-11 06:39:25 +01:00
add games api
This commit is contained in:
parent
51509859ae
commit
cc8bf2f3f1
@ -0,0 +1,47 @@
|
||||
package com.google.android.gms.games.internal;
|
||||
|
||||
import com.google.android.gms.common.data.DataHolder;
|
||||
import com.google.android.gms.games.multiplayer.realtime.RealTimeMessage;
|
||||
|
||||
interface IGamesCallbacks {
|
||||
void onAuthTokenLoaded(int statusCode, String authToken) = 5000;
|
||||
void onAchievementsLoaded(in DataHolder data) = 5001;
|
||||
void onAchievementUpdated(int statusCode, String achievementId) = 5002;
|
||||
void onLeaderboardsLoaded(in DataHolder data) = 5003;
|
||||
void onLeaderboardScoresLoaded(in DataHolder leaderboard, in DataHolder scores) = 5004;
|
||||
void onScoreSubmitted(in DataHolder data) = 5005;
|
||||
void onPlayersLoaded(in DataHolder data) = 5006;
|
||||
void onExtendedPlayersLoaded(in DataHolder data) = 5007;
|
||||
void onGamesLoaded(in DataHolder data) = 5008;
|
||||
void onExtendedGamesLoaded(in DataHolder data) = 5009;
|
||||
void onGameInstancesLoaded(in DataHolder data) = 5010;
|
||||
void onGameplayAclLoaded(in DataHolder data) = 5011;
|
||||
void onGameplayAclUpdated(int statusCode) = 5012;
|
||||
void onFAclLoaded(in DataHolder data) = 5013;
|
||||
void onFAclUpdated(int statusCode) = 5014;
|
||||
void onSignOutComplete() = 5015;
|
||||
void onInvitationsLoaded(in DataHolder data) = 5016;
|
||||
void onRoomCreated(in DataHolder data) = 5017;
|
||||
void onJoinedRoom(in DataHolder data) = 5018;
|
||||
void onLeftRoom(int statusCode, String roomId) = 5019;
|
||||
void onRoomConnecting(in DataHolder data) = 5020;
|
||||
void onRoomAutoMatching(in DataHolder data) = 5021;
|
||||
void onRoomConnected(in DataHolder data) = 5022;
|
||||
void onConnectedToRoom(in DataHolder data) = 5023;
|
||||
void onDisconnectedFromRoom(in DataHolder data) = 5024;
|
||||
void onPeerInvitedToRoom(in DataHolder data, in String[] participantIds) = 5025;
|
||||
void onPeerJoinedRoom(in DataHolder data, in String[] participantIds) = 5026;
|
||||
void onPeerLeftRoom(in DataHolder data, in String[] participantIds) = 5027;
|
||||
void onPeerDeclined(in DataHolder data, in String[] participantIds) = 5028;
|
||||
void onPeerConnected(in DataHolder data, in String[] participantIds) = 5029;
|
||||
void onPeerDisconnected(in DataHolder data, in String[] participantIds) = 5030;
|
||||
void onRealTimeMessageReceived(in RealTimeMessage message) = 5031;
|
||||
void onMessageSent(int statusCode, int messageId, String recipientParticipantId) = 5032;
|
||||
void onGameMuteStatusChanged(int statusCode, String externalGameId, boolean isMuted) = 5033;
|
||||
void onNotifyAclLoaded(in DataHolder data) = 5034;
|
||||
void onNotifyAclUpdated(int statusCode) = 5035;
|
||||
void onInvitationReceived(in DataHolder data) = 5036;
|
||||
void onGameMuteStatusLoaded(in DataHolder data) = 5037;
|
||||
void onContactSettingsLoaded(in DataHolder data) = 5038;
|
||||
void onContactSettingsUpdated(int statusCode) = 5039;
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package com.google.android.gms.games.internal;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import com.google.android.gms.games.internal.IGamesCallbacks;
|
||||
import com.google.android.gms.common.data.DataHolder;
|
||||
|
||||
interface IGamesService {
|
||||
void clientDisconnecting(long clientId) = 5000;
|
||||
void signOut(IGamesCallbacks callbacks) = 5001;
|
||||
String getAppId() = 5002;
|
||||
Bundle getConnectionHint() = 5003;
|
||||
void showWelcomePopup(IBinder windowToken, in Bundle extraArgs) = 5004;
|
||||
void cancelPopups() = 5005;
|
||||
String getCurrentAccountName() = 5006;
|
||||
void loadGameplayAclInternal(IGamesCallbacks callbacks, String gameId) = 5007;
|
||||
void updateGameplayAclInternal(IGamesCallbacks callbacks, String gameId, String aclData) = 5008;
|
||||
void loadFAclInternal(IGamesCallbacks callbacks, String gameId) = 5009;
|
||||
void updateFAclInternal(IGamesCallbacks callbacks, String gameId, boolean allCirclesVisible, in long[] circleIds) = 5010;
|
||||
String getCurrentPlayerId() = 5011;
|
||||
DataHolder getCurrentPlayer() = 5012;
|
||||
void loadPlayer(IGamesCallbacks callbacks, String playerId) = 5013;
|
||||
void loadInvitablePlayers(IGamesCallbacks callbacks, int pageSize, boolean expandCachedData, boolean forceReload) = 5014;
|
||||
void submitScore(IGamesCallbacks callbacks, String leaderboardId, long score) = 5015;
|
||||
void loadLeaderboards(IGamesCallbacks callbacks) = 5016;
|
||||
void loadLeaderboard(IGamesCallbacks callbacks, String leaderboardId) = 5017;
|
||||
void loadTopScores(IGamesCallbacks callbacks, String leaderboardId, int span, int leaderboardCollection, int maxResults, boolean forceReload) = 5018;
|
||||
void loadPlayerCenteredScores(IGamesCallbacks callbacks, String leaderboardId, int span, int leaderboardCollection, int maxResults, boolean forceReload) = 5019;
|
||||
void loadMoreScores(IGamesCallbacks callbacks, in Bundle previousheader, int maxResults, int pageDirection) = 5020;
|
||||
void loadAchievements(IGamesCallbacks callbacks) = 5021;
|
||||
void revealAchievement(IGamesCallbacks callbacks, String achievementId, IBinder windowToken, in Bundle extraArgs) = 5022;
|
||||
void unlockAchievement(IGamesCallbacks callbacks, String achievementId, IBinder windowToken, in Bundle extraArgs) = 5023;
|
||||
void incrementAchievement(IGamesCallbacks callbacks, String achievementId, int numSteps, IBinder windowToken, in Bundle extraArgs) = 5024;
|
||||
void loadGame(IGamesCallbacks callbacks) = 5025;
|
||||
void loadInvitations(IGamesCallbacks callbacks) = 5026;
|
||||
void declineInvitation(String invitationId, int invitationType) = 5027;
|
||||
void dismissInvitation(String invitationId, int invitationType) = 5028;
|
||||
void createRoom(IGamesCallbacks callbacks, IBinder processBinder, int variant, in String[] invitedPlayerIds, in Bundle autoMatchCriteria, boolean enableSockets, long clientId) = 5029;
|
||||
void joinRoom(IGamesCallbacks callbacks, IBinder processBinder, String matchId, boolean enableSockets, long clientId) = 5030;
|
||||
void leaveRoom(IGamesCallbacks callbacks, String matchId) = 5031;
|
||||
int sendReliableMessage(IGamesCallbacks callbacks, in byte[] messageData, String matchId, String recipientParticipantId) = 5032;
|
||||
int sendUnreliableMessage(in byte[] messageData, String matchId, in String[] recipientParticipantIds) = 5033;
|
||||
String createSocketConnection(String participantId) = 5034;
|
||||
void clearNotifications(int notificationTypes) = 5035;
|
||||
void loadLeaderboardsFirstParty(IGamesCallbacks callbacks, String gameId) = 5036;
|
||||
void loadLeaderboardFirstParty(IGamesCallbacks callbacks, String gameId, String leaderboardId) = 5037;
|
||||
void loadTopScoresFirstParty(IGamesCallbacks callbacks, String gameId, String leaderboardId, int span, int leaderboardCollection, int maxResults, boolean forceReload) = 5038;
|
||||
void loadPlayerCenteredScoresFirstParty(IGamesCallbacks callbacks, String gameId, String leaderboardId, int span, int leaderboardCollection, int maxResults, boolean forceReload) = 5039;
|
||||
void loadAchievementsFirstParty(IGamesCallbacks callbacks, String playerId, String gameId) = 5040;
|
||||
void loadGameFirstParty(IGamesCallbacks callbacks, String gameId) = 5041;
|
||||
void loadGameInstancesFirstParty(IGamesCallbacks callbacks, String gameId) = 5042;
|
||||
void loadGameCollectionFirstParty(IGamesCallbacks callbacks, int pageSize, int collectionType, boolean expandCachedData, boolean forceReload) = 5043;
|
||||
void loadRecentlyPlayedGamesFirstParty(IGamesCallbacks callbacks, String externalPlayerId, int pageSize, boolean expandCachedData, boolean forceReload) = 5044;
|
||||
void loadInvitablePlayersFirstParty(IGamesCallbacks callbacks, int pageSize, boolean expandCachedData, boolean forceReload) = 5045;
|
||||
void loadRecentPlayersFirstParty(IGamesCallbacks callbacks) = 5046;
|
||||
void loadCircledPlayersFirstParty(IGamesCallbacks callbacks, int pageSize, boolean expandCachedData, boolean forceReload) = 5047;
|
||||
void loadSuggestedPlayersFirstParty(IGamesCallbacks callbacks) = 5048;
|
||||
void dismissPlayerSuggestionFirstParty(String playerIdToDismiss) = 5049;
|
||||
void declineInvitationFirstParty(String gameId, String invitationId, int invitationType) = 5050;
|
||||
void loadInvitationsFirstParty(IGamesCallbacks callbacks, String gameId) = 5051;
|
||||
int registerWaitingRoomListenerRestricted(IGamesCallbacks callbacks, String roomId) = 5052;
|
||||
void setGameMuteStatusInternal(IGamesCallbacks callbacks, String gameId, boolean muted) = 5053;
|
||||
void clearNotificationsFirstParty(String gameId, int notificationTypes) = 5054;
|
||||
void loadNotifyAclInternal(IGamesCallbacks callbacks) = 5055;
|
||||
void updateNotifyAclInternal(IGamesCallbacks callbacks, String aclData) = 5056;
|
||||
void registerInvitationListener(IGamesCallbacks callbacks, long clientId) = 5057;
|
||||
void unregisterInvitationListener(long clientId) = 5058;
|
||||
int unregisterWaitingRoomListenerRestricted(String roomId) = 5059;
|
||||
void isGameMutedInternal(IGamesCallbacks callbacks, String gameId) = 5060;
|
||||
void loadContactSettingsInternal(IGamesCallbacks callbacks) = 5061;
|
||||
void updateContactSettingsInternal(IGamesCallbacks callbacks, boolean enableMobileNotifications) = 5062;
|
||||
String getSelectedAccountForGameFirstParty(String gamePackageName) = 5063;
|
||||
void updateSelectedAccountForGameFirstParty(String gamePackageName, String accountName) = 5064;
|
||||
Uri getGamesContentUriRestricted(String gameId) = 5065;
|
||||
boolean shouldUseNewPlayerNotificationsFirstParty() = 5066;
|
||||
void setUseNewPlayerNotificationsFirstParty(boolean newPlayerStyle) = 5067;
|
||||
void searchForPlayersFirstParty(IGamesCallbacks callbacks, String query, int pageSize, boolean expandCachedData, boolean forceReload) = 5500;
|
||||
DataHolder getCurrentGame() = 5501;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
package com.google.android.gms.games.multiplayer.realtime;
|
||||
|
||||
parcelable RealTimeMessage;
|
@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright (C) 2013-2019 microG Project Team
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.google.android.gms.games.multiplayer.realtime;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.os.Parcelable.Creator;
|
||||
|
||||
public final class RealTimeMessage implements Parcelable {
|
||||
public static final int RELIABLE = 1;
|
||||
public static final int UNRELIABLE = 0;
|
||||
|
||||
private final String mSenderParticipantId;
|
||||
private final byte[] mMessageData;
|
||||
private final int mIsReliable;
|
||||
|
||||
public RealTimeMessage(String senderParticipantId, byte[] messageData, int isReliable) {
|
||||
this.mSenderParticipantId = senderParticipantId;
|
||||
this.mMessageData = messageData.clone();
|
||||
this.mIsReliable = isReliable;
|
||||
}
|
||||
|
||||
private RealTimeMessage(Parcel parcel) {
|
||||
this(parcel.readString(), parcel.createByteArray(), parcel.readInt());
|
||||
}
|
||||
|
||||
public static final Creator<RealTimeMessage> CREATOR = new Creator<RealTimeMessage>() {
|
||||
@Override
|
||||
public RealTimeMessage createFromParcel(Parcel in) {
|
||||
return new RealTimeMessage(in);
|
||||
}
|
||||
@Override
|
||||
public RealTimeMessage[] newArray(int size) {
|
||||
return new RealTimeMessage[size];
|
||||
}
|
||||
};
|
||||
|
||||
public byte[] getMessageData() {
|
||||
return this.mMessageData;
|
||||
}
|
||||
|
||||
public String getSenderParticipantId() {
|
||||
return this.mSenderParticipantId;
|
||||
}
|
||||
|
||||
public boolean isReliable() {
|
||||
return this.mIsReliable == RELIABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel parcel, int flag) {
|
||||
parcel.writeString(this.mSenderParticipantId);
|
||||
parcel.writeByteArray(this.mMessageData);
|
||||
parcel.writeInt(this.mIsReliable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user