TIM SDK
TIM API C
print_option.h File Reference

Description

Print option.

Object type print_option.

Functions

ta_e_result_code_t ta_print_option_create (ta_object_t *print_option, ta_e_recipient_t recipient, ta_e_print_format_t print_format, int print_width, int print_flags)
 Create print option. More...
 
ta_e_result_code_t ta_print_option_get_recipient (ta_object_t print_option, ta_e_recipient_t *recipient)
 Target of the print option. Can be Merchant or Cardholder. More...
 
ta_e_result_code_t ta_print_option_get_print_format (ta_object_t print_option, ta_e_print_format_t *print_format)
 Specifies the print format. More...
 
ta_e_result_code_t ta_print_option_get_print_width (ta_object_t print_option, int *print_width)
 Specifies the print width of the receipt (default = 40). More...
 
ta_e_result_code_t ta_print_option_get_print_flags (ta_object_t print_option, int *print_flags)
 Print flags as OR combined values from ta_e_print_format_t. More...
 

Function Documentation

◆ ta_print_option_create()

ta_e_result_code_t ta_print_option_create ( ta_object_t print_option,
ta_e_recipient_t  recipient,
ta_e_print_format_t  print_format,
int  print_width,
int  print_flags 
)

Create print option.

Parameters
[out]print_optionPointer to variable to write created object instance to. Created object instance is retained.
[in]recipientRecipient.
[in]print_formatPrint format.
[in]print_widthPrint width in characters.
[in]print_flagsPrint flags using OR combined values from ta_e_print_format_t.
Return values
ta_c_rc_okObject instance has been created and written to print_option.
ta_c_rc_invalid_argumentprint_option is null-pointer.
ta_c_rc_invalid_argumentprint_width is less than 1.
ta_c_rc_out_of_memoryFailed allocating memory.

◆ ta_print_option_get_print_flags()

ta_e_result_code_t ta_print_option_get_print_flags ( ta_object_t  print_option,
int *  print_flags 
)

Print flags as OR combined values from ta_e_print_format_t.

Parameters
[in]print_optionObject instance of type print_option.
[out]print_flagsPointer to variable to write value to.
Return values
ta_c_rc_okValue written to print_flags.
ta_c_rc_invalid_argumentprint_option is ta_invalid_object.
ta_c_rc_invalid_argumentprint_option is not of type print_option.
ta_c_rc_invalid_argumentprint_flags is null-pointer.

◆ ta_print_option_get_print_format()

ta_e_result_code_t ta_print_option_get_print_format ( ta_object_t  print_option,
ta_e_print_format_t print_format 
)

Specifies the print format.

Parameters
[in]print_optionObject instance of type print_option.
[out]print_formatPointer to variable to write value to.
Return values
ta_c_rc_okValue written to print_format.
ta_c_rc_invalid_argumentprint_option is ta_invalid_object.
ta_c_rc_invalid_argumentprint_option is not of type print_option.
ta_c_rc_invalid_argumentprint_format is null-pointer.

◆ ta_print_option_get_print_width()

ta_e_result_code_t ta_print_option_get_print_width ( ta_object_t  print_option,
int *  print_width 
)

Specifies the print width of the receipt (default = 40).

Parameters
[in]print_optionObject instance of type print_option.
[out]print_widthPointer to variable to write value to.
Return values
ta_c_rc_okValue written to print_width.
ta_c_rc_invalid_argumentprint_option is ta_invalid_object.
ta_c_rc_invalid_argumentprint_option is not of type print_option.
ta_c_rc_invalid_argumentprint_width is null-pointer.

◆ ta_print_option_get_recipient()

ta_e_result_code_t ta_print_option_get_recipient ( ta_object_t  print_option,
ta_e_recipient_t recipient 
)

Target of the print option. Can be Merchant or Cardholder.

Parameters
[in]print_optionObject instance of type print_option.
[out]recipientPointer to variable to write value to.
Return values
ta_c_rc_okValue written to recipient.
ta_c_rc_invalid_argumentprint_option is ta_invalid_object.
ta_c_rc_invalid_argumentprint_option is not of type print_option.
ta_c_rc_invalid_argumentrecipient is null-pointer.