Axutil_date_time
[utilities]


Typedefs

typedef axutil_date_time axutil_date_time_t

Enumerations

enum  axutil_date_time_comp_result_t {
  AXIS2_DATE_TIME_COMP_RES_FAILURE = -1, AXIS2_DATE_TIME_COMP_RES_UNKNOWN, AXIS2_DATE_TIME_COMP_RES_EXPIRED, AXIS2_DATE_TIME_COMP_RES_EQUAL,
  AXIS2_DATE_TIME_COMP_RES_NOT_EXPIRED
}

Functions

AXIS2_EXTERN axutil_date_time_t * axutil_date_time_create (const axutil_env_t *env)
AXIS2_EXTERN axutil_date_time_t * axutil_date_time_create_with_offset (const axutil_env_t *env, int offset)
AXIS2_EXTERN void axutil_date_time_free (axutil_date_time_t *date_time, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t axutil_date_time_deserialize_time (axutil_date_time_t *date_time, const axutil_env_t *env, const axis2_char_t *time_str)
AXIS2_EXTERN axis2_status_t axutil_date_time_deserialize_date (axutil_date_time_t *date_time, const axutil_env_t *env, const axis2_char_t *date_str)
AXIS2_EXTERN axis2_status_t axutil_date_time_deserialize_date_time (axutil_date_time_t *date_time, const axutil_env_t *env, const axis2_char_t *date_time_str)
AXIS2_EXTERN axis2_status_t axutil_date_time_set_date_time (axutil_date_time_t *date_time, const axutil_env_t *env, int year, int month, int date, int hour, int min, int second, int milliseconds)
AXIS2_EXTERN axis2_char_t * axutil_date_time_serialize_time (axutil_date_time_t *date_time, const axutil_env_t *env)
AXIS2_EXTERN axis2_char_t * axutil_date_time_serialize_date (axutil_date_time_t *date_time, const axutil_env_t *env)
AXIS2_EXTERN axis2_char_t * axutil_date_time_serialize_date_time (axutil_date_time_t *date_time, const axutil_env_t *env)
AXIS2_EXTERN int axutil_date_time_get_year (axutil_date_time_t *date_time, const axutil_env_t *env)
AXIS2_EXTERN int axutil_date_time_get_month (axutil_date_time_t *date_time, const axutil_env_t *env)
AXIS2_EXTERN int axutil_date_time_get_date (axutil_date_time_t *date_time, const axutil_env_t *env)
AXIS2_EXTERN int axutil_date_time_get_hour (axutil_date_time_t *date_time, const axutil_env_t *env)
AXIS2_EXTERN int axutil_date_time_get_minute (axutil_date_time_t *date_time, const axutil_env_t *env)
AXIS2_EXTERN int axutil_date_time_get_second (axutil_date_time_t *date_time, const axutil_env_t *env)
AXIS2_EXTERN int axutil_date_time_get_msec (axutil_date_time_t *date_time, const axutil_env_t *env)
AXIS2_EXTERN axutil_date_time_comp_result_t axutil_date_time_compare (axutil_date_time_t *date_time, const axutil_env_t *env, axutil_date_time_t *ref)

Function Documentation

AXIS2_EXTERN axutil_date_time_comp_result_t axutil_date_time_compare axutil_date_time_t *  date_time,
const axutil_env_t env,
axutil_date_time_t *  ref
 

Compare the date and time of with the reference If the < this returns NOT_EXPIRED. If the > this returns EXPIRED. If the = this returns EQUAL.

Parameters:
date_time the date time to be compared
env pointer to environment struct. MUST NOT be NULL the reference date time
Returns:
NOT_EXPIRED/EXPIRED/EQUAL if valid otherwise return FAILURE

AXIS2_EXTERN axutil_date_time_t* axutil_date_time_create const axutil_env_t env  ) 
 

Creates axutil_date_time struct with current date time

Parameters:
env double pointer to environment struct. MUST NOT be NULL
Returns:
pointer to newly created axutil_date_time struct

AXIS2_EXTERN axis2_status_t axutil_date_time_deserialize_date axutil_date_time_t *  date_time,
const axutil_env_t env,
const axis2_char_t *  date_str
 

store the date value from plain text.

