If a plug-in needs to obtain the UI context, it should do so by calling khui_context_get() and passing in a pointer to a khui_action_context structure.
Once obtained, the contents of the khui_action_context structure should be considered read-only. When the plug-in is done with the structure, it should call khui_context_release(). This cleans up any additional memory allocated for storing the context as well as releasing all the objects that were referenced from the context.
Depending on the scope, several other members of the strucre may also be set.
In general, the cursor context can be a single credential or an entire outline level. Unlike the selection context, since this specifies a single point of selection it can not be disjointed.
The contents of the identity, cred_type, cred, headers and n_headers are described in the documentation of each of the scope values above.
In this case, the selection is described by an array of khui_header elements each of which specify a criterion for narrowing down the selection of credentials. The khui_header structure specifies an attribute in the attr_id field and a value in the data and cb_data fields. The credentials that are selected are those in the root credential set whose repective attributes contain the values specified in each of the khui_header elements.
For example, the following selection:
will result in the following header specification:
ctx.n_headers = 3; ctx.headers.attr_id = KCDB_ATTR_LOCATION; ctx.headers.data = L"grailauth@KHMTEST"; ctx.headers.cb_data = sizeof(L"grailauth@KHMTEST"); ctx.headers.attr_id = KCDB_ATTR_ID; ctx.headers.data = &handle_to_identity; ctx.headers.cb_data = sizeof(khm_handle); ctx.headers.attr_id = KCDB_ATTR_TYPE; ctx.headers.data = &kerberos_5_credtype; ctx.headers.cb_data = sizeof(khm_int32);
Generated on Fri Aug 3 08:27:13 2007 for Network Identity Manager by Doxygen 1.5.2
© 2004-2007 Massachusetts Institute of Technology.
© 2005-2007 Secure Endpoints Inc.