Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » QAnywhere » QAnywhere API Reference » QAnywhere C++ API reference

 

MessageType class

Syntax
public MessageType
Remarks

Defines constant values for the MessagePropertiesMSG_TYPE message property.

The following example shows the onSystemMessage method which is used to handle QAnywhere system messages.

The message type is compared to MessageType.NETWORK_STATUS_NOTIFICATION.

  void SystemQueueListener::onMessage(QAMessage * msg)
  {
   QATextMessage *  t_msg;
   TCHAR    buffer[512];
   int     len;
   int     msg_type;
   t_msg = msg->castToTextMessage();
   if( t_msg != NULL ) {
    t_msg->getIntProperty( MessageProperties::MSG_TYPE, &msg_type );
   if( msg_type == MessageType::NETWORK_STATUS_NOTIFICATION ) {
    // get network names using MessageProperties::NETWORK
      len = t_msg->getStringProperty(MessageProperties::NETWORK,buffer,sizeof(buffer));
  }
  //...
  }
 }
 
Members

All members of MessageType, including all inherited members.


NETWORK_STATUS_NOTIFICATION variable
PUSH_NOTIFICATION variable
REGULAR variable