gtpc2madC/C++ Language Support User's Guide

tppc_get_type-Get Conversation Type

This function returns the conversation type, which can be either basic or mapped.

Format

#include   <tppc.h>
void       tppc_get_type(unsigned int *resid,
                         struct tppc_return_codes *rcode,
                         enum t_get_type_type *type);

resid
This is a pointer to a 4-byte field that contains the resource ID. This resource ID must be the ID assigned on the initial ALLOCATE for this conversation or one that was assigned by an incoming ATTACH.

rcode
This is a pointer to the structure tppc_return_codes, defined in tppc.h, where the return code is to be placed.

type
This is a pointer to a 1-byte field that contains the enumeration type t_get_type_type, where the conversation type is to be returned. The returned values are:

GET_TYPE_BASIC_CONVERSATION
This value indicates that the resource is a basic conversation.

GET_TYPE_MAPPED_CONVERSATION
This value indicates that the resource is a mapped conversation.

Return Codes

The return codes that can be returned to the program that called the tppc_get_type function. A complete list of the return codes and their definitions can be found in Table 37 and Table 38.

Symbolic Name Primary Code Secondary Code
LU62RC_OK 0000  
LU62RC_PARAMETER_CHECK 0001  
  LU62RC_PK_BAD_TCBID .... 00000001
  LU62RC_PK_BAD_CONVID .... 00000002

Programming Considerations

Examples

The following example retrieves the conversation type.

#include <tppc.h>
 
      unsigned int                   resource_id;
      struct   tppc_return_codes     return_code;
      enum     t_get_type_type       type;

  ·
  ·
  ·
/* set up resource_id with the value returned from the allocate verb */
  ·
  ·
  ·
tppc_get_type(&resource_id,&return_code,&type); /* normal processing path */
  ·
  ·
  ·

Related Information