More location observer stuff.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@144 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user