# IRdNtChatMsg Interface Reference

Inherits IDispatch.

List of all members.

## Public Member Functions
HRESULT | Clear (void)
## Properties
RtCSNID * | ClientId`[get]`
RtCSNID | ClientId`[set]`
BSTR * | ClientName`[get]`
BSTR | ClientName`[set]`
RtQWORD * | Time`[get]`
RtQWORD | Time`[set]`
BSTR * | Text`[get]`
BSTR | Text`[set]`

## Detailed Description

Object represents a single chat message.

IRdNtChat IRfNetworkFn::CreateTextChatMsg

## Member Function Documentation

HRESULT IRdNtChatMsg::Clear | ( | void |  | ) |

Clear this chat message.

        var chatMessage = System.CreateDO('Network Package/Net Chat Msg Data');
        chatMessage.Clear();

## Property Documentation

RtCSNID * IRdNtChatMsg::ClientId`[get]`

Get client's identification number property. This number is intended to use as message author's identification.

Returns:
  pcsnidClient [out, retval] Returns client's identification number.

  Standard HRESULT processing can be applied to the result.

     var cID = chatMessage.ClientId;

RtCSNID IRdNtChatMsg::ClientId`[set]`

Set client's identification number property for this message.

Parameters:

  | csnidClient | [in] Client's identification number.

Returns:
  Standard HRESULT processing can be applied to the result.

     chatMessage.ClientId = -1;

BSTR * IRdNtChatMsg::ClientName`[get]`

Get client's name property of this message.

Returns:
  pbstrName [out, retval] Returns client's name.

  Standard HRESULT processing can be applied to the result.

     var cName = chatMessage.ClientName;

BSTR IRdNtChatMsg::ClientName`[set]`

Set client's name property for this message.

Parameters:

  | bstrName | [in] Client name.

Returns:
  Standard HRESULT processing can be applied to the result.

     chatMessage.ClientName = 'myName';

RtQWORD * IRdNtChatMsg::Time`[get]`

Get time property of this message. If this object was created by Server,
then it defines time when this message was send to all clients.

Returns:
  pTime [out, retval] Returns message's time property.

  Standard HRESULT processing can be applied to the result.

        for(i=0;i<10;i++)
        {
        chatMessage = chatData.GetMsg(i);
        bstring = chatMessage.ClientId + ':  ' + chatMessage.Time + ':  ' + chatMessage.Text
        + '  by  ' + chatMessage.ClientName + '\n';
        }
        System.Alert(bstring);

RtQWORD IRdNtChatMsg::Time`[set]`

Set time property for this message. The time should specify time when it was created or sent.

Parameters:

  | time | [in] Message's time.

Returns:
  Standard HRESULT processing can be applied to the result.

        var timeValue = new Date();
        chatMessage.Time = timeValue.getTime();

BSTR * IRdNtChatMsg::Text`[get]`

Get text property of this message

Returns:
  pbstrText [out, retval] Returns text of the message.

  Standard HRESULT processing can be applied to the result.

     var messText = chatMessage.Text;

BSTR IRdNtChatMsg::Text`[set]`

Set text property of this message

Parameters:

  | bstrText | [in] Text of the message.

Returns:
  Standard HRESULT processing can be applied to the result.

     chatMessage.Text = 'this is only a test';