Credential attributes
[NetIDMgr Credentials Database]


Detailed Description


Modules

 Attribute flags
 Standard attribute IDs and names

Data Structures

struct  tag_kcdb_attrib
 Credential attribute descriptor. More...

Typedefs

typedef khm_int32(KHMAPI *) kcdb_attrib_compute_cb (khm_handle cred, khm_int32 id, void *buffer, khm_size *cbsize)
 Prototype callback function for computed data types.
typedef tag_kcdb_attrib kcdb_attrib
 Credential attribute descriptor.

Functions

KHMEXP khm_int32 KHMAPI kcdb_attrib_get_id (const wchar_t *name, khm_int32 *id)
 Retrieve the ID of a named attribute.
KHMEXP khm_int32 KHMAPI kcdb_attrib_register (const kcdb_attrib *attrib, khm_int32 *new_id)
 Register an attribute.
KHMEXP khm_int32 KHMAPI kcdb_attrib_get_info (khm_int32 id, kcdb_attrib **attrib)
 Retrieve the attribute descriptor for an attribute.
KHMEXP khm_int32 KHMAPI kcdb_attrib_release_info (kcdb_attrib *attrib)
 Release an attribute descriptor.
KHMEXP khm_int32 KHMAPI kcdb_attrib_unregister (khm_int32 id)
 Unregister an attribute.
KHMEXP khm_int32 KHMAPI kcdb_attrib_describe (khm_int32 id, wchar_t *buffer, khm_size *cbsize, khm_int32 flags)
 Retrieve the description of an attribute.
KHMEXP khm_int32 KHMAPI kcdb_attrib_get_count (khm_int32 and_flags, khm_int32 eq_flags, khm_size *pcount)
 Count attributes.
KHMEXP khm_int32 KHMAPI kcdb_attrib_get_ids (khm_int32 and_flags, khm_int32 eq_flags, khm_int32 *plist, khm_size *pcsize)
 List attribute identifiers.


Typedef Documentation

typedef struct tag_kcdb_attrib kcdb_attrib

Credential attribute descriptor.

See also:
kcdb_attrib_register()

typedef khm_int32(KHMAPI *) kcdb_attrib_compute_cb(khm_handle cred, khm_int32 id, void *buffer, khm_size *cbsize)

Prototype callback function for computed data types.

If the flags for a particular attribute specifies that the value is computed, then a callback function should be specified. The callback function will be called with a handle to a credential along with the attribute ID for the requested attribute. The function should place the computed value in buffer. The size of the buffer in bytes is specifed in cbsize. However, if buffer is NULL, then the required buffer size should be placed in cbsize.


Function Documentation

KHMEXP khm_int32 KHMAPI kcdb_attrib_describe ( khm_int32  id,
wchar_t *  buffer,
khm_size cbsize,
khm_int32  flags 
)

Retrieve the description of an attribute.

Parameters:
[in] flags Specify KCDB_TS_SHORT to retrieve the short description.

KHMEXP khm_int32 KHMAPI kcdb_attrib_get_count ( khm_int32  and_flags,
khm_int32  eq_flags,
khm_size pcount 
)

Count attributes.

Counts the number of attributes that match the given criteria. The criteria is specified against the flags of the attribute. An attribute is a match if its flags satisfy the condition below:

    (attrib.flags & and_flags) == (eq_flags & and_flags)

The number of attributes that match are returned in pcount.

KHMEXP khm_int32 KHMAPI kcdb_attrib_get_ids ( khm_int32  and_flags,
khm_int32  eq_flags,
khm_int32 plist,
khm_size pcsize 
)

List attribute identifiers.

Lists the identifiers of the attributes that match the given criteria. The criteria is specified against the flags of the attribute. An attribute is a match if the following condition is satisfied:

    (attrib.flags & and_flags) == (eq_flags & and_flags)

The list of attributes found are copied to the khm_int32 array specified in plist. The number of elements available in the buffer plist is specified in pcsize. On exit, pcsize will hold the actual number of attribute identifiers copied to the array.

Parameters:
[in] and_flags See above
[in] eq_flags See above
[in] plist A khm_int32 array
[in,out] pcsize On entry, holds the number of elements available in the array pointed to by plist. On exit, holds the number of elements copied to the array.
Return values:
KHM_ERROR_SUCCESS The list of attribute identifiers have been copied.
KHM_ERROR_TOO_LONG The list was too long to fit in the supplied buffer. As many elements as possible have been copied to the plist array and the required number of elements has been written to pcsize.
Note:
The pcsize parameter specifies the number of khm_int32 elements in the array and not the number of bytes in the array. This is different from the usual size parameters used in the NetIDMgr API.

KHMEXP khm_int32 KHMAPI kcdb_attrib_get_info ( khm_int32  id,
kcdb_attrib **  attrib 
)

Retrieve the attribute descriptor for an attribute.

The descriptor that is returned must be released through a call to kcdb_attrib_release_info()

If only the validity of the attribute identifier needs to be checked, you can pass in NULL for attrib. In this case, if the identifier is valid, then the funciton will return KHM_ERROR_SUCCESS, otherwise it will return KHM_ERROR_NOT_FOUND.

See also:
kcdb_attrib_release_info()

KHMEXP khm_int32 KHMAPI kcdb_attrib_register ( const kcdb_attrib attrib,
khm_int32 new_id 
)

Register an attribute.

Parameters:
[out] new_id Receives the ID of the newly registered attribute. If the id member of the kcdb_attrib object is set to KCDB_ATTR_INVALID, then a unique ID is generated.

KHMEXP khm_int32 KHMAPI kcdb_attrib_release_info ( kcdb_attrib attrib  ) 

Release an attribute descriptor.

See also:
kcdb_attrib_get_info()

KHMEXP khm_int32 KHMAPI kcdb_attrib_unregister ( khm_int32  id  ) 

Unregister an attribute.

Once an attribute ID has been unregistered, it may be reclaimed by a subsequent call to kcdb_attrib_register().


Generated on Fri Aug 3 08:27:14 2007 for Network Identity Manager by Doxygen 1.5.2
© 2004-2007 Massachusetts Institute of Technology.
© 2005-2007 Secure Endpoints Inc.
Contact khimaira@mit.edu