[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    fn_ctx_get_ref(3N) manual page Table of Contents

Name

fn_ctx_get_ref - return a context’s reference

Synopsis

cc [ flag ... ] file ... -lxfn [ library ... ]


#include <xfn/xfn.h>

FN_ref_t *fn_ctx_get_ref(const FN_ctx_t *ctx, FN_status_t *status);

MT-Level

Safe.

Description

This operation returns a reference to the supplied context object.

Return Value

fn_ctx_get_ref() returns a pointer to an FN_ref_t object if the operation succeeds, it returns 0 if the operation fails.

Errors

fn_ctx_get_ref() sets status as described in FN_status_t(3N) and xfn_status_codes(3N) . The following status code is of particular relevance to this operation:
FN_E_OPERATION_NOT_SUPPORTED
Using the fn_ctx_get_ref() operation on the Initial Context returns this status code.

Application Usage

fn_ctx_get_ref() cannot be used on the Initial Context. fn_ctx_get_ref() can be used on contexts bound in the Initial Context (in other words, the bindings in the Initial Context have references).

If the context handle was created earlier using the fn_ctx_handle_from_ref() operation, the reference returned by the fn_ctx_get_ref() operation may not necessarily be exactly the same in content as that originally supplied. For example, fn_ctx_handle_from_ref() may construct the context handle from one address from the list of addresses. The context implementation may return with a call to fn_ctx_get_ref() only that address, or a more complete list of addresses than what was supplied in fn_ctx_handle_from_ref().

See Also

FN_ctx_t(3N) , FN_ref_t(3N) , FN_status_t(3N) , fn_ctx_handle_from_initial(3N) , fn_ctx_handle_from_ref(3N) , xfn_status_codes(3N) , xfn(3N)


Table of Contents