From 58cbfb6db1b9eca1d102aefa9ce21a48420a5c81 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Mon, 6 Mar 2006 21:51:59 +0000 Subject: [PATCH] Regenerated using the new Ant-task-based generator. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3914 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../crowd/client/LocationDecoder.java | 18 +++++++ .../crowd/server/LocationSender.java | 18 +++++++ .../parlor/card/client/CardGameDecoder.java | 50 ++++++++++++------ .../parlor/card/server/CardGameSender.java | 52 +++++++++++++------ .../parlor/client/ParlorDecoder.java | 40 ++++++++++---- .../parlor/server/ParlorSender.java | 42 ++++++++++----- .../whirled/client/SceneDecoder.java | 18 +++++++ .../whirled/server/SceneSender.java | 18 +++++++ .../whirled/zone/client/ZoneDecoder.java | 18 +++++++ .../whirled/zone/server/ZoneSender.java | 18 +++++++ 10 files changed, 236 insertions(+), 56 deletions(-) diff --git a/src/java/com/threerings/crowd/client/LocationDecoder.java b/src/java/com/threerings/crowd/client/LocationDecoder.java index 358c8d229..2051cf17e 100644 --- a/src/java/com/threerings/crowd/client/LocationDecoder.java +++ b/src/java/com/threerings/crowd/client/LocationDecoder.java @@ -1,5 +1,23 @@ // // $Id$ +// +// Narya library - tools for developing networked games +// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved +// http://www.threerings.net/code/narya/ +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA package com.threerings.crowd.client; diff --git a/src/java/com/threerings/crowd/server/LocationSender.java b/src/java/com/threerings/crowd/server/LocationSender.java index 24a8cee3e..e4f3cd5cf 100644 --- a/src/java/com/threerings/crowd/server/LocationSender.java +++ b/src/java/com/threerings/crowd/server/LocationSender.java @@ -1,5 +1,23 @@ // // $Id$ +// +// Narya library - tools for developing networked games +// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved +// http://www.threerings.net/code/narya/ +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA package com.threerings.crowd.server; diff --git a/src/java/com/threerings/parlor/card/client/CardGameDecoder.java b/src/java/com/threerings/parlor/card/client/CardGameDecoder.java index 5428d4841..897b055ea 100644 --- a/src/java/com/threerings/parlor/card/client/CardGameDecoder.java +++ b/src/java/com/threerings/parlor/card/client/CardGameDecoder.java @@ -1,5 +1,23 @@ // // $Id$ +// +// Narya library - tools for developing networked games +// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved +// http://www.threerings.net/code/narya/ +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA package com.threerings.parlor.card.client; @@ -16,21 +34,21 @@ public class CardGameDecoder extends InvocationDecoder /** The generated hash code used to identify this receiver class. */ public static final String RECEIVER_CODE = "0718199d459e31d8d673744c71b0e788"; - /** The method id used to dispatch {@link CardGameReceiver#receivedHand} + /** The method id used to dispatch {@link CardGameReceiver#cardsTransferredBetweenPlayers} * notifications. */ - public static final int RECEIVED_HAND = 1; + public static final int CARDS_TRANSFERRED_BETWEEN_PLAYERS = 1; /** The method id used to dispatch {@link CardGameReceiver#receivedCardsFromPlayer} * notifications. */ public static final int RECEIVED_CARDS_FROM_PLAYER = 2; + /** The method id used to dispatch {@link CardGameReceiver#receivedHand} + * notifications. */ + public static final int RECEIVED_HAND = 3; + /** The method id used to dispatch {@link CardGameReceiver#sentCardsToPlayer} * notifications. */ - public static final int SENT_CARDS_TO_PLAYER = 3; - - /** The method id used to dispatch {@link CardGameReceiver#cardsTransferredBetweenPlayers} - * notifications. */ - public static final int CARDS_TRANSFERRED_BETWEEN_PLAYERS = 4; + public static final int SENT_CARDS_TO_PLAYER = 4; /** * Creates a decoder that may be registered to dispatch invocation @@ -51,9 +69,9 @@ public class CardGameDecoder extends InvocationDecoder public void dispatchNotification (int methodId, Object[] args) { switch (methodId) { - case RECEIVED_HAND: - ((CardGameReceiver)receiver).receivedHand( - ((Integer)args[0]).intValue(), (Hand)args[1] + case CARDS_TRANSFERRED_BETWEEN_PLAYERS: + ((CardGameReceiver)receiver).cardsTransferredBetweenPlayers( + ((Integer)args[0]).intValue(), ((Integer)args[1]).intValue(), ((Integer)args[2]).intValue() ); return; @@ -63,15 +81,15 @@ public class CardGameDecoder extends InvocationDecoder ); return; - case SENT_CARDS_TO_PLAYER: - ((CardGameReceiver)receiver).sentCardsToPlayer( - ((Integer)args[0]).intValue(), (Card[])args[1] + case RECEIVED_HAND: + ((CardGameReceiver)receiver).receivedHand( + ((Integer)args[0]).intValue(), (Hand)args[1] ); return; - case CARDS_TRANSFERRED_BETWEEN_PLAYERS: - ((CardGameReceiver)receiver).cardsTransferredBetweenPlayers( - ((Integer)args[0]).intValue(), ((Integer)args[1]).intValue(), ((Integer)args[2]).intValue() + case SENT_CARDS_TO_PLAYER: + ((CardGameReceiver)receiver).sentCardsToPlayer( + ((Integer)args[0]).intValue(), (Card[])args[1] ); return; diff --git a/src/java/com/threerings/parlor/card/server/CardGameSender.java b/src/java/com/threerings/parlor/card/server/CardGameSender.java index f9fad18eb..c6cbdd79f 100644 --- a/src/java/com/threerings/parlor/card/server/CardGameSender.java +++ b/src/java/com/threerings/parlor/card/server/CardGameSender.java @@ -1,5 +1,23 @@ // // $Id$ +// +// Narya library - tools for developing networked games +// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved +// http://www.threerings.net/code/narya/ +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA package com.threerings.parlor.card.server; @@ -18,14 +36,14 @@ public class CardGameSender extends InvocationSender { /** * Issues a notification that will result in a call to {@link - * CardGameReceiver#receivedHand} on a client. + * CardGameReceiver#cardsTransferredBetweenPlayers} on a client. */ - public static void sendHand ( - ClientObject target, int arg1, Hand arg2) + public static void cardsTransferredBetweenPlayers ( + ClientObject target, int arg1, int arg2, int arg3) { sendNotification( - target, CardGameDecoder.RECEIVER_CODE, CardGameDecoder.RECEIVED_HAND, - new Object[] { new Integer(arg1), arg2 }); + target, CardGameDecoder.RECEIVER_CODE, CardGameDecoder.CARDS_TRANSFERRED_BETWEEN_PLAYERS, + new Object[] { new Integer(arg1), new Integer(arg2), new Integer(arg3) }); } /** @@ -40,6 +58,18 @@ public class CardGameSender extends InvocationSender new Object[] { new Integer(arg1), arg2 }); } + /** + * Issues a notification that will result in a call to {@link + * CardGameReceiver#receivedHand} on a client. + */ + public static void sendHand ( + ClientObject target, int arg1, Hand arg2) + { + sendNotification( + target, CardGameDecoder.RECEIVER_CODE, CardGameDecoder.RECEIVED_HAND, + new Object[] { new Integer(arg1), arg2 }); + } + /** * Issues a notification that will result in a call to {@link * CardGameReceiver#sentCardsToPlayer} on a client. @@ -52,16 +82,4 @@ public class CardGameSender extends InvocationSender new Object[] { new Integer(arg1), arg2 }); } - /** - * Issues a notification that will result in a call to {@link - * CardGameReceiver#cardsTransferredBetweenPlayers} on a client. - */ - public static void cardsTransferredBetweenPlayers ( - ClientObject target, int arg1, int arg2, int arg3) - { - sendNotification( - target, CardGameDecoder.RECEIVER_CODE, CardGameDecoder.CARDS_TRANSFERRED_BETWEEN_PLAYERS, - new Object[] { new Integer(arg1), new Integer(arg2), new Integer(arg3) }); - } - } diff --git a/src/java/com/threerings/parlor/client/ParlorDecoder.java b/src/java/com/threerings/parlor/client/ParlorDecoder.java index 70fcb6e5a..9e73362cc 100644 --- a/src/java/com/threerings/parlor/client/ParlorDecoder.java +++ b/src/java/com/threerings/parlor/client/ParlorDecoder.java @@ -1,5 +1,23 @@ // // $Id$ +// +// Narya library - tools for developing networked games +// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved +// http://www.threerings.net/code/narya/ +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA package com.threerings.parlor.client; @@ -24,13 +42,13 @@ public class ParlorDecoder extends InvocationDecoder * notifications. */ public static final int RECEIVED_INVITE = 2; - /** The method id used to dispatch {@link ParlorReceiver#receivedInviteResponse} - * notifications. */ - public static final int RECEIVED_INVITE_RESPONSE = 3; - /** The method id used to dispatch {@link ParlorReceiver#receivedInviteCancellation} * notifications. */ - public static final int RECEIVED_INVITE_CANCELLATION = 4; + public static final int RECEIVED_INVITE_CANCELLATION = 3; + + /** The method id used to dispatch {@link ParlorReceiver#receivedInviteResponse} + * notifications. */ + public static final int RECEIVED_INVITE_RESPONSE = 4; /** * Creates a decoder that may be registered to dispatch invocation @@ -63,18 +81,18 @@ public class ParlorDecoder extends InvocationDecoder ); return; - case RECEIVED_INVITE_RESPONSE: - ((ParlorReceiver)receiver).receivedInviteResponse( - ((Integer)args[0]).intValue(), ((Integer)args[1]).intValue(), (Object)args[2] - ); - return; - case RECEIVED_INVITE_CANCELLATION: ((ParlorReceiver)receiver).receivedInviteCancellation( ((Integer)args[0]).intValue() ); return; + case RECEIVED_INVITE_RESPONSE: + ((ParlorReceiver)receiver).receivedInviteResponse( + ((Integer)args[0]).intValue(), ((Integer)args[1]).intValue(), (Object)args[2] + ); + return; + default: super.dispatchNotification(methodId, args); } diff --git a/src/java/com/threerings/parlor/server/ParlorSender.java b/src/java/com/threerings/parlor/server/ParlorSender.java index 23e6c0b8a..5108d5cee 100644 --- a/src/java/com/threerings/parlor/server/ParlorSender.java +++ b/src/java/com/threerings/parlor/server/ParlorSender.java @@ -1,5 +1,23 @@ // // $Id$ +// +// Narya library - tools for developing networked games +// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved +// http://www.threerings.net/code/narya/ +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA package com.threerings.parlor.server; @@ -40,18 +58,6 @@ public class ParlorSender extends InvocationSender new Object[] { new Integer(arg1), arg2, arg3 }); } - /** - * Issues a notification that will result in a call to {@link - * ParlorReceiver#receivedInviteResponse} on a client. - */ - public static void sendInviteResponse ( - ClientObject target, int arg1, int arg2, Object arg3) - { - sendNotification( - target, ParlorDecoder.RECEIVER_CODE, ParlorDecoder.RECEIVED_INVITE_RESPONSE, - new Object[] { new Integer(arg1), new Integer(arg2), arg3 }); - } - /** * Issues a notification that will result in a call to {@link * ParlorReceiver#receivedInviteCancellation} on a client. @@ -64,4 +70,16 @@ public class ParlorSender extends InvocationSender new Object[] { new Integer(arg1) }); } + /** + * Issues a notification that will result in a call to {@link + * ParlorReceiver#receivedInviteResponse} on a client. + */ + public static void sendInviteResponse ( + ClientObject target, int arg1, int arg2, Object arg3) + { + sendNotification( + target, ParlorDecoder.RECEIVER_CODE, ParlorDecoder.RECEIVED_INVITE_RESPONSE, + new Object[] { new Integer(arg1), new Integer(arg2), arg3 }); + } + } diff --git a/src/java/com/threerings/whirled/client/SceneDecoder.java b/src/java/com/threerings/whirled/client/SceneDecoder.java index d325f2133..bad400d18 100644 --- a/src/java/com/threerings/whirled/client/SceneDecoder.java +++ b/src/java/com/threerings/whirled/client/SceneDecoder.java @@ -1,5 +1,23 @@ // // $Id$ +// +// Narya library - tools for developing networked games +// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved +// http://www.threerings.net/code/narya/ +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA package com.threerings.whirled.client; diff --git a/src/java/com/threerings/whirled/server/SceneSender.java b/src/java/com/threerings/whirled/server/SceneSender.java index 828e67dfa..a4a1d5205 100644 --- a/src/java/com/threerings/whirled/server/SceneSender.java +++ b/src/java/com/threerings/whirled/server/SceneSender.java @@ -1,5 +1,23 @@ // // $Id$ +// +// Narya library - tools for developing networked games +// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved +// http://www.threerings.net/code/narya/ +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA package com.threerings.whirled.server; diff --git a/src/java/com/threerings/whirled/zone/client/ZoneDecoder.java b/src/java/com/threerings/whirled/zone/client/ZoneDecoder.java index 1f1e5f17f..008b2ebe7 100644 --- a/src/java/com/threerings/whirled/zone/client/ZoneDecoder.java +++ b/src/java/com/threerings/whirled/zone/client/ZoneDecoder.java @@ -1,5 +1,23 @@ // // $Id$ +// +// Narya library - tools for developing networked games +// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved +// http://www.threerings.net/code/narya/ +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA package com.threerings.whirled.zone.client; diff --git a/src/java/com/threerings/whirled/zone/server/ZoneSender.java b/src/java/com/threerings/whirled/zone/server/ZoneSender.java index 5079a40e4..a0877bbe5 100644 --- a/src/java/com/threerings/whirled/zone/server/ZoneSender.java +++ b/src/java/com/threerings/whirled/zone/server/ZoneSender.java @@ -1,5 +1,23 @@ // // $Id$ +// +// Narya library - tools for developing networked games +// Copyright (C) 2002-2006 Three Rings Design, Inc., All Rights Reserved +// http://www.threerings.net/code/narya/ +// +// This library is free software; you can redistribute it and/or modify it +// under the terms of the GNU Lesser General Public License as published +// by the Free Software Foundation; either version 2.1 of the License, or +// (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA package com.threerings.whirled.zone.server;