If we're going to do this, I guess we're going to do it properly. Nixed the

notion of a global group (though we implicitly define one in InvocationCodes)
added a mechanism for directors (which generally handle the client side of
invocation services) to register their interest in bootstrap service groups so
that the whole goddamned complex business can happen magically behind the
scenes.

If you instantiate a director, it will automatically register interest in the
service group it needs and everything will work. If you don't use the director
code, you don't get the services and you can safely exclude all of that code
from your client even though the services are still in use on the server (and
presumably used by some other types of clients).

This is going to break all the builds, which I'll soon fix. Then I'll go write
all this in ActionScript. Yay!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4552 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2007-02-11 01:17:30 +00:00
parent 9afcc526a0
commit ebc99935d5
25 changed files with 406 additions and 358 deletions
@@ -33,19 +33,19 @@ import com.threerings.crowd.chat.client.SpeakService;
*/
public interface ChatCodes extends InvocationCodes
{
/** A return value used by the ChatDirector and possibly other entities
* to indicate successful processing of chat. */
/** A return value used by the ChatDirector and possibly other entities to indicate successful
* processing of chat. */
public static final String SUCCESS = "success";
/** The message identifier for a chat notification message. */
public static final String CHAT_NOTIFICATION = "chat";
/** The access control identifier for normal chat privileges. See
* {@link BodyObject#checkAccess}. */
/** The access control identifier for normal chat privileges. See {@link
* BodyObject#checkAccess}. */
public static final String CHAT_ACCESS = "crowd.chat.chat";
/** The access control identifier for broadcast chat privileges. See
* {@link BodyObject#checkAccess}. */
/** The access control identifier for broadcast chat privileges. See {@link
* BodyObject#checkAccess}. */
public static final String BROADCAST_ACCESS = "crowd.chat.broadcast";
/** The configuration key for idle time. */
@@ -54,10 +54,9 @@ public interface ChatCodes extends InvocationCodes
/** The default time after which a player is assumed idle. */
public static final long DEFAULT_IDLE_TIME = 3 * 60 * 1000L;
/** The chat localtype code for chat messages delivered on the place
* object currently occupied by the client. This is the only type of
* chat message that will be delivered unless the chat director is
* explicitly provided with other chat message sources via {@link
/** The chat localtype code for chat messages delivered on the place object currently occupied
* by the client. This is the only type of chat message that will be delivered unless the chat
* director is explicitly provided with other chat message sources via {@link
* ChatDirector#addAuxiliarySource}. */
public static final String PLACE_CHAT_TYPE = "placeChat";
@@ -67,21 +66,18 @@ public interface ChatCodes extends InvocationCodes
/** The default mode used by {@link SpeakService#speak} requests. */
public static final byte DEFAULT_MODE = 0;
/** A {@link SpeakService#speak} mode to indicate that the user is
* thinking what they're saying, or is it that they're saying what
* they're thinking? */
/** A {@link SpeakService#speak} mode to indicate that the user is thinking what they're
* saying, or is it that they're saying what they're thinking? */
public static final byte THINK_MODE = 1;
/** A {@link SpeakService#speak} mode to indicate that a speak is
* actually an emote. */
/** A {@link SpeakService#speak} mode to indicate that a speak is actually an emote. */
public static final byte EMOTE_MODE = 2;
/** A {@link SpeakService#speak} mode to indicate that a speak is
* actually a shout. */
/** A {@link SpeakService#speak} mode to indicate that a speak is actually a shout. */
public static final byte SHOUT_MODE = 3;
/** A {@link SpeakService#speak} mode to indicate that a speak is
* actually a server-wide broadcast. */
/** A {@link SpeakService#speak} mode to indicate that a speak is actually a server-wide
* broadcast. */
public static final byte BROADCAST_MODE = 4;
/** String translations for the various chat modes. */
@@ -89,11 +85,9 @@ public interface ChatCodes extends InvocationCodes
"default", "think", "emote", "shout", "broadcast"
};
/** An error code delivered when the user targeted for a tell
* notification is not online. */
/** An error code delivered when the user targeted for a tell notification is not online. */
public static final String USER_NOT_ONLINE = "m.user_not_online";
/** An error code delivered when the user targeted for a tell
* notification is disconnected. */
/** An error code delivered when the user targeted for a tell notification is disconnected. */
public static final String USER_DISCONNECTED = "m.user_disconnected";
}