moss-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Moss-devel] CVS: moss/rmc/src/Demos/Chat Chat.rmc,NONE,1.1 Makefile.am,


From: Alexander Feder <address@hidden>
Subject: [Moss-devel] CVS: moss/rmc/src/Demos/Chat Chat.rmc,NONE,1.1 Makefile.am,NONE,1.1
Date: Sun, 23 Jun 2002 09:27:52 -0400

Update of /cvsroot/moss/moss/rmc/src/Demos/Chat
In directory subversions:/tmp/cvs-serv2212/src/Demos/Chat

Added Files:
        Chat.rmc Makefile.am 
Log Message:
added rmc


--- NEW FILE ---
/***************************************************************************
                        Chat.rmc -  description
                           -------------------
    begin                : Wed June 13 2001
    copyright            : (C) 2001 Manfred Morgner
    email                : address@hidden
 
 ***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program 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 General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *                                                                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place Suite 330,                                            *
 *   Boston, MA  02111-1307, USA.                                          *
 *                                                                         *
 ***************************************************************************
 *
 * The RMC source header/script to generate RMC class implementations.
 *
 */ 

// ?? #define RTTI_CCHAT 0x77973323

/*
   This tells the rmcgen program where to look for server and client
   (one rmc file per class)
   the path is relative to the .rmc / this file
*/

#define SERVER Server/Chat_server
#define CLIENT Client/Chat_client

/*
    These will be used for the m_oRmcClient.RemoteSystemConfig
    The values must be known inside the constructor, which puts a restriction 
on the code
    Another alternative for this is to let the user define three methods that
    return these.
    #define HOST getHost()

    Another one is to force the user to define three methods called 
RmcGetHost()....
    Then these three lines would not be needed.
*/
#define HOST sComputer
#define LOGIN sLogin
#define PASSWORD sPassword

class CChat
  {
  
  public:
  
    // Sends the given string to the chat server
    // Returns the success code (RMC_SUCCESS or other)
    // RMC: The argument is an IN parameter. What means, the data
    //      will be sent to the server but don't come back.
    //      There is no explaination needed, bacause 
    //      "const" arguments can't receive any data.
    RMC long Send(const string &s);

    // Receives a string from the chat server
    // Returns the success code (RMC_SUCCESS or other)
    // RMC: The argument is an OUT parameter. What means, the data
    //      will only be received from the server but nothings is to send
    //      We should declare this, because otherwise the code generator
    //      has to generate code to send the parameter to the server
    //      There is no other way to show, that no data is to send.
    RMC long Receive([out] string &s);
    
    // Receives a string from the chat servers history by a given index
    // Returns nothings
    // RMC: The second argument is an OUT parameter. What means, the first
    //      argument is "IN only" (by declaration) and the second argument
    //      is "OUT-only" (also by declaration)
    RMC void GetHistory(long nIndex, [out] string &s);
    
    // Receives a string from the chat servers history
    // Returns the string
    // RMC: There is no argument, so we can be short in implementation
    RMC string GetHistory();
    
    // Sends any data to the stub (server sided object)
    // Returns nothings
    // RMC: The mehtod only contains OUT parameters an no return value
    //      So, this is a special case for the code generator
    RMC void SetParameter(const string &sNick, long nOptions);
    
        // Send an object to the server
        // returns nothings
        // RMC: Object transport example
        RMC void Send([in,object] CAgent &roAgent);
        
        // Starts the uploaded agents
        // Returns nothings
        // RMC: notings in, nothings out
        RMC void StartAgents();

    // further sample methods are coming
    
  }; // class CChat

--- NEW FILE ---
SUBDIRS = . Client Server





reply via email to

[Prev in Thread] Current Thread [Next in Thread]