Main Page | Class Hierarchy | Alphabetical List | Compound List | Compound Members

# IRdNtChat Struct Reference

Inherits IDispatch.

List of all members.

## Public Member Functions
HRESULT | Clear (void)
HRESULT | AddMsg ([in] IRdNtChatMsg *pRdNtChatMsg)
HRESULT | GetNumMsgs (RtDWORD *pdwNumMsgs)
HRESULT | GetMsg (RtDWORD dwMsgNum, IRdNtChatMsg **ppRdNtChatMsg)
HRESULT | MaxNumOfMsgs ([out, retval] RtDWORD *pdwMaxNum)
HRESULT | MaxNumOfMsgs ([in] RtDWORD dwMaxNum)

## Detailed Description

This object store all the chat messages. It is generated for example by client object into Chat connector (see IRiNetwork::NtConnectTo) that you can find in /Network space after you enter into a Shared Space.

Example: This example demonstrates usage of IRdNtChat and IRdNtChatMsg objects. The code below create its own RdNtChat object, but you can read the one stored in Chat connector too.

        // Create chat message and fill it with a data
        RdNtChatMsg = System.CreateDO("Network Package/Net Chat Msg Data");
        RdNtChatMsg.ClientName = 'tester';
        RdNtChatMsg.Text = 'This is a text'

        // Create chat object and add the chat message into it
        RdNtChat = System.CreateDO("Network Package/Net Chat Data");
        RdNtChat.AddMsg(RdNtChatMsg);

        // Now enumerate all messages in RdNtChat object and show them in debug view
        dwNumMsgs = RdNtChat.GetNumMsgs();
        for (ind = 0; ind < dwNumMsgs; ind++)
        {
            RdNtChatMsg = RdNtChat.GetMsg(ind);
            bstrLine = RdNtChatMsg.ClientName() + ': ' + RdNtChatMsg.Text() + '\n';
            System.Trace(bstrLine);
        }

See also:
  IRdNtChatMsg

## Member Function Documentation

HRESULT IRdNtChat::Clear | ( | void |  | ) |

| Delete all the chat messages.

HRESULT IRdNtChat::AddMsg | ( | [in] IRdNtChatMsg * | pRdNtChatMsg | ) |

  | Add new message. Parameters:
  pRdNtChatMsg | - New chat message IRdNtChatMsg object

HRESULT IRdNtChat::GetNumMsgs | ( | RtDWORD * | pdwNumMsgs | ) |

  | Get number of stored messages Parameters:
  pdwNumMsgs | - returns number of stored messages
See also: GetMsg

HRESULT IRdNtChat::GetMsg | ( | RtDWORD | dwMsgNum,
|  | IRdNtChatMsg ** | ppRdNtChatMsg
| ) |

  | Get message with specified index. Parameters:
  dwMsgNum | - index of the message you want to read
  ppRdNtChatMsg | - returned IRdNtChatMsg message object
See also: GetNumMsgs

HRESULT IRdNtChat::MaxNumOfMsgs | ( | [out, retval] RtDWORD * | pdwMaxNum | ) |

  | Read maximum number of stored chat messages in this object. Parameters:
  pdwMaxNum | - number of the messages

HRESULT IRdNtChat::MaxNumOfMsgs | ( | [in] RtDWORD | dwMaxNum | ) |

  | Set maximum number of stored messages. The default value is 100. If new message is added and object already storing the maximum number of messages, then the last one is removed and all other messages are shifted. Parameters:
  pdwMaxNum | - the maximum number of stored messages