summaryrefslogtreecommitdiff
path: root/src/messagehandler.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-03-21 15:24:49 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-03-21 15:24:49 +0000
commit4a20e71c66c0b7bbdd73ab26b3ca8c0d7f4c8b64 (patch)
tree67fc6704e4735cbc6f21d368dba349e9aed768eb /src/messagehandler.h
parent28f6096586bf4e3465140f48f1eae54f11fef88d (diff)
downloadmanaserv-4a20e71c66c0b7bbdd73ab26b3ca8c0d7f4c8b64.tar.gz
manaserv-4a20e71c66c0b7bbdd73ab26b3ca8c0d7f4c8b64.tar.bz2
manaserv-4a20e71c66c0b7bbdd73ab26b3ca8c0d7f4c8b64.tar.xz
manaserv-4a20e71c66c0b7bbdd73ab26b3ca8c0d7f4c8b64.zip
More complete implementation of startListen and stopListen, told CVS to ignore
some files and compile fixes (it actually compiles now, just don't expect it to do anything useful)
Diffstat (limited to 'src/messagehandler.h')
-rw-r--r--src/messagehandler.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/messagehandler.h b/src/messagehandler.h
index 3d9e8a50..16f5251e 100644
--- a/src/messagehandler.h
+++ b/src/messagehandler.h
@@ -39,15 +39,25 @@ class MessageHandler
/**
* Called when a message is received with a message ID that corresponds
* to an ID this message handler registered to handle.
- *
- * Note: A MessageIn is used here which hasn't been defined yet, but
- * I imagine that Packet instances would be very simple, and wrapped
- * by both a MessageIn and a MessageOut class that would implement
- * methods to convenient parse and build packets transparently.
*/
- void receiveMessage(NetComputer *computer, MessageIn &message);
+ virtual void receiveMessage(
+ NetComputer *computer, MessageIn &message) = 0;
- void loginMessage(NetComputer *computer, MessageIn &message);
+ // To be moved to "AccountHandler"
+ /**
+ * Accepts a login message and interprets it, assigning the proper
+ * login
+ * Preconditions: The requested handle is not logged in already.
+ * The requested handle exists.
+ * The requested handle is not banned or restricted.
+ * The character profile is valid
+ * Postconditions: The player recieves access through a character in
+ * the world.
+ * Return Value: SUCCESS if the player was successfully assigned the
+ * requested char, ERROR on early termination of the
+ * routine.
+ */
+ int loginMessage(NetComputer *computer, MessageIn &message);
};
#endif