ElectroServer 5 Client: Cocoa-Touch
EsUpdateRoomDetailsEvent Class Reference

Certain properties of a room can be updated by a user in that room after the room has been created. More...

Inheritance diagram for EsUpdateRoomDetailsEvent:
EsEvent EsMessage EsEventDispatcherEvent

Instance Methods

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

Properties

int32_t zoneId
 Id of the zone that contains the room whose properties were updated. More...
 
int32_t roomId
 Id of the room whose properties were updated. More...
 
BOOL capacityUpdated
 If the capacity property was updated then this is true. More...
 
int32_t capacity
 New capacity value if capacityUpdated is true. More...
 
BOOL roomDescriptionUpdated
 If the description property was udpated then this is true. More...
 
NSString * roomDescription
 The new description property, if descriptionUpdated is true. More...
 
BOOL roomNameUpdated
 If the roomName was updated then this is true. More...
 
NSString * roomName
 Contains a new roomName if the roomNameUpdated property is true. More...
 
BOOL hasPassword
 If hasPasswordUpdated is true then this has a value. More...
 
BOOL hasPasswordUpdated
 If the room's password status has changed then this is true and hasPassword has a value. More...
 
BOOL hiddenUpdated
 If the hidden property of the room has changed then this is true. More...
 
BOOL hidden
 If the hiddenUpdated property is true then this has the new value of the hidden property. More...
 

Additional Inherited Members

- Protected Attributes inherited from EsMessage
int messageType_
 

Detailed Description

Certain properties of a room can be updated by a user in that room after the room has been created.

Once a property has changed all users in that room will recieve an UpdateRoomDetailsEvent. The properties that can be updated are roomName, description, capacity, the password, and if the room is hidden or not.

This example shows how to update all possible properties and how to capture the event.

private var _es:ElectroServer;
private var _room:Room;
private function initialize():void {
        _es.engine.addEventListener(MessageType.UpdateRoomDetailsEvent.name, onUpdateRoomDetailsEvent);
        var urdr:UpdateRoomDetailsRequest = new UpdateRoomDetailsRequest();
        urdr.roomId = _room.id;
        urdr.zoneId = _room.zoneId;
        urdr.roomNameUpdate = true;
        urdr.roomName = "New Room Name";
        urdr.descriptionUpdate = true;
        urdr.description = "new room description";
        urdr.capacityUpdate = true;
        urdr.capacity = 13;
        urdr.hiddenUpdate = true;
        urdr.hidden = true;
        urdr.passwordUpdate = true;
        urdr.password = "new password";
        _es.engine.send(urdr);
}
private function onUpdateRoomDetailsEvent(e:UpdateRoomDetailsEvent):void {
        if (e.roomNameUpdated) {
                trace("roomName: " + e.roomName);
        }
        if (e.descriptionUpdated) {
                trace("description: " + e.description);
        }
        if (e.hasPasswordUpdated) {
                trace("has password: " + e.hasPassword.toString());
        }
        if (e.hiddenUpdated) {
                trace("hidden: " + e.hidden.toString());
        }
        if (e.capacityUpdated) {
                trace("capacity: " + e.capacity.toString());
        }
}
 

Method Documentation

- (void) fromThrift: (id)  thriftObject

Reimplemented from EsMessage.

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

Reimplemented from EsMessage.

- (ThriftUpdateRoomDetailsEvent *) toThrift

Reimplemented from EsMessage.

Property Documentation

- (int32_t) capacity
readwritenonatomicassign

New capacity value if capacityUpdated is true.

- (BOOL) capacityUpdated
readwritenonatomicassign

If the capacity property was updated then this is true.

- (BOOL) hasPassword
readwritenonatomicassign

If hasPasswordUpdated is true then this has a value.

- (BOOL) hasPasswordUpdated
readwritenonatomicassign

If the room's password status has changed then this is true and hasPassword has a value.

- (BOOL) hidden
readwritenonatomicassign

If the hiddenUpdated property is true then this has the new value of the hidden property.

- (BOOL) hiddenUpdated
readwritenonatomicassign

If the hidden property of the room has changed then this is true.

- (NSString*) roomDescription
readwritenonatomicretain

The new description property, if descriptionUpdated is true.

- (BOOL) roomDescriptionUpdated
readwritenonatomicassign

If the description property was udpated then this is true.

- (int32_t) roomId
readwritenonatomicassign

Id of the room whose properties were updated.

- (NSString*) roomName
readwritenonatomicretain

Contains a new roomName if the roomNameUpdated property is true.

- (BOOL) roomNameUpdated
readwritenonatomicassign

If the roomName was updated then this is true.

- (int32_t) zoneId
readwritenonatomicassign

Id of the zone that contains the room whose properties were updated.