ElectroServer 5 Client: Cocoa-Touch
EsGetRoomsInZoneResponse Class Reference

This the response to the GetRoomsInZoneRequest. More...

Inheritance diagram for EsGetRoomsInZoneResponse:
EsResponse EsMessage EsEventDispatcherEvent

Instance Methods

(id) - init
 
(id) - initWithThriftObject:
 
(void) - fromThrift:
 
(ThriftGetRoomsInZoneResponse *) - toThrift
 
(id) - newThrift
 

Properties

int32_t zoneId
 Id of the zone that contains these rooms. More...
 
NSString * zoneName
 Name of the zone that contains these rooms. More...
 
NSMutableArray * entries
 List of RoomListEntry objects that describe the rooms in the zone. More...
 

Additional Inherited Members

- Protected Attributes inherited from EsMessage
int messageType_
 

Detailed Description

This the response to the GetRoomsInZoneRequest.

This response contains a list of RoomListEntry object, each describing a room in that zone.

This example shows how to request the rooms in a zone, listen for the response to that request, and print out the results.

private var _es:ElectroServer;
private function initialize():void {
        _es.engine.addEventListener(MessageType.GetRoomsInZoneResponse.name, onGetRoomsInZoneResponse);
        var griz:GetRoomsInZoneRequest = new GetRoomsInZoneRequest();
        griz.zoneName = "GameZone";
        _es.engine.send(griz);
}
private function onGetRoomsInZoneResponse(e:GetRoomsInZoneResponse):void {
        trace("Zone: "+e.zoneName + ", " + e.zoneName.toString());
        for each (var rle:RoomListEntry in e.entries) {
                trace("Room: "+rle.roomName + ", " + rle.roomId.toString());
        }
}

Method Documentation

- (void) fromThrift: (id)  thriftObject

Reimplemented from EsMessage.

- (id) init
- (id) initWithThriftObject: (id)  thriftObject
- (id) newThrift

Reimplemented from EsMessage.

- (ThriftGetRoomsInZoneResponse *) toThrift

Reimplemented from EsMessage.

Property Documentation

- (NSMutableArray*) entries
readwritenonatomicretain

List of RoomListEntry objects that describe the rooms in the zone.

- (int32_t) zoneId
readwritenonatomicassign

Id of the zone that contains these rooms.

- (NSString*) zoneName
readwritenonatomicretain

Name of the zone that contains these rooms.