forked from microsoft/WinObjC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGKTurnBasedMatch.h
More file actions
107 lines (100 loc) · 6.02 KB
/
GKTurnBasedMatch.h
File metadata and controls
107 lines (100 loc) · 6.02 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
//******************************************************************************
//
// Copyright (c) 2016 Microsoft Corporation. All rights reserved.
//
// This code is licensed under the MIT License (MIT).
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
//******************************************************************************
#pragma once
#import <GameKit/GameKitExport.h>
#import <Foundation/NSObjCRuntime.h>
#import <Foundation/NSObject.h>
@class NSArray;
@class NSError;
@class NSString;
@class GKMatchRequest;
@class NSDate;
@class GKTurnBasedParticipant;
@class NSData;
@class GKTurnBasedExchange;
typedef NSInteger GKTurnBasedMatchStatus;
typedef NSInteger GKTurnBasedMatchOutcome;
enum {
GKTurnBasedMatchStatusUnknown = 0,
GKTurnBasedMatchStatusOpen = 1,
GKTurnBasedMatchStatusEnded = 2,
GKTurnBasedMatchStatusMatching = 3,
};
GAMEKIT_EXPORT const NSTimeInterval GKTurnTimeoutDefault;
GAMEKIT_EXPORT const NSTimeInterval GKTurnTimeoutNone;
GAMEKIT_EXPORT_CLASS
@interface GKTurnBasedMatch : NSObject <NSObject>
+ (void)loadMatchesWithCompletionHandler:(void (^)(NSArray*, NSError*))completionHandler STUB_METHOD;
+ (void)loadMatchWithID:(NSString*)matchID withCompletionHandler:(void (^)(GKTurnBasedMatch*, NSError*))completionHandler STUB_METHOD;
+ (void)findMatchForRequest:(GKMatchRequest*)request
withCompletionHandler:(void (^)(GKTurnBasedMatch*, NSError*))completionHandler STUB_METHOD;
- (void)acceptInviteWithCompletionHandler:(void (^)(GKTurnBasedMatch*, NSError*))completionHandler STUB_METHOD;
- (void)declineInviteWithCompletionHandler:(void (^)(NSError*))completionHandler STUB_METHOD;
- (void)rematchWithCompletionHandler:(void (^)(GKTurnBasedMatch*, NSError*))completionHandler STUB_METHOD;
- (void)loadMatchDataWithCompletionHandler:(void (^)(NSData*, NSError*))completionHandler STUB_METHOD;
- (void)saveCurrentTurnWithMatchData:(NSData*)matchData completionHandler:(void (^)(NSError*))completionHandler STUB_METHOD;
- (void)endTurnWithNextParticipants:(NSArray*)nextParticipants
turnTimeout:(NSTimeInterval)timeout
matchData:(NSData*)matchData
completionHandler:(void (^)(NSError*))completionHandler STUB_METHOD;
- (void)endTurnWithNextParticipant:(GKTurnBasedParticipant*)nextParticipant
matchData:(NSData*)matchData
completionHandler:(void (^)(NSError*))completionHandler STUB_METHOD;
- (void)participantQuitInTurnWithOutcome:(GKTurnBasedMatchOutcome)matchOutcome
nextParticipants:(NSArray*)nextParticipants
turnTimeout:(NSTimeInterval)timeout
matchData:(NSData*)matchData
completionHandler:(void (^)(NSError*))completionHandler STUB_METHOD;
- (void)participantQuitInTurnWithOutcome:(GKTurnBasedMatchOutcome)matchOutcome
nextParticipant:(GKTurnBasedParticipant*)nextParticipant
matchData:(NSData*)matchData
completionHandler:(void (^)(NSError*))completionHandler STUB_METHOD;
- (void)participantQuitOutOfTurnWithOutcome:(GKTurnBasedMatchOutcome)matchOutcome
withCompletionHandler:(void (^)(NSError*))completionHandler STUB_METHOD;
- (void)endMatchInTurnWithMatchData:(NSData*)matchData
scores:(NSArray*)scores
achievements:(NSArray*)achievements
completionHandler:(void (^)(NSError*))completionHandler STUB_METHOD;
- (void)endMatchInTurnWithMatchData:(NSData*)matchData completionHandler:(void (^)(NSError*))completionHandler STUB_METHOD;
- (void)removeWithCompletionHandler:(void (^)(NSError*))completionHandler STUB_METHOD;
- (void)saveMergedMatchData:(NSData*)matchData
withResolvedExchanges:(NSArray*)exchanges
completionHandler:(void (^)(NSError*))completionHandler STUB_METHOD;
- (void)sendExchangeToParticipants:(NSArray*)participants
data:(NSData*)data
localizableMessageKey:(NSString*)key
arguments:(NSArray*)arguments
timeout:(NSTimeInterval)timeout
completionHandler:(void (^)(GKTurnBasedExchange*, NSError*))completionHandler STUB_METHOD;
- (void)sendReminderToParticipants:(NSArray*)participants
localizableMessageKey:(NSString*)key
arguments:(NSArray*)arguments
completionHandler:(void (^)(NSError*))completionHandler STUB_METHOD;
- (void)setLocalizableMessageWithKey:(NSString*)key arguments:(NSArray*)arguments STUB_METHOD;
@property (readonly, retain, nonatomic) NSArray* activeExchanges STUB_PROPERTY;
@property (readonly, retain, nonatomic) NSArray* completedExchanges STUB_PROPERTY;
@property (readonly, nonatomic) NSUInteger exchangeDataMaximumSize STUB_PROPERTY;
@property (readonly, nonatomic) NSUInteger exchangeMaxInitiatedExchangesPerPlayer STUB_PROPERTY;
@property (readonly, retain, nonatomic) NSArray* exchanges STUB_PROPERTY;
@property (readonly, retain, nonatomic) NSDate* creationDate STUB_PROPERTY;
@property (readonly, retain, nonatomic) GKTurnBasedParticipant* currentParticipant STUB_PROPERTY;
@property (readonly, retain, nonatomic) NSString* matchID STUB_PROPERTY;
@property (readwrite, copy, nonatomic) NSString* message STUB_PROPERTY;
@property (readonly, retain, nonatomic) NSArray* participants STUB_PROPERTY;
@property (readonly, nonatomic) GKTurnBasedMatchStatus status STUB_PROPERTY;
@property (readonly, nonatomic) NSUInteger matchDataMaximumSize STUB_PROPERTY;
@property (readonly, retain, nonatomic) NSData* matchData STUB_PROPERTY;
@end