rpc_ns_import_ctx_add_eval- adds an evaluation routine to an import context
void rpc_ns_import_ctx_add_eval( rpc_ns_handle_t *import_context, unsigned32 function_type, rpc_ns_handle_t *eval_args, void *eval_func, void *free_func, error_status_t *status);
- The name service handle obtained from the rpc_ns_binding_import_begin() routine.
- The type of evaluation function. This value must be rpc_cs_code_eval_func.
- An opaque data type that passes data used by the evaluation routine. Client applications adding a code sets evaluation routine (such as rpc_cs_eval_with_universal() or rpc_cs_eval_without_universal()) specify the server's NSI entry name in this argument.
- A function pointer to the evaluation routine to be called by the rpc_ns_binding_import_next() routine. The void declaration for eval_func means that the function does not return a value. Client applications adding a code sets evaluation routine (such as rpc_cs_eval_with_universal() or rpc_cs_eval_without_universal()) specify the routine name in this argument.
- A function pointer to a routine that is invoked by rpc_ns_binding_import_done() and which performs application-specific cleanup. Client applications adding a code sets evaluation routine (such as rpc_cs_eval_with_universal() or rpc_cs_eval_without_universal()) specify NULL in this argument.
- Specifies the name service handle which contains the following routines:
- Returns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not.
Possible status codes and their meanings include:
The routine was unable to allocate memory to encode the value.
Invalid name service handle (the import_context argument was not valid).
The rpc_ns_import_ctx_add_eval() routine adds an evaluation routine to an import context created by the rpc_ns_binding_import_begin() routine. The evaluation routine adds additional criteria to those used by rpc_ns_binding_import_next() (that is, protocol and interface information) in selecting compatible server binding handles for import. If there are multiple evaluation routines to be added to an import context, client applications call the rpc_ns_import_ctx_add_eval() routine once for each routine to be added.
If the specified evaluation routine needs to perform special cleanup functions, such as deleting a temporary file from a disk, the free_func argument can be used to specify the cleanup routine to be called from rpc_ns_binding_import_done().
The rpc_ns_import_ctx_add_eval() routine is useful in character and code set interoperability, which permits clients and servers to transfer international character data in a heterogeneous character set and code sets environment, because it can add one or more character and code sets evaluation routines to an import context, assuring character and code set compatibility between client and server.
The code set evaluation routine specified can be one of the existing routines, rpc_cs_eval_with_universal() or rpc_cs_eval_without_universal(), or a user-supplied routine.
- Client applications that add evaluation routines to server binding import context cannot use the automatic binding method to bind to a server.
Please note that the html version of this specification may contain formatting aberrations. The definitive version is available as an electronic publication on CD-ROM from The Open Group.