From 8a1ff4ac4b5a9daa29a253e844005b82f430ea63 Mon Sep 17 00:00:00 2001 From: Jamie Doornbos Date: Mon, 7 Feb 2011 23:15:15 +0000 Subject: [PATCH] RFC: providing a way to generically detect the language and machine identity for a connection git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6482 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../threerings/presents/net/Credentials.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/main/java/com/threerings/presents/net/Credentials.java b/src/main/java/com/threerings/presents/net/Credentials.java index 3c1878b73..34fb988f4 100644 --- a/src/main/java/com/threerings/presents/net/Credentials.java +++ b/src/main/java/com/threerings/presents/net/Credentials.java @@ -34,6 +34,28 @@ import com.threerings.io.Streamable; */ public abstract class Credentials implements Streamable { + /** + * Implemented by credentials that provide a machine identifier. + */ + public interface HasMachineIdent + { + /** + * Gets the machine identifier associated with the submitting user's machine. + */ + String getMachineIdent (); + } + + /** + * Implemented by credentials that provide a language. + */ + public interface HasLanguage + { + /** + * Gets the language selected by the submitting user. + */ + String getLanguage (); + } + /** * Returns a string to use in a hash on the datagram contents to authenticate client datagrams. */