ElectroServer 5 Client: Cocoa-Touch
EsFindZoneAndRoomByNameResponse Class Reference

Knowing the name of a room and the name of a zone you can request the id of the room and the id of the zone. More...

Inheritance diagram for EsFindZoneAndRoomByNameResponse:
EsResponse EsMessage EsEventDispatcherEvent

Instance Methods

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

Properties

NSMutableArray * roomAndZoneList
 Array of two values. More...
 

Additional Inherited Members

- Protected Attributes inherited from EsMessage
int messageType_
 

Detailed Description

Knowing the name of a room and the name of a zone you can request the id of the room and the id of the zone.

This request is FindZoneAndRoomByNameRequest and leads to this response.

This example shows how to request the id of a zone and room and capture the response.

private var _es:ElectroServer;
private function initialize():void {
        _es.engine.addEventListener(MessageType.FindZoneAndRoomByNameResponse.name, onFindZoneAndRoomByNameResponse);
        var fzar:FindZoneAndRoomByNameRequest = new FindZoneAndRoomByNameRequest();
        fzar.roomName = "MyRoom";
        fzar.zoneName = "MyZone";
        _es.engine.send(fzar);
}
private function onFindZoneAndRoomByNameResponse(e:FindZoneAndRoomByNameResponse):void {
        trace("zoneId: " + e.roomAndZoneList[0].toString());
        trace("roomId: " + e.roomAndZoneList[1].toString());
}
 

Method Documentation

- (void) fromThrift: (id)  thriftObject

Reimplemented from EsMessage.

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

Reimplemented from EsMessage.

- (ThriftFindZoneAndRoomByNameResponse *) toThrift

Reimplemented from EsMessage.

Property Documentation

- (NSMutableArray*) roomAndZoneList
readwritenonatomicretain

Array of two values.

The 0th element is the zoneId, the 1st element is the roomId. Both are integers.