/*
 *                         OpenSplice DDS
 *
 *   This software and documentation are Copyright 2006 to 2009 PrismTech 
 *   Limited and its licensees. All rights reserved. See file:
 *
 *                     $OSPL_HOME/LICENSE 
 *
 *   for full copyright notice and license terms. 
 *
 */

/************************************************************************
 * LOGICAL_NAME:    Chat.idl
 * FUNCTION:        OpenSplice Tutorial example code.
 * MODULE:          Tutorial for the Java programming language.
 * DATE             june 2006.
 ************************************************************************
 * 
 * This file contains the data definitions for the tutorial examples.
 *
 ***/

module Chat {

    const long MAX_NAME = 32;
    typedef string<MAX_NAME> nameType;

    struct ChatMessage {
        long      userID;          // owner of message
        long      index;           // message number
        string    content;         // message body
    };
#pragma keylist ChatMessage userID

    struct NameService {
        long     userID;           // unique user identification
        nameType name;             // name of the user
    };
#pragma keylist NameService userID

    struct NamedMessage {
        long     userID;           // unique user identification
        nameType userName;         // user name
        long     index;            // message number
        string   content;          // message body
    };
#pragma keylist NamedMessage userID

};
