Logo Search packages:      
Sourcecode: libical version File versions  Download package

static char * icaltimezone_get_location_from_vtimezone ( icalcomponent *  component  )  [static]

Gets the LOCATION or X-LIC-LOCATION property from a VTIMEZONE.

Definition at line 330 of file icaltimezone.c.

Referenced by icaltimezone_get_vtimezone_properties().

{
    icalproperty *prop;
    const char *location;
    const char *name;

    prop = icalcomponent_get_first_property (component,
                                   ICAL_LOCATION_PROPERTY);
    if (prop) {
      location = icalproperty_get_location (prop);
      if (location)
          return strdup (location);
    }

    prop = icalcomponent_get_first_property (component, ICAL_X_PROPERTY);
    while (prop) {
      name = icalproperty_get_x_name (prop);
      if (name && !strcasecmp (name, "X-LIC-LOCATION")) {
          location = icalproperty_get_x (prop);
          if (location)
            return strdup (location);
      }
      prop = icalcomponent_get_next_property (component,
                                    ICAL_X_PROPERTY);
    }

    return NULL;
}


Generated by  Doxygen 1.6.0   Back to index