Truxton communication get type

From truxwiki.com
Revision as of 07:55, 19 May 2023 by Sam (talk | contribs) (Created page with "This retrieves the type of the communication. This corresponds to the <code>[ID]</code> column of the <code><nowiki>[</nowiki>MessageType<nowiki>]</nowiki></...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This retrieves the type of the communication. This corresponds to the [ID] column of the [MessageType] table.

Syntax

uint64_t truxton_communication_get_type( uint64_t communication_handle );

Parameters

communication_handle

The handle created by the truxton_communication_create call.

Return value

The type of the communication as recorded in the [MessageTypeID] column of the [Message] table. This value should be present in the [ID] column of the [MessageType] table or one of the defined constants.

Sample

int is_iMessage( uint64_t communication_handle )
{
   uint64_t message_type = truxton_communication_get_type( communication_handle );

   if ( message_type == MESSAGE_TYPE_IMESSAGE )
   {
      return( 1 );
   }

   return( 0 );
}