File modules/at/attributes.c

  $Revision: 1.7 $

Attributes module (at) - this _should_ eventually get merged in with the config module.
Status: NOT REVUED, NOT TESTED

Included Files


Preprocessor definitions

String sizes

#define STR_S 63

#define STR_M 255

#define STR_L 1023

#define STR_XL 4095

#define STR_XXL 16383


Global Variable Attributes

Attributes (short name & long name)

char* const Attributes[]
Visible in:  modules/at/attributes.c
Used in: AT_attributes_to_string()modules/at/attributes.c
  AT_get_attribute()modules/at/attributes.c
  AT_get_attributes()modules/at/attributes.c


Global Variable Attributes_details

Attribute Details - Ie descriptions

const char* Attributes_details[][2]
Visible in:  modules/at/attributes.c
Used in: AT_get_attribute_desc()modules/at/attributes.c
  AT_get_attribute_frmt()modules/at/attributes.c


Global Variable Sources

Source database mirrors

char* const Sources[]
Visible in:  modules/at/attributes.c
Used in: AT_get_source()modules/at/attributes.c
  AT_get_sources()modules/at/attributes.c
  AT_sources_to_string()modules/at/attributes.c


Global Function AT_attributes_to_string()

  Returns a string of all the attributes.  Only there for debugging and tracing purposes.

More:
  Authors:
        ottrey

Online References:
char* AT_attributes_to_string ( int offset )
int offset
The offset (Ie short or long name).
Prototyped in: modules/at/attributes.h
Calls: calloc(), strcat(), strcpy(), strlen()
References Variables: Attributesmodules/at/attributes.c

Global Function AT_get_attribute()

  Returns the indexed attribute.  Used when validating query options.

More:
  Authors:
        ottrey

Online References:
const char* AT_get_attribute ( AT_Type attr_index, int offset )
AT_Type attr_index
The index into the Attributes[] array.
int offset
The offset (Ie short or long name).
Prototyped in: modules/at/attributes.h
References Variables: Attributesmodules/at/attributes.c

Global Function AT_get_attribute_desc()

  Returns the attribute description.  Used for -t & -v queries.

More:
  Authors:
        ottrey

Online References:
const char* AT_get_attribute_desc ( AT_Type attr_index )
AT_Type attr_index
The index into the Attributes[] array.
Prototyped in: modules/at/attributes.h
References Variables: Attributes_detailsmodules/at/attributes.c

Global Function AT_get_attribute_frmt()

  Returns the attribute format.  Used for -t & -v queries.

More:
  Authors:
        ottrey

Online References:
const char* AT_get_attribute_frmt ( AT_Type attr_index )
AT_Type attr_index
The index into the Attributes[] array.
Prototyped in: modules/at/attributes.h
References Variables: Attributes_detailsmodules/at/attributes.c

Global Function AT_get_attributes()

  Returns the attributes as a list of strings.

More:
  Authors:
        ottrey

Online References:
char* const* AT_get_attributes ( void )
Prototyped in: modules/at/attributes.h
References Variables: Attributesmodules/at/attributes.c

Global Function AT_get_source()

  Returns the indexed source.

More:
  Authors:
        ottrey

Online References:
const char* AT_get_source ( int index )
int index
The index of the source in the Sources list.
Prototyped in: modules/at/attributes.h
References Variables: Sourcesmodules/at/attributes.c

Global Function AT_get_sources()

  Returns the sources as a list of strings.  Used when validating query options.

More:
  Authors:
        ottrey

Online References:
char* const* AT_get_sources ( void )
Prototyped in: modules/at/attributes.h
References Variables: Sourcesmodules/at/attributes.c

Global Function AT_sources_list_to_string()

  Creates a string from the sources in the GList.

More:
  Authors:
        ottrey

Online References:
char* AT_sources_list_to_string ( GList* sources_list )
GList* sources_list
The GList of sources.
Prototyped in: modules/at/attributes.h
Calls: calloc(), g_list_foreach(), strcpy(), strlen()
References Functions: source_foreach()modules/at/attributes.c

Global Function AT_sources_to_string()

  Creates a string from Sources.

More:
  Authors:
        ottrey

Online References:
char* AT_sources_to_string ( void )
char* AT_sources_to_string
Returns a string of the Sources.
Prototyped in: modules/at/attributes.h
Calls: calloc(), strcat(), strcpy(), strlen()
References Variables: Sourcesmodules/at/attributes.c

Local Function source_foreach()

  Function to adds the source string to the created string from the Glist of sources.
  It is called via g_list_foreach().

More:
  Authors:
        ottrey

Online References:
static void source_foreach ( void* element_data, void* result_buf_ptr )
void* element_data
The source name.
void* result_buf_ptr
The string to be populated.
Calls: strcat()
Used in: AT_sources_list_to_string()modules/at/attributes.c