 |
» |
|
|
 |
After establishing a connection, either select (ft_select())
or create (ft_create()) a file for further manipulation. You must
always select a file before opening it (ft_open()), though the selection
automatically occurs if you create the file. After performing FTAM operations, close (ft_close()) the file
and then deselect (ft_deselect()) or delete (ft_delete()) it. The
file remains intact if you deselect it; if you delete the file,
it no longer exists. ft_create() |  |
#include %</opt/ftam/include/map.h> #include %</opt/ftam/include/mapftam.h> Return code ft_create (connection_id, filename, contents_type, requested_access, file_status, return_event_name, input_dcb, inout_dcb) Connection_id connection_id; Ft_filename filename; struct Ft_contents_type contents_type; Ft_file_actions requested_access; enum Ft_file_status file_status; Local_event_name return_event_name; struct Ft_create_in_dcb *input_dcb; struct Ft_create_out_dcb **inout_dcb; |
Use ft_create() to create a new file. If successful, ft_create()
automatically selects the file. Invoke ft_create() in the FTAM regime
to move to the File Selection regime. During ft_connect(), you must negotiate the FT_FU_LTD_MGMT
functional_units to use ft_create(). If the file already exists, the file_status parameter
determines whether a new file is created or the request fails. (Refer
to the "Ft_file_status" section in the "FTAM
Data Structures" chapter for options on setting this field.) The subset of the input_dcb->attributes.mask field
(of type struct Ft_attributes) that is valid for ft_create() is
as follows. If you do not specify permitted_actions, FTAM uses
the requested_access values for the permitted_actions values. FTAM uses the exposed parameters filename and contents_type
and does not use input_dcb->attributes.values.filename and input_dcb-
>attributes.values.contents_type.
struct Ft_create_in_dcb { struct Ft_attributes attributes; struct Ft_concurrency_control *concurrency_control; Ft_single_file_pw create_file_pw; struct Ft_file_passwords file_passwords; Ft_account account; }; |
struct Ft_create_out_dcb { Uint32 size; struct Api_rc result; enum Ft_state_result state_result; enum Ft_action_result action_result; struct Ft_attributes attributes; struct Ft_diagnostic *diagnostic; }; |
ft_select() |  |
#include %</opt/ftam/include/map.h> #include %</opt/ftam/include/mapftam.h> Return_code ft_select (connection_id, filename, requested_access, return_event_name, input_dcb, inout_dcb) Connection_id connection_id; Ft_filename filename; Ft_file_actions requested_access; Local_event_name return_event_name; struct Ft_select_in_dcb *input_dcb; struct Ft_select_out_dcb **inout_dcb; |
Use ft_select() to choose an existing file for file management
or access (e.g., reading attributes, opening a file). You select
a file based only on its filename. Invoke ft_select() in the FTAM regime
to move to the File Selection regime. FTAM uses the exposed parameters filename and contents_type
and does not use the corresponding values stored in input_dcb->attributes. If the file you are selecting has access control,
the following conditions exist. The requested_access parameter must
be a subset of the values stored in action_list field in struct
Ft_access_control_element. FTAM will detect conflicts between the initiator_id
and the identity field of the access_control_element. The HP-UX implementation of FTAM does not use the
file_passwords parameter. Other implementations might.
struct Ft_select_in_dcb { struct Ft_attributes attributes; struct Ft_file_passwords file_passwords; Ft_account account; struct Ft_concurrency_control *concurrency_control; }; |
struct Ft_select_out_dcb { Uint32 size; struct Api_rc result; enum Ft_state_result state_result; enum Ft_action_result action_result; struct Ft_attributes attributes; struct Ft_diagnostic *diagnostic; }; |
ft_open() (LLCS) |  |
#include %</opt/ftam/include/map.h> #include %</opt/ftam/include/mapftam.h> Return_code ft_open (connection_id, processing_mode, contents_type, return_event_name, input_dcb, inout_dcb) Connection_id connection_id; Ft_processing_mode processing_mode; struct Ft_contents_type contents_type; Local_event_name return_event_name; struct Ft_open_in_dcb *input_dcb; struct Ft_open_out_dcb **inout_dcb; |
Use ft_open() after selecting or creating a file to access
operations. Invoke ft_open() in the File Selection
regime to move to the File Open regime. During ft_connect(), you must negotiate the FT_FU_READ
or FT_FU_WRITE functional_units to use ft_open(). The input_dcb->concurrency_control parameters must
be the same or more restrictive than the input_dcb->concurrency_control
parameters set on ft_create() and ft_select(). If the file you are opening has access control,
the following conditions exist: The processing_mode parameter must
be a subset of the values stored in action_list field in the access_control_element
corresponding to the initiator_id used to establish the connection. The HP-UX implementation of FTAM does not use the
file_passwords parameter. Other implementations might.
struct Ft_open_in_dcb { struct Ft_concurrency_control *concurrency_control; }; |
struct Ft_open_out_dcb { Uint32 size; struct Api_rc result; enum Ft_state_result state_result; enum Ft_action_result action_result; struct Ft_contents_type contents_type; struct Ft_concurrency_control *concurrency_control; struct Ft_diagnostic *diagnostic; }; |
ft_close() (LLCS) |  |
#include %</opt/ftam/include/map.h> #include %</opt/ftam/include/mapftam.h> Return_code ft_close (connection_id, return_event_name, input_dcb, inout_dcb) Connection_id connection_id; Local_event_name return_event_name; char *input_dcb; struct Ft_close_out_dcb **inout_dcb; |
Use ft_close() to close a file when you finish processing it. After closing the file,
the only actions you can perform on the file without re-opening
it are ft_deselect(), ft_delete(), ft_rattributes(), and ft_cattributes(). The ft_close() input_dcb parameter
does not contain information; therefore, pass a NULL pointer for
the input_dcb parameter. Invoke ft_close() in the File Open regime to return
to the File Selection regime.
struct Ft_close_out_dcb { Uint32 size; struct Api_rc result; enum Ft_action_result action_result; struct Ft_diagnostic *diagnostic; }; |
ft_delete() (LLCS) |  |
#include %</opt/ftam/include/map.h> #include %</opt/ftam/include/mapftam.h> Return_code ft_delete (connection_id, return_event_name, input_dcb, inout_dcb) Connection_id connection_id; Local_event_name return_event_name; char *input_dcb; struct Ft_delete_out_dcb **inout_dcb; |
Use ft_delete() to remove a file from the filestore. The ft_delete() input_dcb parameter
does not contain information; therefore, pass a NULL pointer for
the input_dcb parameter. Invoke ft_delete() in the File Selection regime
to move back to the FTAM regime after deleting the file. During ft_connect(), you must negotiate the FT_FU_LTD_MGMT
functional_units to use ft_delete(). During ft_select(), ft_create(), and ft_fopen()
you must specify FT_FA_DELETE_FILE in requested_access to use ft_delete().
struct Ft_delete_out_dcb { Uint32 size; struct Api_rc result; enum Ft_action_result action_result; struct Ft_charging *charging; struct Ft_diagnostic *diagnostic; }; |
ft_deselect() |  |
#include %</opt/ftam/include/map.h> #include %</opt/ftam/include/mapftam.h> Return_code ft_deselect (connection_id, return_event_name, input_dcb, inout_dcb) Connection_id connection_id; Local_event_name return_event_name; char *input_dcb; struct Ft_deselect_out_dcb **inout_dcb; |
Use ft_deselect() to deselect a file when you finish processing,
but do not want to remove it. You must re-select the file to perform
further actions on it. The ft_deselect() input_dcb parameter
does not contain information; therefore, pass a NULL pointer for
the input_dcb parameter. Invoke ft_deselect() in the File Selection regime
to move back to the FTAM regime.
struct Ft_deselect_out_dcb { Uint32 size; struct Api_rc result; enum Ft_action_result action_result; struct Ft_charging *charging; struct Ft_diagnostic *diagnostic; }; |
|