Package apple.gamekit
Class GKGameSession
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.gamekit.GKGameSession
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceGKGameSession.Block_clearBadgeForPlayersCompletionHandlerstatic interfaceGKGameSession.Block_createSessionInContainerWithTitleMaxConnectedPlayersCompletionHandlerstatic interfaceGKGameSession.Block_getShareURLWithCompletionHandlerstatic interfaceGKGameSession.Block_loadDataWithCompletionHandlerstatic interfaceGKGameSession.Block_loadSessionsInContainerCompletionHandlerstatic interfaceGKGameSession.Block_loadSessionWithIdentifierCompletionHandlerstatic interfaceGKGameSession.Block_removeSessionWithIdentifierCompletionHandlerstatic interfaceGKGameSession.Block_saveDataCompletionHandlerstatic interfaceGKGameSession.Block_sendDataWithTransportTypeCompletionHandlerstatic interfaceGKGameSession.Block_sendMessageWithLocalizedFormatKeyArgumentsDataToPlayersBadgePlayersCompletionHandlerstatic interfaceGKGameSession.Block_setConnectionStateCompletionHandler-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGKGameSession(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static voidaddEventListener(NSObject listener)static GKGameSessionalloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)NSArray<? extends GKCloudPlayer>badgedPlayers()static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()voidclearBadgeForPlayersCompletionHandler(NSArray<? extends GKCloudPlayer> players, GKGameSession.Block_clearBadgeForPlayersCompletionHandler completionHandler)Clear application badge state for players for this session.static voidcreateSessionInContainerWithTitleMaxConnectedPlayersCompletionHandler(java.lang.String containerName, java.lang.String title, long maxPlayers, GKGameSession.Block_createSessionInContainerWithTitleMaxConnectedPlayersCompletionHandler completionHandler)Create a new session with the given title and maximum number of connected players.static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()voidgetShareURLWithCompletionHandler(GKGameSession.Block_getShareURLWithCompletionHandler completionHandler)Get the URL needed to share this session.static longhash_static()java.lang.Stringidentifier()GKGameSessioninit()static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)NSDatelastModifiedDate()GKCloudPlayerlastModifiedPlayer()voidloadDataWithCompletionHandler(GKGameSession.Block_loadDataWithCompletionHandler completionHandler)Load associated persistent data.static voidloadSessionsInContainerCompletionHandler(java.lang.String containerName, GKGameSession.Block_loadSessionsInContainerCompletionHandler completionHandler)Load all sessions involving the current user.static voidloadSessionWithIdentifierCompletionHandler(java.lang.String identifier, GKGameSession.Block_loadSessionWithIdentifierCompletionHandler completionHandler)Load a specific session.longmaxNumberOfConnectedPlayers()static java.lang.Objectnew_objc()GKCloudPlayerowner()NSArray<? extends GKCloudPlayer>players()NSArray<? extends GKCloudPlayer>playersWithConnectionState(long state)Get the players with the given connection state.static voidremoveEventListener(NSObject listener)static voidremoveSessionWithIdentifierCompletionHandler(java.lang.String identifier, GKGameSession.Block_removeSessionWithIdentifierCompletionHandler completionHandler)Remove a session.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsaveDataCompletionHandler(NSData data, GKGameSession.Block_saveDataCompletionHandler completionHandler)Save new/updated persistent data.voidsendDataWithTransportTypeCompletionHandler(NSData data, long transport, GKGameSession.Block_sendDataWithTransportTypeCompletionHandler completionHandler)Send data to all connected players.voidsendMessageWithLocalizedFormatKeyArgumentsDataToPlayersBadgePlayersCompletionHandler(java.lang.String key, NSArray<java.lang.String> arguments, NSData data, NSArray<? extends GKCloudPlayer> players, boolean badgePlayers, GKGameSession.Block_sendMessageWithLocalizedFormatKeyArgumentsDataToPlayersBadgePlayersCompletionHandler completionHandler)Send a message to any players in the session.voidsetConnectionStateCompletionHandler(long state, GKGameSession.Block_setConnectionStateCompletionHandler completionHandler)Set your connection state.static voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()java.lang.Stringtitle()static longversion_static()-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
addEventListener
public static void addEventListener(NSObject listener)
-
alloc
public static GKGameSession alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
-
createSessionInContainerWithTitleMaxConnectedPlayersCompletionHandler
public static void createSessionInContainerWithTitleMaxConnectedPlayersCompletionHandler(java.lang.String containerName, java.lang.String title, long maxPlayers, GKGameSession.Block_createSessionInContainerWithTitleMaxConnectedPlayersCompletionHandler completionHandler)Create a new session with the given title and maximum number of connected players. (You may pass 0 to use the system limit of 16 players.)
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
hash_static
public static long hash_static()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
loadSessionWithIdentifierCompletionHandler
public static void loadSessionWithIdentifierCompletionHandler(java.lang.String identifier, GKGameSession.Block_loadSessionWithIdentifierCompletionHandler completionHandler)Load a specific session.
-
loadSessionsInContainerCompletionHandler
public static void loadSessionsInContainerCompletionHandler(java.lang.String containerName, GKGameSession.Block_loadSessionsInContainerCompletionHandler completionHandler)Load all sessions involving the current user.
-
new_objc
public static java.lang.Object new_objc()
-
removeEventListener
public static void removeEventListener(NSObject listener)
-
removeSessionWithIdentifierCompletionHandler
public static void removeSessionWithIdentifierCompletionHandler(java.lang.String identifier, GKGameSession.Block_removeSessionWithIdentifierCompletionHandler completionHandler)Remove a session. If called by the owner this deletes the session from the server.
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
badgedPlayers
public NSArray<? extends GKCloudPlayer> badgedPlayers()
-
clearBadgeForPlayersCompletionHandler
public void clearBadgeForPlayersCompletionHandler(NSArray<? extends GKCloudPlayer> players, GKGameSession.Block_clearBadgeForPlayersCompletionHandler completionHandler)
Clear application badge state for players for this session.
-
getShareURLWithCompletionHandler
public void getShareURLWithCompletionHandler(GKGameSession.Block_getShareURLWithCompletionHandler completionHandler)
Get the URL needed to share this session.
-
identifier
public java.lang.String identifier()
-
init
public GKGameSession init()
-
lastModifiedDate
public NSDate lastModifiedDate()
-
lastModifiedPlayer
public GKCloudPlayer lastModifiedPlayer()
-
loadDataWithCompletionHandler
public void loadDataWithCompletionHandler(GKGameSession.Block_loadDataWithCompletionHandler completionHandler)
Load associated persistent data.
-
maxNumberOfConnectedPlayers
public long maxNumberOfConnectedPlayers()
-
owner
public GKCloudPlayer owner()
-
players
public NSArray<? extends GKCloudPlayer> players()
-
playersWithConnectionState
public NSArray<? extends GKCloudPlayer> playersWithConnectionState(long state)
Get the players with the given connection state.
-
saveDataCompletionHandler
public void saveDataCompletionHandler(NSData data, GKGameSession.Block_saveDataCompletionHandler completionHandler)
Save new/updated persistent data. Data size is limited to 512K. The session's lastModifiedDate and lastModifiedPlayer will be updated upon completion. If a version conflict is detected the handler will include the version currently on the server and an error. In this case the data has not been saved. To resolve the conflict a client would call this method again, presumably after merging data or giving the user a choice on how to resolve the conflict. (Note that when calling again it is possible to get a new conflict, if another device has since written a new version.)
-
sendDataWithTransportTypeCompletionHandler
public void sendDataWithTransportTypeCompletionHandler(NSData data, long transport, GKGameSession.Block_sendDataWithTransportTypeCompletionHandler completionHandler)
Send data to all connected players.
-
sendMessageWithLocalizedFormatKeyArgumentsDataToPlayersBadgePlayersCompletionHandler
public void sendMessageWithLocalizedFormatKeyArgumentsDataToPlayersBadgePlayersCompletionHandler(java.lang.String key, NSArray<java.lang.String> arguments, NSData data, NSArray<? extends GKCloudPlayer> players, boolean badgePlayers, GKGameSession.Block_sendMessageWithLocalizedFormatKeyArgumentsDataToPlayersBadgePlayersCompletionHandler completionHandler)Send a message to any players in the session. This uses an unreliable push mechanism. Message/data delivery is not guaranteed and may take some time to arrive. Receiving players may optionally have their application badged for this session.
-
setConnectionStateCompletionHandler
public void setConnectionStateCompletionHandler(long state, GKGameSession.Block_setConnectionStateCompletionHandler completionHandler)Set your connection state. May fail if you attempt to connect but the connected player limit has already been reached or there are network problems. The session's lastModifiedDate and lastModifiedPlayer will be updated upon completion.
-
title
public java.lang.String title()
-
-