Parameters:
date_time represet the type object
env pointer to environment struct. MUST NOT be NULL
date date as a string format YYYY-MM-DD
Returns:
AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t axutil_date_time_deserialize_date_time axutil_date_time_t *  date_time,
const axutil_env_t env,
const axis2_char_t *  date_time_str
 

store the date value from plain text.

Parameters:
date_time represet the type object
env pointer to environment struct. MUST NOT be NULL
date_time string format YYYY-MM-DDTHH:MM:SSZ
Returns:
AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t axutil_date_time_deserialize_time axutil_date_time_t *  date_time,
const axutil_env_t env,
const axis2_char_t *  time_str
 

store the time value from plain text.

Parameters:
date_time represet the type object
env pointer to environment struct. MUST NOT be NULL
time time as a string format HH:MM:TTZ
Returns:
AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN void axutil_date_time_free axutil_date_time_t *  date_time,
const axutil_env_t env
 

free the axutil_date_time.

Parameters:
date_time represet the type object
env pointer to environment struct. MUST NOT be NULL
Returns:
AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN int axutil_date_time_get_date axutil_date_time_t *  date_time,
const axutil_env_t env
 

retrieve the date of the date time

Parameters:
date_time represet the type object
env pointer to environment struct. MUST NOT be NULL
Returns:
date as an integer

AXIS2_EXTERN int axutil_date_time_get_hour axutil_date_time_t *  date_time,
const axutil_env_t env
 

retrieve the hour of the date time

Parameters:
date_time represet the type object
env pointer to environment struct. MUST NOT be NULL
Returns:
hour as an integer

AXIS2_EXTERN int axutil_date_time_get_minute axutil_date_time_t *  date_time,
const axutil_env_t env
 

retrieve the minute of the date time

Parameters:
date_time represet the type object
env pointer to environment struct. MUST NOT be NULL
Returns:
minute as an integer

AXIS2_EXTERN int axutil_date_time_get_month axutil_date_time_t *  date_time,
const axutil_env_t env
 

retrieve the month of the date time

Parameters:
date_time represet the type object
env pointer to environment struct. MUST NOT be NULL
Returns:
month as an integer

AXIS2_EXTERN int axutil_date_time_get_second axutil_date_time_t *  date_time,
const axutil_env_t env
 

retrieve the second of the date time

Parameters:
date_time represet the type object
env pointer to environment struct. MUST NOT be NULL
Returns:
second as an integer

AXIS2_EXTERN int axutil_date_time_get_year axutil_date_time_t *  date_time,
const axutil_env_t env
 

retrieve the year of the date time

Parameters:
date_time represet the type object
env pointer to environment struct. MUST NOT be NULL
Returns:
year as an integer

AXIS2_EXTERN axis2_char_t* axutil_date_time_serialize_date axutil_date_time_t *  date_time,
const axutil_env_t env
 

retrive the stored date as a string

Parameters:
date_time represet the type object
env pointer to environment struct. MUST NOT be NULL
Returns:
date as a string format YYYY-MM-DD

AXIS2_EXTERN axis2_char_t* axutil_date_time_serialize_date_time axutil_date_time_t *  date_time,
const axutil_env_t env
 

retrive the stored date time as a string

Parameters:
date_time represet the type object
env pointer to environment struct. MUST NOT be NULL
Returns:
time as a string format YYYY-MM-DDTHH:MM:SSZ

AXIS2_EXTERN axis2_char_t* axutil_date_time_serialize_time axutil_date_time_t *  date_time,
const axutil_env_t env
 

retrive the stored time as a string

Parameters:
date_time represet the type object
env pointer to environment struct. MUST NOT be NULL
Returns:
time as a string format HH:MM:SSZ

AXIS2_EXTERN axis2_status_t axutil_date_time_set_date_time axutil_date_time_t *  date_time,
const axutil_env_t env,
int  year,
int  month,
int  date,
int  hour,
int  min,
int  second,
int  milliseconds
 

store the date value from set of values

Parameters:
date_time represet the type object
env pointer to environment struct. MUST NOT be NULL
year Integer -1 can be used to ignore
month Integer -1 can be used to ignore
date Integer -1 can be used to ignore
hour Integer -1 can be used to ignore
min Integer -1 can be used to ignore
second Integer -1 can be used to ignore
Returns:
AXIS2_SUCCESS on success, else AXIS2_FAILURE


Generated on Thu May 3 12:31:03 2007 for Axis2/C by  doxygen 1.4.6