paraslash Paraslash Audio Streaming
About   News   Download   Documentation   Development

Functions | Enumerations | Variables
attribute.c File Reference

Detailed Description

Attribute handling functions.

Functions

int attr_name_to_bitnum (const char *att_name)
 
 EXPORT_SERVER_CMD_HANDLER (lsatt)
 
int attr_get_defined_mask (uint64_t *result)
 
 EXPORT_SERVER_CMD_HANDLER (addatt)
 
 EXPORT_SERVER_CMD_HANDLER (mvatt)
 
 EXPORT_SERVER_CMD_HANDLER (rmatt)
 
int attr_get_max_bitnum (void)
 
int attr_bitmap_to_text (uint64_t *atts, char **text)
 

Enumerations

enum  attribute_table_columns { ATTCOL_BITNUM, ATTCOL_NAME, NUM_ATT_COLUMNS }
 

Variables

const struct afs_table_operations attr_ops
 

Function Documentation

◆ attr_name_to_bitnum()

int attr_name_to_bitnum ( const char *  att_name)

Retrieve the bit number of the named attribute.

Parameters
att_nameThe name of the attribute.
Returns
The attribute number of success, negative on errors.

Referenced by mp_is_set().

◆ EXPORT_SERVER_CMD_HANDLER() [1/4]

EXPORT_SERVER_CMD_HANDLER ( lsatt  )

◆ attr_get_defined_mask()

int attr_get_defined_mask ( uint64_t *  result)

Compute the mask of all bits which correspond to a defined attribute.

Parameters
resultThe bitmask is returned here.
Returns
Standard.

Referenced by aft_check_callback().

◆ EXPORT_SERVER_CMD_HANDLER() [2/4]

EXPORT_SERVER_CMD_HANDLER ( addatt  )

◆ EXPORT_SERVER_CMD_HANDLER() [3/4]

EXPORT_SERVER_CMD_HANDLER ( mvatt  )

◆ EXPORT_SERVER_CMD_HANDLER() [4/4]

EXPORT_SERVER_CMD_HANDLER ( rmatt  )

◆ attr_get_max_bitnum()

int attr_get_max_bitnum ( void  )

Get the highest bit number that is associated with an attribute.

Returns
On success, a number between 0 and 63 is returned. If no attributes are defined, the function returns -E_NO_ATTRIBUTES.

◆ attr_bitmap_to_text()

int attr_bitmap_to_text ( uint64_t *  atts,
char **  text 
)

Get a string containing the set attributes in text form.

Parameters
attsThe attribute bitmap.
textResult pointer.

If more than one bit is set in the given bitmap, the corresponding attribute names are separated by space characters.

Returns
Negative on errors. On success, a reference to the allocated memory is returned via the text pointer argument. It is no error if no attributes are set. In this case an empty string is allocated.

Enumeration Type Documentation

◆ attribute_table_columns

The columns of the attribute table.

Enumerator
ATTCOL_BITNUM 

The bit number (0-63).

ATTCOL_NAME 

The name of the attribute.

NUM_ATT_COLUMNS 

Number of columns in this table.

Variable Documentation

◆ attr_ops

const struct afs_table_operations attr_ops

The attribute table stores name/bitnum pairs.