Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
icaltypes.h File Reference
#include <time.h>
#include "icalenums.h"
#include "icaltime.h"
#include "icalduration.h"
#include "icalperiod.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  icalgeotype
struct  icaldatetimeperiodtype
struct  icaltriggertype
struct  icalreqstattype
struct  icaltimezonephase
struct  icaltimezonetype

Functions

struct icaltriggertype icaltriggertype_from_int (const int reltime)
struct icaltriggertype icaltriggertype_from_string (const char *str)
int icaltriggertype_is_null_trigger (struct icaltriggertype tr)
int icaltriggertype_is_bad_trigger (struct icaltriggertype tr)
struct icalreqstattype icalreqstattype_from_string (const char *str)
const char * icalreqstattype_as_string (struct icalreqstattype)
void icaltimezonetype_free (struct icaltimezonetype tzt)

Class Documentation

struct icalgeotype

Definition at line 668 of file ical.h.

Class Members
float lat
float lon
struct icaldatetimeperiodtype

Definition at line 675 of file ical.h.

struct icaltriggertype

Definition at line 682 of file ical.h.

struct icalreqstattype

Definition at line 704 of file ical.h.

Class Members
icalrequeststatus code
const char * debug
const char * desc
struct icaltimezonephase

Definition at line 716 of file ical.h.

Collaboration diagram for icaltimezonephase:
Class Members
const char * comment
int is_stdandard
int offsetto
const char * rrule
const char * tzname
int tzoffsetfrom
struct icaltimezonetype

Definition at line 728 of file ical.h.

Collaboration diagram for icaltimezonetype:
Class Members
struct icaltimezonephase * phases
const char * tzid
const char * tzurl

Function Documentation

Definition at line 167 of file icaltypes.c.

{
  char *temp;

  temp = (char*)icalmemory_tmp_buffer(TEMP_MAX);

  icalerror_check_arg_rz((stat.code != ICAL_UNKNOWN_STATUS),"Status");
  
  if (stat.desc == 0){
    stat.desc = icalenum_reqstat_desc(stat.code);
  }
  
  if(stat.debug != 0){
    snprintf(temp,TEMP_MAX,"%d.%d;%s;%s", icalenum_reqstat_major(stat.code),
             icalenum_reqstat_minor(stat.code),
             stat.desc, stat.debug);
    
  } else {
    snprintf(temp,TEMP_MAX,"%d.%d;%s", icalenum_reqstat_major(stat.code),
             icalenum_reqstat_minor(stat.code),
             stat.desc);
  }

  return temp;
}

Here is the call graph for this function:

struct icalreqstattype icalreqstattype_from_string ( const char *  str) [read]

Definition at line 117 of file icaltypes.c.

{
  const char *p1,*p2;
  struct icalreqstattype stat;
  short major=0, minor=0;

  icalerror_check_arg((str != 0),"str");

  stat.code = ICAL_UNKNOWN_STATUS;
  stat.debug = 0; 
   stat.desc = 0;

  /* Get the status numbers */

  sscanf(str, "%hd.%hd",&major, &minor);

  if (major <= 0 || minor < 0){
    icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
    return stat;
  }

  stat.code = icalenum_num_to_reqstat(major, minor);

  if (stat.code == ICAL_UNKNOWN_STATUS){
    icalerror_set_errno(ICAL_MALFORMEDDATA_ERROR);
    return stat;
  }
  

  p1 = strchr(str,';');

  if (p1 == 0){
/*    icalerror_set_errno(ICAL_BADARG_ERROR);*/
    return stat;
  }

  /* Just ignore the second clause; it will be taken from inside the library 
   */



  p2 = strchr(p1+1,';');
  if (p2 != 0 && *p2 != 0){
    stat.debug = p2+1;
  } 

  return stat;
  
}

Here is the call graph for this function:

struct icaltriggertype icaltriggertype_from_int ( const int  reltime) [read]

Definition at line 65 of file icaltypes.c.

{
    struct icaltriggertype tr;

    tr.time   = icaltime_null_time();
    tr.duration = icaldurationtype_from_int(reltime);

    return tr;
}

Here is the call graph for this function:

struct icaltriggertype icaltriggertype_from_string ( const char *  str) [read]

Definition at line 75 of file icaltypes.c.

Here is the call graph for this function:

Definition at line 56 of file icaltypes.c.

{
    if(icaldurationtype_is_bad_duration(tr.duration)){
        return 1;
    }

    return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 46 of file icaltypes.c.

{
    if(icaltime_is_null_time(tr.time) && 
       icaldurationtype_is_null_duration(tr.duration)){
        return 1;
    }

    return 0;
}

Here is the call graph for this function: