22 |
*/ |
*/ |
23 |
|
|
24 |
#include <Foundation/NSHost.h> |
#include <Foundation/NSHost.h> |
25 |
|
#include <Foundation/NSDistantObject.h> |
26 |
#include <Foundation/NSException.h> |
#include <Foundation/NSException.h> |
27 |
|
|
28 |
#include "Network/NetGameID.h" |
#include "Network/NetGameID.h" |
29 |
#include "Network/NetParty.h" |
#include "Network/NetProtocol.h" |
30 |
|
|
31 |
/** |
/** |
32 |
* This class represents a game located at a server. |
* This class represents a game located at a server. |
34 |
@implementation NetGameID |
@implementation NetGameID |
35 |
|
|
36 |
/** |
/** |
37 |
* Initialise NetGameID with an existing game "NetParty" that is already |
* Initialise NetGameID with an existing proxy representing a game "NetParty" |
38 |
* created in a server identified by its host's information. |
* that is already created in a server identified by its host's information. |
39 |
*/ |
*/ |
40 |
- (id) initWithParty: (NetParty *)game |
- (id) initWithParty: (NSDistantObject<NetParty> *)proxy |
41 |
withHost: (NSHost *)host; |
withHost: (NSHost *)host |
42 |
{ |
{ |
43 |
NSParameterAssert (game); |
NSParameterAssert (proxy); |
44 |
NSParameterAssert (host); |
NSParameterAssert (host); |
45 |
|
|
46 |
self = [super init]; |
self = [super init]; |
47 |
|
|
48 |
if (self != nil) |
if (self != nil) |
49 |
{ |
{ |
50 |
_party = RETAIN (game); |
_party = RETAIN (proxy); |
51 |
_host = RETAIN (host); |
_host = RETAIN (host); |
52 |
} |
} |
53 |
|
|
68 |
|
|
69 |
|
|
70 |
/** |
/** |
71 |
* Returns the current game "NetParty" |
* Returns the current proxy representing a game "NetParty". |
72 |
*/ |
*/ |
73 |
- (NetParty *) party; |
- (NSDistantObject<NetParty> *) party |
74 |
{ |
{ |
75 |
return _party; |
return _party; |
76 |
} |
} |