// // $Id$ // // Narya library - tools for developing networked games // Copyright (C) 2002-2010 Three Rings Design, Inc., All Rights Reserved // http://code.google.com/p/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.bureau.data { import com.threerings.bureau.client.BureauService; import com.threerings.presents.client.Client; import com.threerings.presents.data.InvocationMarshaller; import com.threerings.util.Integer; /** * Provides the implementation of the BureauService interface * that marshalls the arguments and delivers the request to the provider * on the server. Also provides an implementation of the response listener * interfaces that marshall the response arguments and deliver them back * to the requesting client. */ public class BureauMarshaller extends InvocationMarshaller implements BureauService { /** The method id used to dispatch agentCreated requests. */ public static const AGENT_CREATED :int = 1; // from interface BureauService public function agentCreated (arg1 :int) :void { sendRequest(AGENT_CREATED, [ Integer.valueOf(arg1) ]); } /** The method id used to dispatch agentCreationFailed requests. */ public static const AGENT_CREATION_FAILED :int = 2; // from interface BureauService public function agentCreationFailed (arg1 :int) :void { sendRequest(AGENT_CREATION_FAILED, [ Integer.valueOf(arg1) ]); } /** The method id used to dispatch agentDestroyed requests. */ public static const AGENT_DESTROYED :int = 3; // from interface BureauService public function agentDestroyed (arg1 :int) :void { sendRequest(AGENT_DESTROYED, [ Integer.valueOf(arg1) ]); } /** The method id used to dispatch bureauError requests. */ public static const BUREAU_ERROR :int = 4; // from interface BureauService public function bureauError (arg1 :String) :void { sendRequest(BUREAU_ERROR, [ arg1 ]); } /** The method id used to dispatch bureauInitialized requests. */ public static const BUREAU_INITIALIZED :int = 5; // from interface BureauService public function bureauInitialized (arg1 :String) :void { sendRequest(BUREAU_INITIALIZED, [ arg1 ]); } } }