class O2GMessageTableRow

Parents
O2GMessageRow

Brief

The class provides access to the message information.

Details

The class represents a single row of the Messages table.

Prerequisites

The class is available only through the use of the O2GTableManager. An O2GTableManager object must have the O2GTableManagerStatus.TablesLoaded status.
For complete instructions on the table manager usage, see the How to use table manager in ForexConnect API section.
After tables are loaded, you must obtain an instance of the O2GMessagesTable class. For example,

O2GMessagesTable messagesTable = (O2GMessagesTable)tableManager.getTable(O2GTableType.Messages);

Instantiating the class

If you need access to the current message information, you can get an instance of the class by calling any of the following methods of the O2GMessagesTable class:

O2GMessagesTable method

Syntax example

getRow

O2GMessageTableRow message = messagesTable.getRow(i);

findRow

O2GMessageTableRow message;
bool bFound = messagesTable.findRow(mTradeID, out message);

getNextRow

O2GMessageTableRow message;
bool bFound = messagesTable.getNextRow(mIterator, out message);

getNextRowByColumnValue

O2GMessageTableRow message;
bool bFound = messagesTable.getNextRowByColumnValue("OfferID", mOfferID, mIterator, out message);

getNextRowByColumnValues

O2GMessageTableRow message;
bool bFound = messagesTable.getNextRowByColumnValues("Type", new object[] { "1", "2" }, mIterator, out message);

getNextRowByMultiColumnValues

O2GMessageTableRow message;
bool bFound = messagesTable.getNextRowByMultiColumnValues(new string[] { "Feature", "From" }, new object[] { mFeature, mFrom }, mIterator, out message);

If you want to track incoming messages, your application must have a listener class that implements the IO2GTableListener interface. An instance of the listener class must be subscribed to the table update with the O2GTableUpdateType.Insert type. Before the logout, you must unsubscribe the listener from this update type. The examples of the subscription/unsubscription syntax are listed below.

IO2GTableListener method

Subscribe syntax

Unsubscribe syntax

onAdded

messagesTable.subscribeUpdate(O2GTableUpdateType.Insert, tableListener);

messagesTable.unsubscribeUpdate(O2GTableUpdateType.Insert, tableListener);

To instantiate the O2MessageTableRow class, you must cast the rowData parameter of the above onAdded method to the O2GMessageTableRow type. For example,

O2MessageTableRow row = (O2GMessageTableRow)(rowData);

Example

Get message sender and text [show]

The type defined in the fxcore2.dll assembly. The namespace is fxcore2.

Public Properties

Columns

The columns of the table.

Feature

Gets the type of the message content.

From

Gets the login of the message sender.

HTMLFragmentFlag

Gets the flag indicating whether the message is in the HTML format or not.

MsgID

Gets the unique identification number of the message.

Subject

Gets the subject of the message.

TableType

The type of the table.

Text

Gets the text body of the message.

Time

Gets the date and time when the recipient receives the message.

Type

Gets the message container.

Public Methods

getCell

Gets a cell of the table.

isCellChanged

Gets a flag indicating whether the value of the cell is changed.

back