Main Page | Data Structures | Directories | File List | Data Fields | Globals

ks_fact.c File Reference

libkarmaclient's fact type. More...

#include "ks_config.h"
#include "ks_fact.h"
#include "ks_string.h"
#include "ks_assoc.h"
#include "ks_number.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Functions

const char * ks_fact_identity (ks_fact_t *f)
const char * ks_fact_feed (ks_fact_t *f)
long ks_fact_value (ks_fact_t *f)
const char * ks_fact_data (ks_fact_t *f)


Detailed Description

libkarmaclient's fact type.

Definition in file ks_fact.c.


Function Documentation

const char* ks_fact_data ks_fact_t f  ) 
 

Returns the string data for ks_fact_t (f).

Parameters:
f A pointer to a ks_fact_t.
Returns:
the data associated with the fact, or NULL if it is not set.

Definition at line 115 of file ks_fact.c.

References ks_assoc_get(), KS_CAST, and ks_string_get().

const char* ks_fact_feed ks_fact_t f  ) 
 

Returns the feed name for ks_fact_t (f).

Parameters:
f A pointer to a ks_fact_t.
Returns:
the feed id or NULL if it is not set.

Definition at line 71 of file ks_fact.c.

References ks_assoc_get(), ks_assoc_put(), KS_CAST, ks_number_get(), ks_number_type(), ks_string_get(), ks_string_new(), and _ks_base_t::type.

const char* ks_fact_identity ks_fact_t f  ) 
 

Returns the identity test for ks_fact_t (f).

This may return NULL if the identity information is not available in the current version of the client library or server.

Parameters:
f A pointer to a ks_fact_t.
Returns:
the identity text or NULL if it is not set.

Definition at line 54 of file ks_fact.c.

References ks_assoc_get(), KS_CAST, and ks_string_get().

long ks_fact_value ks_fact_t f  ) 
 

Returns the fact value for ks_fact_t (f).

Parameters:
f A pointer to a ks_fact_t.
Returns:
the value associated with the fact or 0L if it is not set.

Definition at line 98 of file ks_fact.c.

References ks_assoc_get(), KS_CAST, and ks_number_get().


Generated on Tue Aug 7 21:11:31 2007 for libkarmaclient by  doxygen 1.4.4