ElectroServer 5 Client: C#
Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent 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 Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent:
Electrotank.Electroserver5.Api.EsEvent Electrotank.Electroserver5.Api.EsMessage Electrotank.Electroserver5.Api.IThriftSerializable

Public Member Functions

 UpdateRoomDetailsEvent ()
 
 UpdateRoomDetailsEvent (TBase t)
 
override TBase ToThrift ()
 
override TBase NewThrift ()
 
override void FromThrift (TBase t_)
 
- Public Member Functions inherited from Electrotank.Electroserver5.Api.EsEvent
 EsEvent ()
 

Properties

int ZoneId [get, set]
 Id of the zone that contains the room whose properties were updated. More...
 
int RoomId [get, set]
 Id of the room whose properties were updated. More...
 
bool CapacityUpdated [get, set]
 If the capacity property was updated then this is true. More...
 
int Capacity [get, set]
 New capacity value if capacityUpdated is true. More...
 
bool RoomDescriptionUpdated [get, set]
 If the description property was udpated then this is true. More...
 
string RoomDescription [get, set]
 The new description property, if descriptionUpdated is true. More...
 
bool RoomNameUpdated [get, set]
 If the roomName was updated then this is true. More...
 
string RoomName [get, set]
 Contains a new roomName if the roomNameUpdated property is true. More...
 
bool HasPassword [get, set]
 If hasPasswordUpdated is true then this has a value. More...
 
bool HasPasswordUpdated [get, set]
 If the room's password status has changed then this is true and hasPassword has a value. More...
 
bool HiddenUpdated [get, set]
 If the hidden property of the room has changed then this is true. More...
 
bool Hidden [get, set]
 If the hiddenUpdated property is true then this has the new value of the hidden property. More...
 

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());
        }
}
 

Constructor & Destructor Documentation

Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent.UpdateRoomDetailsEvent ( )
Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent.UpdateRoomDetailsEvent ( TBase  t)

Member Function Documentation

override void Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent.FromThrift ( TBase  t_)
virtual
override TBase Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent.NewThrift ( )
virtual
override TBase Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent.ToThrift ( )
virtual

Property Documentation

int Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent.Capacity
getset

New capacity value if capacityUpdated is true.

bool Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent.CapacityUpdated
getset

If the capacity property was updated then this is true.

bool Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent.HasPassword
getset

If hasPasswordUpdated is true then this has a value.

bool Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent.HasPasswordUpdated
getset

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

bool Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent.Hidden
getset

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

bool Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent.HiddenUpdated
getset

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

string Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent.RoomDescription
getset

The new description property, if descriptionUpdated is true.

bool Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent.RoomDescriptionUpdated
getset

If the description property was udpated then this is true.

int Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent.RoomId
getset

Id of the room whose properties were updated.

string Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent.RoomName
getset

Contains a new roomName if the roomNameUpdated property is true.

bool Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent.RoomNameUpdated
getset

If the roomName was updated then this is true.

int Electrotank.Electroserver5.Api.UpdateRoomDetailsEvent.ZoneId
getset

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