diff --git a/src/java/com/threerings/crowd/client/LocationDirector.java b/src/java/com/threerings/crowd/client/LocationDirector.java index 91076f83e..2120a13bf 100644 --- a/src/java/com/threerings/crowd/client/LocationDirector.java +++ b/src/java/com/threerings/crowd/client/LocationDirector.java @@ -1,5 +1,5 @@ // -// $Id: LocationDirector.java,v 1.4 2001/07/23 22:59:43 mdb Exp $ +// $Id: LocationDirector.java,v 1.5 2001/08/02 04:59:54 mdb Exp $ package com.threerings.cocktail.party.client; @@ -33,6 +33,24 @@ public class LocationManager ctx.getClient().addObserver(this); } + /** + * Adds a location observer to the list. This observer will + * subsequently be notified of potential, effected and failed location + * changes. + */ + public void addLocationObserver (LocationObserver observer) + { + _observers.add(observer); + } + + /** + * Removes a location observer from the list. + */ + public void removeLocationObserver (LocationObserver observer) + { + _observers.remove(observer); + } + /** * Requests that this client be moved to the specified place. A * request will be made and when the response is received, the diff --git a/src/java/com/threerings/crowd/client/LocationObserver.java b/src/java/com/threerings/crowd/client/LocationObserver.java index 435f7cb64..eb3e68a6f 100644 --- a/src/java/com/threerings/crowd/client/LocationObserver.java +++ b/src/java/com/threerings/crowd/client/LocationObserver.java @@ -1,5 +1,5 @@ // -// $Id: LocationObserver.java,v 1.2 2001/07/23 22:59:43 mdb Exp $ +// $Id: LocationObserver.java,v 1.3 2001/08/02 04:59:54 mdb Exp $ package com.threerings.cocktail.party.client; @@ -22,6 +22,9 @@ public interface LocationObserver * Called when someone has requested that we switch to a new location. * An observer may choose to veto the location change request for some * reason or other. + * + * @return true if it's OK for the location to change, false if the + * change request should be aborted. */ public boolean locationMayChange (int placeId);