PreviousNext

rpc_ns_profile_elt_inq_next(3rpc)

Returns one element at a time from a profile

Used by client, server, or management applications.

Synopsis

#include <dce/rpc.h>

void rpc_ns_profile_elt_inq_next(

rpc_ns_handle_t inquiry_context,

rpc_if_id_t *if_id,

unsigned_char_t **member_name,

unsigned32 *priority,

unsigned_char_t **annotation,

unsigned32 *status);

Parameters

Input

inquiry_context
Specifies a name service handle. This handle is returned from the rpc_ns_profile_elt_inq_begin( ) routine.

Output

if_id
Returns the interface identifier of the profile element.

member_name
Returns a pointer to the profile element's member name. The name is a global name.

The syntax of the returned name is specified by the member_name_syntax parameter in rpc_ns_profile_elt_inq_begin( ).

Specify NULL to prevent the routine from returning this parameter. In this case the application does not call rpc_string_free( ).

priority
Returns the profile element priority.

annotation
Returns the annotation string for the profile element. If there is no annotation string in the profile element, the string 0 is returned.

Specify NULL to prevent the routine from returning this parameter. In this case the application does not need to call the rpc_string_free( ) routine.

status
Returns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not.

Description
The rpc_ns_profile_elt_inq_next( ) routine returns one element from the profile specified by the profile_name parameter in the rpc_ns_profile_elt_inq_begin(~) routine.

The selection criteria for the element returned are based on the inquiry_type parameter in the rpc_ns_profile_elt_inq_begin( ) routine. The rpc_ns_profile_elt_inq_next( ) routine returns all the components (interface identifier, member name, priority, annotation string) of a profile element.

An application can view all the selected profile entries by repeatedly calling the rpc_ns_profile_elt_inq_next( ) routine. When all the elements have been viewed, this routine returns an rpc_s_no_more_elements status code. The returned elements are unordered.

On each call to this routine that returns a profile element, the DCE RPC runtime allocates memory for the returned member_name (which points to a global name) and annotation strings. The application is responsible for calling the rpc_string_free( ) routine for each returned member_name and annotation string.

After viewing the profile's elements, the application must call the rpc_ns_profile_elt_inq_done( ) routine to delete the inquiry context.

Permissions Required
You need read permission to the CDS object entry (the target profile entry).

Return Values
No value is returned.

Errors

The following describes a partial list of errors that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.

rpc_s_ok
Success.

rpc_s_class_version_mismatch
RPC class version mismatch.

rpc_s_entry_not_found
Name service entry not found.

rpc_s_incomplete_name
Incomplete name.

rpc_s_invalid_ns_handle
Invalid name service handle.

rpc_s_name_service_unavailable
Name service unavailable.

rpc_s_no_more_elements
No more elements.

rpc_s_no_ns_permission
No permission for name service operation.

rpc_s_not_rpc_entry
Not an RPC entry.

Related Information
Functions: rpc_ns_profile_elt_inq_begin(3rpc)

rpc_ns_profile_elt_inq_done(3rpc)

rpc_string_free(3rpc)