📄 kusapi.h
字号:
kustv_reinit can be used to reinitialize a TLV handle that is no longer
needed.
*/
kusst kustv_allocate_handle (/*_
kustv_handle *tlv_handle,
ub1 *tlv_buffer,
ub4 buf_size
_*/);
#ifndef _WINDOWS
/* ------------------------------- kustv_dump -------------------------------*/
/*
NAME
kustv_dump - dump tlv buffer
DESCRIPTION
Formats the content of a TLV buffer into the file specified by the caller
PARAMETERS
tlv_handle - handle of the TLV buffer to be dumped (in)
header - ASCIZ string to be displayed before dumping the buffer (in)
data_flg - flag to indicate if the contents of the value fueld in the TLV
should be displayed (in)
append_flg - flag to indicate if an existing instance of the output
file should be appended to (or replaced)
get_tagname - routine to get text associated with tags
directory - ASCIZ string containing a directory specification for the
output file (if absent, current default directory is used)
file_name - ASCIZ string containing a file name for the output file.
If absent, stderr is used and append_flg and directory are ignored.
If specified without an extension, the Oracle extension for an output
file on the given platform is used.
RETURN VALUE
KUSSTOK Success
KUSSTITH invalid tlv handle
KUSSTDMPOP can't open dump file
KUSSTDMPCL can't close dump file
NOTES
*/
kusst kustv_dump (/*_
kustv_handle tlv_handle,
CONST char *header,
int data_flg,
int append_flg,
CONST char *(*get_tagname)(ub2),
CONST char *directory,
CONST char *file_name
_*/);
#endif
/* ------------------------- kustv_free_handle ----------------------------- */
/*
NAME
kustv_free_handle - free a handle for a TLV buffer
DESCRIPTION
Free a TLV handle that has already been created
PARAMETERS
tlv_handle - handle of the TLV buffer (in/out)
RETURN VALUE
status of call
NOTES
kustv_reinit_handle can be used to reinitialize a handle that is no
longer needed.
*/
kusst kustv_free_handle (/*_ kustv_handle *tlv_handle _*/);
/* ----------------------------- kussys_get_info --------------------------- */
/*
NAME
kussys_get_info - retrieve non database specific data
DESCRIPTION
Retrieve non database specific information
PARAMETERS
context_handle - handle for the continuation context (in/out)
info_buf - TLV buffer indicating data to be returned (in)
info_buf_len - number of bytes in info_buffer (in)
result_buf - allocated TLV buffer to hold data returned (in/out)
result_buf_len - number of bytes in result_buf (in/out)
buffer_termination_status - indicates how buffer was terminated (normally,
truncated, or continued) (out)
RETURN VALUE
status of call
NOTES
This function is a noop for Oracle. It is included for compatability
with Rdb only.
*/
kusst kussys_get_info (/*_
kuscx_handle ctx_handle,
ub1 *info_buffer,
ub4 info_buffer_length,
ub1 *result_buffer,
ub4 *result_buffer_length,
kustvs *buffer_termination_status
_*/);
/* ---------------------------- kussys_error_text -------------------------- */
/*
NAME
kussys_error_text - error text
DESCRIPTION
Display information about status of last kustv call
PARAMETERS
text_buf - buffer to hold error message (in/out)
text_buf_len - number of bytes in text buffer (in)
text_len_out - number of bytes written into text_buf
RETURN VALUE
status of call
NOTES
This function is a noop for Oracle. It is included for compatability
with Rdb only.
*/
kusst kussys_error_text (/*_ char *text_buf,
ub4 text_buf_len, ub4 *text_len_out _*/);
/* ------------------------------ kustv_get -------------------------------- */
/*
NAME
kustv_get - get next entry in tlv buffer
DESCRIPTION
Retrieves information about next entry in the tlv buffer and advances
pointer into the TLV buffer to the following entry.
PARAMETERS
tlv_handle - handle of the TLV buffer (in)
tag - tag for the next entry (out)
length - number of bytes in the value for the TLV entry (out)
value - pointer to value field for the TLV entry (out)
RETURN VALUE
KUSSTOK Success
KUSSTITH Invalid TLV handle
NOTES
*/
kusst kustv_get (/*_
kustv_handle tlv_handle,
ub2 *tag,
ub2 *length,
ub1 **value
_*/);
/* ------------------------ kustv_reinit_handle ---------------------------- */
/*
NAME
kustv_reinit_handle - reinitialize a TLV handle
DESCRIPTION
Reimitializes a TLV handle so that it can be used to read or write a new
TLV buffer.
PARAMETERS
tlv_handle - handle of the TLV buffer (in/out)
buffer - address of the TLV buffer
buffer_size - number of bytes in the TLV buffer
RETURN VALUE
KUSSTOK Success
KUSSTITH Invalid TLV handle
NOTES
*/
kusst kustv_reinit_handle (/*_
kustv_handle tlv_handle,
ub1 *buffer,
ub4 buffer_length
_*/);
/* --------------------------- kustv_length -------------------------------- */
/*
NAME
kustv_length - return length of a TLV buffer
DESCRIPTION
return the length of a TLV buffer associated with a TLV handle
PARAMETERS
tlv_handle - handle of the TLV buffer (in)
buffer_length - number of bytes in the buffer (out)
RETURN VALUE
KUSSTOK Success
KUSSTITL Invalid TLV handle
NOTES
*/
kusst kustv_length (/*_
kustv_handle tlv_handle,
ub4 buffer_length
_*/);
/* ---------------------------- kustv_offset ------------------------------- */
/*
NAME
kustv_offset - return offset of a TLV buffer
DESCRIPTION
return the current offset of a TLV buffer associated with a TLV handle
PARAMETERS
tlv_handle - handle of the TLV buffer (in)
offset - current offset for TLV buffer (out)
RETURN VALUE
KUSSTOK - success
KUSSTITH - invalid TLV handle
NOTES
*/
kusst kustv_offset (/*_
kustv_handle tlv_handle,
ub4 *offset
_*/);
/* ------------------------ kustvp1_put_one_byte --------------------------- */
/*
NAME
kustvp1_put_one_byte - Insert a TLV entry with a value field of 1 byte
DESCRIPTION
Adds a new TLV entry to the end of the current TLV buffer. This entry
contains 1 byte.
PARAMETERS
tlv_handle - handle of the TLV buffer (in/out)
tag - tag for the new entry (in)
value - value for the new entry (in)
RETURN VALUE
status of the operation
NOTES
*/
kusst kustvp1_put_one_byte (/*_
kustv_handle tlv_handle,
ub2 tag,
ub1 value
_*/);
/* ------------------------- kustvp2_put_two_bytes ------------------------- */
/*
NAME
kustvp2_put_two_bytes - Insert a TLV entry with a value field of 2 byte
DESCRIPTION
Adds a new TLV entry to the end of the current TLV buffer. This entry
contains 2 bytes.
PARAMETERS
tlv_handle - handle of the TLV buffer (in/out)
tag - tag for the new entry (in)
value - value for the new entry (in)
RETURN VALUE
status of the operation
NOTES
*/
kusst kustvp2_put_two_bytes (/*_
kustv_handle tlv_handle,
ub2 tag,
ub2 value
_*/);
/* ----------------------- kustvp4_put_four_bytes -------------------------- */
/*
NAME
kustvp4_put_four_bytes - Insert a TLV entry with a value field of 4 byte
DESCRIPTION
Adds a new TLV entry to the end of the current TLV buffer. This entry
contains 4 bytes.
PARAMETERS
tlv_handle - handle of the TLV buffer (in/out)
tag - tag for the new entry (in)
value - value for the new entry (in)
RETURN VALUE
status of the operation
NOTES
*/
kusst kustvp4_put_four_bytes (/*_
kustv_handle tlv_handle,
ub2 tag,
ub4 value
_*/);
/* ----------------------------- kustv_put --------------------------------- */
/*
NAME
kustv_put - Insert a TLV entry
DESCRIPTION
Adds a new TLV entry to the end of the current TLV buffer.
PARAMETERS
tlv_handle - handle of the TLV buffer (in/out)
tag - tag for the new entry (in)
length - number of bytes in the new entry (in)
value - value for the new entry (in)
RETURN VALUE
status of the operation
NOTES
*/
kusst kustv_put (/*_
kustv_handle tlv_handle,
ub2 tag,
ub2 length,
dvoid *value
_*/);
/* -------------------------- kustvptg_put_tag ----------------------------- */
/*
NAME
kustvptg_put_tag - Insert a TLV entry with no value field
DESCRIPTION
Adds a new TLV entry to the end of the current TLV buffer. the entry
contains a 0-length value field.
PARAMETERS
tlv_handle - handle of the TLV buffer (in/out)
tag - tag for the new entry (in)
RETURN VALUE
status of the operation
NOTES
*/
kusst kustvptg_put_tag (/*_
kustv_handle tlv_handle,
ub2 tag
_*/);
/* -------------------------- kustv_buffer_state --------------------------- */
/*
NAME
kustv_buffer_state - return termination state of TLV buffer
DESCRIPTION
Returns informationon how a TLV buffer was terminated. This call returns
useful information only if a TLV handle was used to read or write the
termination tag. The termination information is preserved
PARAMETERS
tlv_handle - handle of the TLV buffer (in)
state - termination state for the TLV (out)
RETURN VALUE
status of the operation
NOTES
*/
kusst kustv_buffer_state (/*_
kustv_handle tlv_handle,
kustvs *state
_*/);
#endif /* kusapi */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -