зеркало из https://github.com/mozilla/pjs.git
Adding in files for second import of libical.
This commit is contained in:
Родитель
20804d889d
Коммит
4c4370b7f8
|
@ -0,0 +1,386 @@
|
|||
#!/usr/bin/perl
|
||||
# -*- Mode: perl -*-
|
||||
#======================================================================
|
||||
# FILE: Libical.pm
|
||||
# CREATOR: eric
|
||||
#
|
||||
# DESCRIPTION:
|
||||
#
|
||||
#
|
||||
# $Id: Libical.pm,v 1.1 2001-12-21 19:21:16 mikep%oeone.com Exp $
|
||||
# $Locker: $
|
||||
#
|
||||
# (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
#
|
||||
# This package is free software and is provided "as is" without express
|
||||
# or implied warranty. It may be used, redistributed and/or modified
|
||||
# under the same terms as perl itself. ( Either the Artistic License or the
|
||||
# GPL. )
|
||||
#
|
||||
#======================================================================
|
||||
|
||||
# This part of this file was automatically generated by SWIG
|
||||
|
||||
require Net::ICal::Libical::Component;
|
||||
require Net::ICal::Libical::Property;
|
||||
require Net::ICal::Libical::Time;
|
||||
require Net::ICal::Libical::Duration;
|
||||
|
||||
package Net::ICal::Libical;
|
||||
require Exporter;
|
||||
require DynaLoader;
|
||||
@ISA = qw(Exporter DynaLoader);
|
||||
package Net::ICal::Libical;
|
||||
bootstrap Net::ICal::Libical;
|
||||
var_Net__ICal__Libical_init();
|
||||
@EXPORT = qw( );
|
||||
|
||||
$VERSION = "0.01";
|
||||
|
||||
1;
|
||||
|
||||
|
||||
|
||||
|
||||
sub validate_component {
|
||||
my $comp_str = shift;
|
||||
|
||||
|
||||
my $c = Net::ICal::Libical::icalparser_parse_string($comp_str);
|
||||
my $out;
|
||||
|
||||
die "Failed to parse component" if !$c;
|
||||
|
||||
my $r = Net::ICal::Libical::icalrestriction_check($c);
|
||||
|
||||
$out = Net::ICal::Libical::icalcomponent_as_ical_string($c);
|
||||
|
||||
Net::ICal::Libical::icalcomponent_free($c);
|
||||
|
||||
return $out;
|
||||
|
||||
}
|
||||
|
||||
|
||||
sub generate_occurrences {
|
||||
my $rule = shift;
|
||||
my $start = shift;
|
||||
my $count = shift;
|
||||
|
||||
my @out;
|
||||
|
||||
my $array = Net::ICal::Libical::icallangbind_new_array(25);
|
||||
|
||||
Net::ICal::Libical::icalrecur_expand_recurrence($rule,$start,
|
||||
$count,$array);
|
||||
|
||||
for($i = 0; $i<$count; $i++){
|
||||
my $t = Net::ICal::Libical::icallangbind_access_array($array,$i);
|
||||
if($t != 0) {
|
||||
push(@out,$t);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Net::ICal::Libical::icallangbind_free_array($array);
|
||||
|
||||
return @out;
|
||||
}
|
||||
|
||||
|
||||
# The remaining code is just the interface declarations for a complete
|
||||
# perl binding to libical. Currently, it is looking for an author....
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
|
||||
#""" Represent iCalendar DATE, TIME and DATE-TIME ""
|
||||
|
||||
package Net::ICal::Libical::Time;
|
||||
@ISA = (Property);
|
||||
|
||||
sub new {}
|
||||
|
||||
#"""Updates value and value_type based on the (internal) self.tt."""
|
||||
sub _update_value { }
|
||||
|
||||
# " Return true if this is a valid time "
|
||||
sub valid { }
|
||||
|
||||
# """ Return or set time in seconds past POSIX epoch"""
|
||||
sub utc_seconds {}
|
||||
|
||||
# """ Return or set boolean indicating if time is in UTC """
|
||||
sub is_utc {}
|
||||
|
||||
# Get/Set booll indicating is time is a date
|
||||
sub is_date(self,v=None):
|
||||
|
||||
#"" Return or set the timezone string for this time """
|
||||
sub timezone {}
|
||||
|
||||
#"" Get or set the seconds component of this time """
|
||||
sub second {}
|
||||
sub minute {}
|
||||
sub hour {}
|
||||
sub day {}
|
||||
sub month {}
|
||||
sub year {}
|
||||
|
||||
# How dow you over load +,- in perl?
|
||||
|
||||
# Add duration to time = time
|
||||
sub __add__{}
|
||||
|
||||
# Subtract time from time = duration
|
||||
# Subtract duration from time = time
|
||||
sub __sub__(self,o):
|
||||
|
||||
|
||||
package Net::ICal::Libical::Duration(Property):
|
||||
@ISA = (Property);
|
||||
|
||||
sub new {}
|
||||
sub _update_value {}
|
||||
#"Return true if this is a valid duration"
|
||||
sub valid {}
|
||||
# """Return or set duration in seconds"""
|
||||
sub seconds {}
|
||||
|
||||
|
||||
#"""Represent a span of time"""
|
||||
|
||||
package Net::ICal::Libical::Period;
|
||||
@ISA = (Property);
|
||||
|
||||
sub new{}
|
||||
|
||||
sub _end_is_duration {}
|
||||
sub _end_is_time {}
|
||||
sub _update_value {}
|
||||
|
||||
#"Return true if this is a valid period"
|
||||
sub valid {}
|
||||
|
||||
#Return or set start time of the period. The start time may be
|
||||
#expressed as an RFC2445 format string or an instance of Time.
|
||||
#The return value is an instance of Time
|
||||
sub start {}
|
||||
|
||||
#Return or set end time of the period. The end time may be
|
||||
#expressed as an RFC2445 format string or an instance of Time.
|
||||
#The return value is an instance of Time.
|
||||
|
||||
#If the Period has a duration set, but not an end time, this
|
||||
#method will caluculate the end time from the duration.
|
||||
sub end {}
|
||||
|
||||
#Return or set the duration of the period. The duration may be
|
||||
#expressed as an RFC2445 format string or an instance of Duration.
|
||||
#The return value is an instance of Duration.
|
||||
#If the period has an end time set, but not a duration, this
|
||||
#method will calculate the duration from the end time.
|
||||
sub duration{}
|
||||
|
||||
# Get set the timezone for the period. Basically returns self->dict{TZID}
|
||||
sub timezone(self,v=None):
|
||||
|
||||
|
||||
# Represents the value and all parameters of an attendee
|
||||
package Net::ICal::Libical::Attendee(Property):
|
||||
@ISA = (Property);
|
||||
|
||||
sub new{}
|
||||
|
||||
# Methods for accessing enumerated parameters
|
||||
sub cn {}
|
||||
sub cutype {}
|
||||
sub dir {}
|
||||
sub delegated_from {}
|
||||
sub delegated_to {}
|
||||
sub language {}
|
||||
sub member {}
|
||||
sub partstat {}
|
||||
sub role {}
|
||||
sub rsvp {}
|
||||
sub sent_by {}
|
||||
|
||||
|
||||
package Net::ICal::Libical::Organizer;
|
||||
@ISA = (Property)
|
||||
# Methods for accessing enumerated parameters
|
||||
sub cn{}
|
||||
sub dir{}
|
||||
sub language {}
|
||||
sub sent_by {}
|
||||
|
||||
package Net::ICal::Libical::Recurrence_Id;
|
||||
@ISA= (Property)
|
||||
|
||||
package Net::ICal::Libical::Attach;
|
||||
@ISA= (Property)
|
||||
|
||||
package Net::ICal::Libical::Event;
|
||||
@ISA= (Component)
|
||||
|
||||
sub component_type {}
|
||||
|
||||
#"Returns a copy of the object."
|
||||
sub clone {}
|
||||
|
||||
#Sets or returns the value of the DTEND property.
|
||||
#Usage:
|
||||
#dtend(time_obj) # Set the value using a Time object
|
||||
#dtend('19970101T123000Z') # Set the value as an iCalendar string
|
||||
#dtend(982362522) # Set the value using seconds (time_t)
|
||||
#dtend() # Return a Time
|
||||
#
|
||||
#If the dtend value is being set and duration() has a value, the
|
||||
#duration property will be removed.
|
||||
sub dtend{}
|
||||
|
||||
#Sets or returns the value of the duration property.
|
||||
#Usage:
|
||||
#duration(dur_obj) # Set the value using a Duration object
|
||||
#duration("P3DT12H") # Set value as an iCalendar string
|
||||
#duration(3600) # Set duration using seconds
|
||||
#duration() # Return a duration
|
||||
#
|
||||
#If the duration value is being set and dtend() has a value, the dtend
|
||||
#property will be removed.
|
||||
sub duration{}
|
||||
|
||||
#Sets attendees or returns a list of Attendee objects.
|
||||
sub attendees {}
|
||||
|
||||
#Sets or gets the value of the ORGANIZER property.
|
||||
#Usage:
|
||||
#organizer(orgObj) # Set value using an organizer object
|
||||
#organizer('MAILTO:jd@not.com') # Set value using a CAL-ADDRESS string
|
||||
#organizer() # Return a CAL-ADDRESS string
|
||||
sub organizer{}
|
||||
|
||||
#"Sets or gets the SUMMARY value of the Event."
|
||||
sub summary{}
|
||||
|
||||
#Sets or gets the UID of the Event.
|
||||
sub uid{}
|
||||
|
||||
#Sets or gets the value for the RECURRENCE-ID property.
|
||||
#Usage:
|
||||
#Recurrence_id(recIdObj) # Set using a Recurrence_Id object
|
||||
#Recurrence_id("19700801T133000") # Set using an iCalendar string
|
||||
#Recurrence_id(8349873494) # Set using seconds from epoch
|
||||
#Recurrence_id() # Return a Time
|
||||
sub recurrence_id{}
|
||||
|
||||
#Sets or gets the SEQUENCE value of the Event.
|
||||
#Usage:
|
||||
#sequence(1) # Set the value using an integer
|
||||
#sequence('2') # Set the value using a string containing an integer
|
||||
#sequence() # Return an integer
|
||||
sub sequence{}
|
||||
|
||||
#Sets or returns the value of the LAST-MODIFIED property.
|
||||
#Usage:
|
||||
#lastmodified(time_obj) # Set the value using a Time object
|
||||
#lastmodified('19970101T123000Z')# Set using an iCalendar string
|
||||
#lastmodified(982362522) # Set using seconds
|
||||
#lastmodified() # Return a Time
|
||||
sub lastmodified{}
|
||||
|
||||
|
||||
|
||||
#Sets or returns the value of the CREATED property.
|
||||
#Usage:
|
||||
#created(time_obj) # Set the value using a Time object
|
||||
#created('19970101T123000Z') # Set using an iCalendar string
|
||||
#created(982362522) # Set using seconds
|
||||
#created() # Return a Time
|
||||
sub created {}
|
||||
|
||||
|
||||
sub related_to{}
|
||||
sub comment{}
|
||||
|
||||
"Sets or returns the value of the DESCRIPTION property."
|
||||
|
||||
sub description {}
|
||||
|
||||
#Sets categories or returns a list of Attendee objects.
|
||||
sub categories {}
|
||||
|
||||
sub attach{}
|
||||
|
||||
#Represents a set of event occurrences. This
|
||||
#package controls a component's RRULE, EXRULE, RDATE and EXDATE
|
||||
#properties and can produce from them a set of occurrences.
|
||||
package Net::ICal::Libical::RecurrenceSet:
|
||||
|
||||
|
||||
#Include a date or rule to the set.
|
||||
#Use date= or pass in a
|
||||
#Time instance to include a date. Included dates will add an
|
||||
#RDATE property or will remove an EXDATE property of the same
|
||||
#date.
|
||||
#Use rule= or pass in a string to include a rule. Included
|
||||
#rules with either add a RRULE property or remove an EXRULE
|
||||
#property.
|
||||
|
||||
sub include{}
|
||||
|
||||
#Exclude date or rule to the set.
|
||||
#Use date= or pass in a Time instance to exclude a
|
||||
#date. Excluded dates will add an EXDATE property or will remove
|
||||
#an RDATE property of the same date.
|
||||
#Use rule= or pass in a string to exclude a rule. Excluded
|
||||
#rules with either add an EXRULE property or remove an RRULE
|
||||
#property.
|
||||
sub exclude{}
|
||||
|
||||
#Return 'count' occurrences as a tuple of Time instances.
|
||||
sub occurrences{}
|
||||
|
||||
package Net::ICal::Libical::Store;
|
||||
sub new{}
|
||||
sub path{}
|
||||
sub mark{}
|
||||
sub commit{}
|
||||
sub addComponent{}
|
||||
sub removeComponent{}
|
||||
sub countComponents{}
|
||||
sub select{}
|
||||
sub clearSelect{}
|
||||
sub fetch{}
|
||||
sub fetchMatchK{}
|
||||
sub modify{}
|
||||
sub currentComponent{}
|
||||
sub firstComponent{}
|
||||
sub nextComponent{}
|
||||
|
||||
|
||||
package Net::ICal::Libical::FileStore;
|
||||
@ISA = (Store)
|
||||
sub new{}
|
||||
sub path{}
|
||||
sub mark{}
|
||||
sub commit{}
|
||||
sub addComponent{}
|
||||
sub removeComponent{}
|
||||
sub countComponents{}
|
||||
sub select{}
|
||||
sub clearSelect{}
|
||||
sub fetch{}
|
||||
sub fetchMatchK{}
|
||||
sub modify{}
|
||||
sub currentComponent{}
|
||||
sub firstComponent{}
|
||||
sub nextComponent{}
|
||||
|
||||
|
||||
1;
|
|
@ -0,0 +1,175 @@
|
|||
#!/usr/bin/perl
|
||||
# -*- Mode: perl -*-
|
||||
#======================================================================
|
||||
# FILE: Component.pm
|
||||
# CREATOR: eric 1 Mar 01
|
||||
#
|
||||
# DESCRIPTION:
|
||||
#
|
||||
#
|
||||
# $Id: Component.pm,v 1.1 2001-12-21 19:21:18 mikep%oeone.com Exp $
|
||||
# $Locker: $
|
||||
#
|
||||
# (C) COPYRIGHT 2000, Eric Busboom, eric@softwarestudio.org
|
||||
#
|
||||
# This package is free software and is provided "as is" without express
|
||||
# or implied warranty. It may be used, redistributed and/or modified
|
||||
# under the same terms as perl itself. ( Either the Artistic License or the
|
||||
# GPL. )
|
||||
#
|
||||
#
|
||||
#======================================================================
|
||||
|
||||
|
||||
|
||||
package Net::ICal::Libical::Component;
|
||||
use Net::ICal::Libical;
|
||||
|
||||
use strict;
|
||||
|
||||
sub new{
|
||||
my $class = shift;
|
||||
my $ical_str = shift; # Ical data in string form
|
||||
my $self = {};
|
||||
|
||||
$self->{'comp_p'} = Net::ICal::Libical::icalparser_parse_string($ical_str);
|
||||
|
||||
die "Can't parse string into component" if !$self->{'comp_p'};
|
||||
|
||||
bless $self, $class;
|
||||
}
|
||||
|
||||
sub new_from_ref {
|
||||
my $class = shift;
|
||||
my $r = shift;
|
||||
my $self = {};
|
||||
|
||||
$self->{'comp_p'} = $r;
|
||||
|
||||
bless $self, $class;
|
||||
}
|
||||
|
||||
# Destroy must call icalcomponent_free() if icalcomponent_get_parent()
|
||||
# returns NULL
|
||||
sub DESTROY {
|
||||
my $self = shift;
|
||||
|
||||
my $c = $self->{'comp_p'};
|
||||
|
||||
if($c && !Net::ICal::Libical::icalcomponent_get_parent($c)){
|
||||
Net::ICal::Libical::icalcomponent_free($c);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# Return an array of all properties of the given type
|
||||
sub properties{
|
||||
|
||||
my $self = shift;
|
||||
my $prop_name = shift;
|
||||
|
||||
my @props;
|
||||
|
||||
if(!$prop_name){
|
||||
$prop_name = 'ANY';
|
||||
}
|
||||
|
||||
# To loop over properties
|
||||
# $comp_p = $self->{'comp_p'}
|
||||
# $p = icallangbind_get_first_property($comp_p,$prop_name)
|
||||
# $p = icallangbind_get_next_property($comp_p,$prop_name)
|
||||
|
||||
my $c = $self->{'comp_p'};
|
||||
my $p;
|
||||
|
||||
for($p = Net::ICal::Libical::icallangbind_get_first_property($c,$prop_name);
|
||||
$p;
|
||||
$p = Net::ICal::Libical::icallangbind_get_next_property($c,$prop_name)){
|
||||
|
||||
my $d_string = Net::ICal::Libical::icallangbind_property_eval_string($p,"=>");
|
||||
my %dict = %{eval($d_string)};
|
||||
|
||||
$dict{'ref'} = $p;
|
||||
|
||||
# Now, look at $dict{'value_type'} or $dict{'name'} to construct a
|
||||
# derived class of Property. I'll do this later.
|
||||
|
||||
my $prop;
|
||||
|
||||
if($dict{'value_type'} eq 'DATE' or $dict{'value_type'} eq 'DATE-TIME'){
|
||||
$prop = new Net::ICal::Libical::Time(\%dict);
|
||||
} elsif($dict{'value_type'} eq 'DURATION' ) {
|
||||
$prop = new Net::ICal::Libical::Duration(\%dict);
|
||||
} else {
|
||||
$prop = new Net::ICal::Libical::Property(\%dict);
|
||||
}
|
||||
|
||||
push(@props,$prop);
|
||||
|
||||
}
|
||||
|
||||
|
||||
return @props;
|
||||
|
||||
}
|
||||
|
||||
|
||||
sub add_property {
|
||||
|
||||
# if there is a 'ref' key in the prop's dict, then it is owned by
|
||||
# an icalcomponent, so dont add it again. But, you may check that
|
||||
# it is owned by this component with:
|
||||
# icalproperty_get_parent(p->{'ref'}') != $self->{'comp_p'}
|
||||
|
||||
# If there is no 'ref' key, then create one with $p->{'ref'} =
|
||||
# icalproperty_new_from_string($p->as_ical_string)
|
||||
|
||||
}
|
||||
|
||||
sub remove_property {
|
||||
|
||||
# If $p->{'ref'} is set, then remove the property with
|
||||
# icalcomponent_remove_property() }
|
||||
}
|
||||
|
||||
# Return an array of all components of the given type
|
||||
sub components {
|
||||
|
||||
my $self = shift;
|
||||
my $comp_name = shift;
|
||||
|
||||
my @comps;
|
||||
|
||||
if(!$comp_name){
|
||||
$comp_name = 'ANY';
|
||||
}
|
||||
|
||||
my $c = $self->{'comp_p'};
|
||||
my $p;
|
||||
|
||||
for($p = Net::ICal::Libical::icallangbind_get_first_component($c,$comp_name);
|
||||
$p;
|
||||
$p = Net::ICal::Libical::icallangbind_get_next_component($c,$comp_name)){
|
||||
|
||||
push(@comps, Net::ICal::Libical::Component->new_from_ref($p));
|
||||
|
||||
}
|
||||
|
||||
return @comps;
|
||||
|
||||
}
|
||||
|
||||
|
||||
sub add_component {}
|
||||
|
||||
sub remove_component {}
|
||||
|
||||
sub as_ical_string {
|
||||
my $self = shift;
|
||||
|
||||
return Net::ICal::Libical::icalcomponent_as_ical_string($self->{'comp_p'})
|
||||
}
|
||||
|
||||
|
||||
|
||||
1;
|
|
@ -0,0 +1,359 @@
|
|||
#!/usr/bin/perl -w
|
||||
# -*- Mode: perl -*-
|
||||
#======================================================================
|
||||
#
|
||||
# This package is free software and is provided "as is" without express
|
||||
# or implied warranty. It may be used, redistributed and/or modified
|
||||
# under the same terms as perl itself. ( Either the Artistic License or the
|
||||
# GPL. )
|
||||
#
|
||||
# $Id: Period.pm,v 1.1 2001-12-21 19:21:20 mikep%oeone.com Exp $
|
||||
#
|
||||
# (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
#
|
||||
# $Log
|
||||
#======================================================================
|
||||
|
||||
|
||||
=pod
|
||||
=head1 NAME
|
||||
|
||||
Net::ICal::Period -- represent a period of time
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use Net::ICal;
|
||||
$p = new Net::ICal::Period("19970101T120000","19970101T123000");
|
||||
$p = new Net::ICal::Period("19970101T120000","PT3W2D40S");
|
||||
$p = new Net::ICal::Period(time(),3600);
|
||||
$p = new Net::ICal::Period(
|
||||
new Net::ICal::Time("19970101T120000",
|
||||
"America/Los_Angeles"),
|
||||
new Net::ICal::Duration("2h"));
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Use this to make an object representing a block of time on a
|
||||
real schedule. You can either say, "This event starts at 12
|
||||
and ends at 2" or "This event starts at 12 and lasts 2 hours."
|
||||
|
||||
These two ways of specifying events can be treated differently
|
||||
in schedules. If you say, "The meeting is from 12 to 2, but I
|
||||
have to leave at 2," you are implying that the start date and
|
||||
end date are fixed. If you say, "I have a 2-hour drive to
|
||||
Chicago, and I need to leave at 4," you are saying that it will
|
||||
take 2 hours no matter when you leave, and that moving the start
|
||||
time will slide the end time correspondingly.
|
||||
|
||||
=head1 BASIC METHODS
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
#=========================================================================
|
||||
|
||||
package Net::ICal::Period;
|
||||
use strict;
|
||||
use Net::ICal::Time;
|
||||
use Net::ICal::Duration;
|
||||
|
||||
use UNIVERSAL qw(isa);
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
=pod
|
||||
=head2 new($time, $time|$duration)
|
||||
|
||||
Creates a new period object given to parameters: The first must be a
|
||||
I<Time> object or valid argument to Net::ICal::Time::new.
|
||||
|
||||
The second can be either:
|
||||
|
||||
=pod
|
||||
|
||||
=over 4
|
||||
|
||||
=item * a I<Time> object
|
||||
|
||||
=item * a valid argument to Net::ICal::Time::new.
|
||||
|
||||
=item * a I<Duration> object
|
||||
|
||||
=item * a valid argument to Net::ICal::Duration::new.
|
||||
|
||||
=back
|
||||
|
||||
Either give a start time and an end time, or a start time and a duration.
|
||||
|
||||
=cut
|
||||
|
||||
sub new{
|
||||
my $package = shift;
|
||||
my $arg1 = shift;
|
||||
my $arg2 = shift;
|
||||
my $self = {};
|
||||
|
||||
# Is the string in RFC2445 Format?
|
||||
if(!$arg2 and $arg1 =~ /\//){
|
||||
my $tmp = $arg1;
|
||||
($arg1,$arg2) = split(/\//,$tmp);
|
||||
}
|
||||
|
||||
|
||||
if( ref($arg1) eq 'Net::ICal::Time'){
|
||||
$self->{START} = $arg1->clone();
|
||||
} else {
|
||||
$self->{START} = new Net::ICal::Time($arg1);
|
||||
}
|
||||
|
||||
|
||||
if(isa($arg2,'Net::ICal::Time')){
|
||||
$self->{END} = $arg2->clone();
|
||||
} elsif (isa($arg2,'Net::ICal::Duration')) {
|
||||
$self->{DURATION} = $arg2->clone();
|
||||
} elsif ($arg2 =~ /^P/) {
|
||||
$self->{DURATION} = new Net::ICal::Duration($arg2);
|
||||
} else {
|
||||
# Hope that it is a time string
|
||||
$self->{END} = new Net::ICal::Time($arg2);
|
||||
}
|
||||
|
||||
return bless($self,$package);
|
||||
}
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
=pod
|
||||
=head2 clone()
|
||||
|
||||
Create a copy of this component
|
||||
|
||||
=cut
|
||||
# XXX implement this
|
||||
sub clone {
|
||||
return "Not implemented";
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
=pod
|
||||
=head2 is_valid()
|
||||
|
||||
Return true if:
|
||||
There is an end time and:
|
||||
Both start and end times have no timezone ( Floating time) or
|
||||
Both start and end time have (possibly different) timezones or
|
||||
Both start and end times are in UTC and
|
||||
The end time is after the start time.
|
||||
|
||||
There is a duration and the duration is positive
|
||||
|
||||
=cut
|
||||
|
||||
# XXX implement this
|
||||
|
||||
sub is_valid {
|
||||
return "Not implemented";
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
=pod
|
||||
=head2 start([$time])
|
||||
|
||||
Accessor for the start time of the event as a I<Time> object.
|
||||
Can also take a valid time string or an integer (number of
|
||||
seconds since the epoch) as a parameter. If a second parameter
|
||||
is given, it'll set this Duration's start time.
|
||||
|
||||
=cut
|
||||
|
||||
sub start{
|
||||
my $self = shift;
|
||||
my $t = shift;
|
||||
|
||||
if($t){
|
||||
if(isa($t,'Net::ICal::Time')){
|
||||
$self->{START} = $t->clone();
|
||||
} else {
|
||||
$self->{START} = new Net::ICal::Time($t);
|
||||
}
|
||||
}
|
||||
|
||||
return $self->{START};
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
=pod
|
||||
=head2 end([$time])
|
||||
|
||||
Accessor for the end time. Takes a I<Time> object, a valid time string,
|
||||
or an integer and returns a time object. This routine is coupled to
|
||||
the I<duration> accessor. See I<duration> below for more imformation.
|
||||
|
||||
=cut
|
||||
|
||||
sub end{
|
||||
|
||||
my $self = shift;
|
||||
my $t = shift;
|
||||
my $end;
|
||||
|
||||
if($t){
|
||||
if(isa($t,'Net::ICal::Time')){
|
||||
$end = $t->clone();
|
||||
} else {
|
||||
$end = new Net::ICal::Time($t);
|
||||
}
|
||||
|
||||
# If duration exists, use the time to compute a new duration
|
||||
if ($self->{DURATION}){
|
||||
$self->{DURATION} = $end->subtract($self->{START});
|
||||
} else {
|
||||
$self->{END} = $end;
|
||||
}
|
||||
}
|
||||
|
||||
# Return end time, possibly computing it from DURATION
|
||||
if($self->{DURATION}){
|
||||
return $self->{START}->add($self->{DURATION});
|
||||
} else {
|
||||
return $self->{END};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
=pod
|
||||
=head2 duration([$duration])
|
||||
|
||||
Accessor for the duration of the event. Takes a I<duration> object and
|
||||
returns a I<Duration> object.
|
||||
|
||||
Since the end time and the duration both specify the end time, the
|
||||
object will store one and access to the other will be computed. So,
|
||||
|
||||
if you create:
|
||||
|
||||
$p = new Net::ICal::Period("19970101T120000","19970101T123000")
|
||||
|
||||
And then execute:
|
||||
|
||||
$p->duration(45*60);
|
||||
|
||||
The period object will adjust the end time to be 45 minutes after
|
||||
the start time. It will not replace the end time with a
|
||||
duration. This is required so that a CUA can take an incoming
|
||||
component from a server, modify it, and send it back out in the same
|
||||
basic form.
|
||||
|
||||
=cut
|
||||
|
||||
sub duration{
|
||||
my $self = shift;
|
||||
my $d = shift;
|
||||
my $dur;
|
||||
|
||||
if($d){
|
||||
if(isa($d,'Net::ICal::Duration')){
|
||||
$dur = $d->clone();
|
||||
} else {
|
||||
$dur = new Net::ICal::Duration($d);
|
||||
}
|
||||
|
||||
# If end exists, use the duration to compute a new end
|
||||
# otherwise, set the duration.
|
||||
if ($self->{END}){
|
||||
$self->{END} = $self->{START}->add($dur);
|
||||
} else {
|
||||
$self->{DURATION} = $dur;
|
||||
}
|
||||
}
|
||||
|
||||
# Return duration, possibly computing it from END
|
||||
if($self->{END}){
|
||||
return $self->{END}->subtract($self->{START});
|
||||
} else {
|
||||
return $self->{DURATION};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
=pod
|
||||
|
||||
=head2 as_ical()
|
||||
|
||||
Return a string that holds the RFC2445 text form of this duration
|
||||
|
||||
=cut
|
||||
sub as_ical {
|
||||
my $self = shift;
|
||||
my $out;
|
||||
|
||||
$out = $self->{START}->as_ical() ."/";
|
||||
|
||||
if($self->{DURATION}){
|
||||
$out .= $self->{DURATION}->as_ical()
|
||||
} else {
|
||||
$out .= $self->{END}->as_ical()
|
||||
}
|
||||
|
||||
return $out;
|
||||
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
=pod
|
||||
|
||||
=head2 test()
|
||||
|
||||
A set of developers' tests to make sure the module's working properly.
|
||||
|
||||
=cut
|
||||
|
||||
# Run this with a one-liner:
|
||||
# perl -e "use lib('/home/srl/dev/rk/reefknot/base/'); use Net::ICal::Period; Net::ICal::Period::test();"
|
||||
# adjusted for your environment.
|
||||
sub test {
|
||||
|
||||
print("--------- Test Net::ICal::Period --------------\n");
|
||||
|
||||
|
||||
my $p = new Net::ICal::Period("19970101T180000Z/19970102T070000Z");
|
||||
print $p->as_ical()."\n";
|
||||
die if $p->as_ical() ne "19970101T180000Z/19970102T070000Z";
|
||||
|
||||
$p = new Net::ICal::Period("19970101T180000Z/PT5H30M");
|
||||
print $p->as_ical()."\n";
|
||||
die if $p->as_ical() ne "19970101T180000Z/PT5H30M";
|
||||
|
||||
$p->duration("PT5H30M10S");
|
||||
print $p->as_ical()."\n";
|
||||
die if $p->as_ical() ne "19970101T180000Z/PT5H30M10S" ;
|
||||
|
||||
$p->duration(new Net::ICal::Duration("P10DT30M5S"));
|
||||
print $p->as_ical()."\n";
|
||||
die if $p->as_ical() ne "19970101T180000Z/P10DT30M5S" ;
|
||||
|
||||
$p->end("19970101T183000Z");
|
||||
print $p->as_ical()."\n";
|
||||
die if $p->as_ical() ne "19970101T180000Z/PT30M" ;
|
||||
|
||||
$p = new Net::ICal::Period("19970101T180000Z/19970102T070000Z");
|
||||
|
||||
$p->end("19970101T183000Z");
|
||||
print $p->as_ical()."\n";
|
||||
die if $p->as_ical() ne "19970101T180000Z/19970101T183000Z" ;
|
||||
|
||||
$p->duration("P1DT1H10M");
|
||||
print $p->as_ical()."\n";
|
||||
die if $p->as_ical() ne "19970101T180000Z/19970102T191000Z" ;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
||||
__END__
|
||||
|
|
@ -0,0 +1,173 @@
|
|||
#!/usr/bin/perl
|
||||
# -*- Mode: perl -*-
|
||||
#======================================================================
|
||||
# FILE: Property.pm
|
||||
# CREATOR: eric 1 Mar 01
|
||||
#
|
||||
# DESCRIPTION:
|
||||
#
|
||||
#
|
||||
# $Id: Property.pm,v 1.1 2001-12-21 19:21:20 mikep%oeone.com Exp $
|
||||
# $Locker: $
|
||||
#
|
||||
# (C) COPYRIGHT 2000, Eric Busboom, eric@softwarestudio.org
|
||||
#
|
||||
# This package is free software and is provided "as is" without express
|
||||
# or implied warranty. It may be used, redistributed and/or modified
|
||||
# under the same terms as perl itself. ( Either the Artistic License or the
|
||||
# GPL. )
|
||||
#
|
||||
#
|
||||
#======================================================================
|
||||
|
||||
use Net::ICal::Libical::Property;
|
||||
|
||||
|
||||
package Net::ICal::Libical::Property;
|
||||
use strict;
|
||||
|
||||
|
||||
sub new {
|
||||
|
||||
my $class = shift;
|
||||
my $arg = shift;
|
||||
my $self = {};
|
||||
my $kind;
|
||||
|
||||
if(ref($arg) == 'HASH'){
|
||||
|
||||
$self->{'ref'} = $arg->{'ref'};
|
||||
|
||||
} else {
|
||||
$kind = Net::ICal::Libical::icalproperty_string_to_kind($arg);
|
||||
$self->{'ref'} = Net::ICal::Libical::icalproperty_new($kind);
|
||||
}
|
||||
|
||||
die "Did not get icalproperty ref in Net::ICal::Libical::Property::new " if !$self->{'ref'};
|
||||
|
||||
bless $self, $class;
|
||||
}
|
||||
|
||||
|
||||
sub DESTROY {
|
||||
my $self = shift;
|
||||
|
||||
my $r = $self->{'ref'};
|
||||
|
||||
if($r && !Net::ICal::Libical::icalproperty_get_parent($r)){
|
||||
Net::ICal::Libical::icalproperty_free($self->{'ref'});
|
||||
}
|
||||
}
|
||||
|
||||
sub name {
|
||||
my $self = shift;
|
||||
my $str;
|
||||
|
||||
die if !$self->{'ref'};
|
||||
|
||||
$str = Net::ICal::Libical::icalproperty_as_ical_string($self->{'ref'});
|
||||
|
||||
$str =~ /^([A-Z\-]+)\n/;
|
||||
|
||||
return $1;
|
||||
|
||||
}
|
||||
|
||||
#Get/Set the internal reference to the libical icalproperty """
|
||||
sub prop_ref {
|
||||
my $self = shift;
|
||||
my $p_r = shift;
|
||||
|
||||
if($p_r){
|
||||
$self->{'ref'} = $p_r;
|
||||
}
|
||||
|
||||
return $self->{'ref'};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#Get/set the RFC2445 representation of the value. Dict value 'value'
|
||||
sub value {
|
||||
my $self = shift;
|
||||
my $v = shift;
|
||||
my $kind = shift;
|
||||
|
||||
my $vt;
|
||||
if($v){
|
||||
|
||||
if ($kind) {
|
||||
$self->{'VALUE'} = $kind;
|
||||
$vt = $kind;
|
||||
}
|
||||
elsif ($self->{'VALUE'}) {
|
||||
$vt = $self->{'VALUE'};
|
||||
}
|
||||
else {
|
||||
$vt = 'NO'; # Use the kind of the existing value
|
||||
}
|
||||
|
||||
|
||||
Net::ICal::Libical::icalproperty_set_value_from_string($self->{'ref'},$v,$vt);
|
||||
|
||||
}
|
||||
|
||||
return Net::ICal::Libical::icalproperty_get_value_as_string($self->{'ref'});
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Get a named parameter
|
||||
sub get_parameter{
|
||||
my $self = shift;
|
||||
my $key = shift;
|
||||
|
||||
die "get_parameter: missing parameter name" if !$key;
|
||||
|
||||
$key = uc($key);
|
||||
my $ref = $self->{'ref'};
|
||||
|
||||
my $str = Net::ICal::Libical::icalproperty_get_parameter_as_string($ref,$key);
|
||||
|
||||
if($str eq 'NULL') {
|
||||
return undef;
|
||||
}
|
||||
|
||||
return $str
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Set the value of the named parameter
|
||||
sub set_parameter{
|
||||
my $self = shift;
|
||||
my $key = shift;
|
||||
my $value = shift;
|
||||
|
||||
die "set_parameter: missing parameter name" if !$key;
|
||||
die "set_parameter: missing parameter value" if !$value;
|
||||
|
||||
$key = uc($key);
|
||||
my $ref = $self->{'ref'};
|
||||
|
||||
my $str = Net::ICal::Libical::icalproperty_set_parameter_from_string($ref,$key,$value);
|
||||
|
||||
|
||||
return $self->get_parameter($self);
|
||||
|
||||
}
|
||||
|
||||
|
||||
sub as_ical_string {
|
||||
my $self = shift;
|
||||
my $str = Net::ICal::Libical::icalproperty_as_ical_string($self->{'ref'});
|
||||
|
||||
$str =~ s/\r//g;
|
||||
$str =~ s/\n\s?//g;
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
|
||||
1;
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,307 @@
|
|||
/* -*- Mode: C -*- */
|
||||
/*======================================================================
|
||||
FILE: icalparam.h
|
||||
CREATOR: eric 20 March 1999
|
||||
|
||||
|
||||
$Id: icalderivedparameter.h,v 1.1 2001-12-21 19:21:40 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of either:
|
||||
|
||||
The LGPL as published by the Free Software Foundation, version
|
||||
2.1, available at: http://www.fsf.org/copyleft/lesser.html
|
||||
|
||||
Or:
|
||||
|
||||
The Mozilla Public License Version 1.0. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
The original code is icalparam.h
|
||||
|
||||
======================================================================*/
|
||||
|
||||
#ifndef ICALDERIVEDPARAMETER_H
|
||||
#define ICALDERIVEDPARAMETER_H
|
||||
|
||||
|
||||
typedef void icalparameter;
|
||||
|
||||
const char* icalparameter_enum_to_string(int e);
|
||||
int icalparameter_string_to_enum(const char* str);
|
||||
|
||||
/* Everything below this line is machine generated. Do not edit. */
|
||||
typedef enum icalparameter_kind {
|
||||
ICAL_ANY_PARAMETER = 0,
|
||||
ICAL_ALTREP_PARAMETER,
|
||||
ICAL_CN_PARAMETER,
|
||||
ICAL_CUTYPE_PARAMETER,
|
||||
ICAL_DELEGATEDFROM_PARAMETER,
|
||||
ICAL_DELEGATEDTO_PARAMETER,
|
||||
ICAL_DIR_PARAMETER,
|
||||
ICAL_ENCODING_PARAMETER,
|
||||
ICAL_FBTYPE_PARAMETER,
|
||||
ICAL_FMTTYPE_PARAMETER,
|
||||
ICAL_LANGUAGE_PARAMETER,
|
||||
ICAL_MEMBER_PARAMETER,
|
||||
ICAL_PARTSTAT_PARAMETER,
|
||||
ICAL_RANGE_PARAMETER,
|
||||
ICAL_RELATED_PARAMETER,
|
||||
ICAL_RELTYPE_PARAMETER,
|
||||
ICAL_ROLE_PARAMETER,
|
||||
ICAL_RSVP_PARAMETER,
|
||||
ICAL_SENTBY_PARAMETER,
|
||||
ICAL_TZID_PARAMETER,
|
||||
ICAL_VALUE_PARAMETER,
|
||||
ICAL_X_PARAMETER,
|
||||
ICAL_XLICCOMPARETYPE_PARAMETER,
|
||||
ICAL_XLICERRORTYPE_PARAMETER,
|
||||
ICAL_NO_PARAMETER
|
||||
} icalparameter_kind;
|
||||
|
||||
#define ICALPARAMETER_FIRST_ENUM 20000
|
||||
|
||||
typedef enum icalparameter_cutype {
|
||||
ICAL_CUTYPE_X = 20000,
|
||||
ICAL_CUTYPE_INDIVIDUAL = 20001,
|
||||
ICAL_CUTYPE_GROUP = 20002,
|
||||
ICAL_CUTYPE_RESOURCE = 20003,
|
||||
ICAL_CUTYPE_ROOM = 20004,
|
||||
ICAL_CUTYPE_UNKNOWN = 20005,
|
||||
ICAL_CUTYPE_NONE = 20006
|
||||
} icalparameter_cutype;
|
||||
|
||||
typedef enum icalparameter_encoding {
|
||||
ICAL_ENCODING_X = 20007,
|
||||
ICAL_ENCODING_8BIT = 20008,
|
||||
ICAL_ENCODING_BASE64 = 20009,
|
||||
ICAL_ENCODING_NONE = 20010
|
||||
} icalparameter_encoding;
|
||||
|
||||
typedef enum icalparameter_fbtype {
|
||||
ICAL_FBTYPE_X = 20011,
|
||||
ICAL_FBTYPE_FREE = 20012,
|
||||
ICAL_FBTYPE_BUSY = 20013,
|
||||
ICAL_FBTYPE_BUSYUNAVAILABLE = 20014,
|
||||
ICAL_FBTYPE_BUSYTENTATIVE = 20015,
|
||||
ICAL_FBTYPE_NONE = 20016
|
||||
} icalparameter_fbtype;
|
||||
|
||||
typedef enum icalparameter_partstat {
|
||||
ICAL_PARTSTAT_X = 20017,
|
||||
ICAL_PARTSTAT_NEEDSACTION = 20018,
|
||||
ICAL_PARTSTAT_ACCEPTED = 20019,
|
||||
ICAL_PARTSTAT_DECLINED = 20020,
|
||||
ICAL_PARTSTAT_TENTATIVE = 20021,
|
||||
ICAL_PARTSTAT_DELEGATED = 20022,
|
||||
ICAL_PARTSTAT_COMPLETED = 20023,
|
||||
ICAL_PARTSTAT_INPROCESS = 20024,
|
||||
ICAL_PARTSTAT_NONE = 20025
|
||||
} icalparameter_partstat;
|
||||
|
||||
typedef enum icalparameter_range {
|
||||
ICAL_RANGE_X = 20026,
|
||||
ICAL_RANGE_THISANDPRIOR = 20027,
|
||||
ICAL_RANGE_THISANDFUTURE = 20028,
|
||||
ICAL_RANGE_NONE = 20029
|
||||
} icalparameter_range;
|
||||
|
||||
typedef enum icalparameter_related {
|
||||
ICAL_RELATED_X = 20030,
|
||||
ICAL_RELATED_START = 20031,
|
||||
ICAL_RELATED_END = 20032,
|
||||
ICAL_RELATED_NONE = 20033
|
||||
} icalparameter_related;
|
||||
|
||||
typedef enum icalparameter_reltype {
|
||||
ICAL_RELTYPE_X = 20034,
|
||||
ICAL_RELTYPE_PARENT = 20035,
|
||||
ICAL_RELTYPE_CHILD = 20036,
|
||||
ICAL_RELTYPE_SIBLING = 20037,
|
||||
ICAL_RELTYPE_NONE = 20038
|
||||
} icalparameter_reltype;
|
||||
|
||||
typedef enum icalparameter_role {
|
||||
ICAL_ROLE_X = 20039,
|
||||
ICAL_ROLE_CHAIR = 20040,
|
||||
ICAL_ROLE_REQPARTICIPANT = 20041,
|
||||
ICAL_ROLE_OPTPARTICIPANT = 20042,
|
||||
ICAL_ROLE_NONPARTICIPANT = 20043,
|
||||
ICAL_ROLE_NONE = 20044
|
||||
} icalparameter_role;
|
||||
|
||||
typedef enum icalparameter_rsvp {
|
||||
ICAL_RSVP_X = 20045,
|
||||
ICAL_RSVP_TRUE = 20046,
|
||||
ICAL_RSVP_FALSE = 20047,
|
||||
ICAL_RSVP_NONE = 20048
|
||||
} icalparameter_rsvp;
|
||||
|
||||
typedef enum icalparameter_value {
|
||||
ICAL_VALUE_X = 20049,
|
||||
ICAL_VALUE_BINARY = 20050,
|
||||
ICAL_VALUE_BOOLEAN = 20051,
|
||||
ICAL_VALUE_DATE = 20052,
|
||||
ICAL_VALUE_DURATION = 20053,
|
||||
ICAL_VALUE_FLOAT = 20054,
|
||||
ICAL_VALUE_INTEGER = 20055,
|
||||
ICAL_VALUE_PERIOD = 20056,
|
||||
ICAL_VALUE_RECUR = 20057,
|
||||
ICAL_VALUE_TEXT = 20058,
|
||||
ICAL_VALUE_URI = 20059,
|
||||
ICAL_VALUE_ERROR = 20060,
|
||||
ICAL_VALUE_DATETIME = 20061,
|
||||
ICAL_VALUE_UTCOFFSET = 20062,
|
||||
ICAL_VALUE_CALADDRESS = 20063,
|
||||
ICAL_VALUE_NONE = 20064
|
||||
} icalparameter_value;
|
||||
|
||||
typedef enum icalparameter_xliccomparetype {
|
||||
ICAL_XLICCOMPARETYPE_X = 20065,
|
||||
ICAL_XLICCOMPARETYPE_EQUAL = 20066,
|
||||
ICAL_XLICCOMPARETYPE_NOTEQUAL = 20067,
|
||||
ICAL_XLICCOMPARETYPE_LESS = 20068,
|
||||
ICAL_XLICCOMPARETYPE_GREATER = 20069,
|
||||
ICAL_XLICCOMPARETYPE_LESSEQUAL = 20070,
|
||||
ICAL_XLICCOMPARETYPE_GREATEREQUAL = 20071,
|
||||
ICAL_XLICCOMPARETYPE_REGEX = 20072,
|
||||
ICAL_XLICCOMPARETYPE_NONE = 20073
|
||||
} icalparameter_xliccomparetype;
|
||||
|
||||
typedef enum icalparameter_xlicerrortype {
|
||||
ICAL_XLICERRORTYPE_X = 20074,
|
||||
ICAL_XLICERRORTYPE_COMPONENTPARSEERROR = 20075,
|
||||
ICAL_XLICERRORTYPE_PROPERTYPARSEERROR = 20076,
|
||||
ICAL_XLICERRORTYPE_PARAMETERNAMEPARSEERROR = 20077,
|
||||
ICAL_XLICERRORTYPE_PARAMETERVALUEPARSEERROR = 20078,
|
||||
ICAL_XLICERRORTYPE_VALUEPARSEERROR = 20079,
|
||||
ICAL_XLICERRORTYPE_INVALIDITIP = 20080,
|
||||
ICAL_XLICERRORTYPE_UNKNOWNVCALPROPERROR = 20081,
|
||||
ICAL_XLICERRORTYPE_MIMEPARSEERROR = 20082,
|
||||
ICAL_XLICERRORTYPE_NONE = 20083
|
||||
} icalparameter_xlicerrortype;
|
||||
|
||||
#define ICALPARAMETER_LAST_ENUM 20084
|
||||
|
||||
/* DELEGATED-FROM */
|
||||
icalparameter* icalparameter_new_delegatedfrom(const char* v);
|
||||
const char* icalparameter_get_delegatedfrom(icalparameter* value);
|
||||
void icalparameter_set_delegatedfrom(icalparameter* value, const char* v);
|
||||
|
||||
/* RELATED */
|
||||
icalparameter* icalparameter_new_related(icalparameter_related v);
|
||||
icalparameter_related icalparameter_get_related(icalparameter* value);
|
||||
void icalparameter_set_related(icalparameter* value, icalparameter_related v);
|
||||
|
||||
/* SENT-BY */
|
||||
icalparameter* icalparameter_new_sentby(const char* v);
|
||||
const char* icalparameter_get_sentby(icalparameter* value);
|
||||
void icalparameter_set_sentby(icalparameter* value, const char* v);
|
||||
|
||||
/* LANGUAGE */
|
||||
icalparameter* icalparameter_new_language(const char* v);
|
||||
const char* icalparameter_get_language(icalparameter* value);
|
||||
void icalparameter_set_language(icalparameter* value, const char* v);
|
||||
|
||||
/* RELTYPE */
|
||||
icalparameter* icalparameter_new_reltype(icalparameter_reltype v);
|
||||
icalparameter_reltype icalparameter_get_reltype(icalparameter* value);
|
||||
void icalparameter_set_reltype(icalparameter* value, icalparameter_reltype v);
|
||||
|
||||
/* ENCODING */
|
||||
icalparameter* icalparameter_new_encoding(icalparameter_encoding v);
|
||||
icalparameter_encoding icalparameter_get_encoding(icalparameter* value);
|
||||
void icalparameter_set_encoding(icalparameter* value, icalparameter_encoding v);
|
||||
|
||||
/* ALTREP */
|
||||
icalparameter* icalparameter_new_altrep(const char* v);
|
||||
const char* icalparameter_get_altrep(icalparameter* value);
|
||||
void icalparameter_set_altrep(icalparameter* value, const char* v);
|
||||
|
||||
/* FMTTYPE */
|
||||
icalparameter* icalparameter_new_fmttype(const char* v);
|
||||
const char* icalparameter_get_fmttype(icalparameter* value);
|
||||
void icalparameter_set_fmttype(icalparameter* value, const char* v);
|
||||
|
||||
/* FBTYPE */
|
||||
icalparameter* icalparameter_new_fbtype(icalparameter_fbtype v);
|
||||
icalparameter_fbtype icalparameter_get_fbtype(icalparameter* value);
|
||||
void icalparameter_set_fbtype(icalparameter* value, icalparameter_fbtype v);
|
||||
|
||||
/* RSVP */
|
||||
icalparameter* icalparameter_new_rsvp(icalparameter_rsvp v);
|
||||
icalparameter_rsvp icalparameter_get_rsvp(icalparameter* value);
|
||||
void icalparameter_set_rsvp(icalparameter* value, icalparameter_rsvp v);
|
||||
|
||||
/* RANGE */
|
||||
icalparameter* icalparameter_new_range(icalparameter_range v);
|
||||
icalparameter_range icalparameter_get_range(icalparameter* value);
|
||||
void icalparameter_set_range(icalparameter* value, icalparameter_range v);
|
||||
|
||||
/* DELEGATED-TO */
|
||||
icalparameter* icalparameter_new_delegatedto(const char* v);
|
||||
const char* icalparameter_get_delegatedto(icalparameter* value);
|
||||
void icalparameter_set_delegatedto(icalparameter* value, const char* v);
|
||||
|
||||
/* CN */
|
||||
icalparameter* icalparameter_new_cn(const char* v);
|
||||
const char* icalparameter_get_cn(icalparameter* value);
|
||||
void icalparameter_set_cn(icalparameter* value, const char* v);
|
||||
|
||||
/* ROLE */
|
||||
icalparameter* icalparameter_new_role(icalparameter_role v);
|
||||
icalparameter_role icalparameter_get_role(icalparameter* value);
|
||||
void icalparameter_set_role(icalparameter* value, icalparameter_role v);
|
||||
|
||||
/* X-LIC-COMPARETYPE */
|
||||
icalparameter* icalparameter_new_xliccomparetype(icalparameter_xliccomparetype v);
|
||||
icalparameter_xliccomparetype icalparameter_get_xliccomparetype(icalparameter* value);
|
||||
void icalparameter_set_xliccomparetype(icalparameter* value, icalparameter_xliccomparetype v);
|
||||
|
||||
/* PARTSTAT */
|
||||
icalparameter* icalparameter_new_partstat(icalparameter_partstat v);
|
||||
icalparameter_partstat icalparameter_get_partstat(icalparameter* value);
|
||||
void icalparameter_set_partstat(icalparameter* value, icalparameter_partstat v);
|
||||
|
||||
/* X-LIC-ERRORTYPE */
|
||||
icalparameter* icalparameter_new_xlicerrortype(icalparameter_xlicerrortype v);
|
||||
icalparameter_xlicerrortype icalparameter_get_xlicerrortype(icalparameter* value);
|
||||
void icalparameter_set_xlicerrortype(icalparameter* value, icalparameter_xlicerrortype v);
|
||||
|
||||
/* MEMBER */
|
||||
icalparameter* icalparameter_new_member(const char* v);
|
||||
const char* icalparameter_get_member(icalparameter* value);
|
||||
void icalparameter_set_member(icalparameter* value, const char* v);
|
||||
|
||||
/* X */
|
||||
icalparameter* icalparameter_new_x(const char* v);
|
||||
const char* icalparameter_get_x(icalparameter* value);
|
||||
void icalparameter_set_x(icalparameter* value, const char* v);
|
||||
|
||||
/* CUTYPE */
|
||||
icalparameter* icalparameter_new_cutype(icalparameter_cutype v);
|
||||
icalparameter_cutype icalparameter_get_cutype(icalparameter* value);
|
||||
void icalparameter_set_cutype(icalparameter* value, icalparameter_cutype v);
|
||||
|
||||
/* TZID */
|
||||
icalparameter* icalparameter_new_tzid(const char* v);
|
||||
const char* icalparameter_get_tzid(icalparameter* value);
|
||||
void icalparameter_set_tzid(icalparameter* value, const char* v);
|
||||
|
||||
/* VALUE */
|
||||
icalparameter* icalparameter_new_value(icalparameter_value v);
|
||||
icalparameter_value icalparameter_get_value(icalparameter* value);
|
||||
void icalparameter_set_value(icalparameter* value, icalparameter_value v);
|
||||
|
||||
/* DIR */
|
||||
icalparameter* icalparameter_new_dir(const char* v);
|
||||
const char* icalparameter_get_dir(icalparameter* value);
|
||||
void icalparameter_set_dir(icalparameter* value, const char* v);
|
||||
|
||||
#endif /*ICALPARAMETER_H*/
|
||||
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,409 @@
|
|||
/* -*- Mode: C -*-
|
||||
======================================================================
|
||||
FILE: icalderivedproperties.{c,h}
|
||||
CREATOR: eric 09 May 1999
|
||||
|
||||
$Id: icalderivedproperty.h,v 1.1 2001-12-21 19:21:41 mikep%oeone.com Exp $
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
======================================================================*/
|
||||
|
||||
|
||||
#ifndef ICALDERIVEDPROPERTY_H
|
||||
#define ICALDERIVEDPROPERTY_H
|
||||
|
||||
#include <time.h>
|
||||
#include "icalparameter.h"
|
||||
#include "icalderivedvalue.h"
|
||||
#include "icalrecur.h"
|
||||
|
||||
typedef void icalproperty;
|
||||
|
||||
|
||||
/* Everything below this line is machine generated. Do not edit. */
|
||||
typedef enum icalproperty_kind {
|
||||
ICAL_ANY_PROPERTY = 0,
|
||||
ICAL_ACTION_PROPERTY,
|
||||
ICAL_ATTACH_PROPERTY,
|
||||
ICAL_ATTENDEE_PROPERTY,
|
||||
ICAL_CALSCALE_PROPERTY,
|
||||
ICAL_CATEGORIES_PROPERTY,
|
||||
ICAL_CLASS_PROPERTY,
|
||||
ICAL_COMMENT_PROPERTY,
|
||||
ICAL_COMPLETED_PROPERTY,
|
||||
ICAL_CONTACT_PROPERTY,
|
||||
ICAL_CREATED_PROPERTY,
|
||||
ICAL_DESCRIPTION_PROPERTY,
|
||||
ICAL_DTEND_PROPERTY,
|
||||
ICAL_DTSTAMP_PROPERTY,
|
||||
ICAL_DTSTART_PROPERTY,
|
||||
ICAL_DUE_PROPERTY,
|
||||
ICAL_DURATION_PROPERTY,
|
||||
ICAL_EXDATE_PROPERTY,
|
||||
ICAL_EXRULE_PROPERTY,
|
||||
ICAL_FREEBUSY_PROPERTY,
|
||||
ICAL_GEO_PROPERTY,
|
||||
ICAL_LASTMODIFIED_PROPERTY,
|
||||
ICAL_LOCATION_PROPERTY,
|
||||
ICAL_MAXRESULTS_PROPERTY,
|
||||
ICAL_MAXRESULTSSIZE_PROPERTY,
|
||||
ICAL_METHOD_PROPERTY,
|
||||
ICAL_ORGANIZER_PROPERTY,
|
||||
ICAL_PERCENTCOMPLETE_PROPERTY,
|
||||
ICAL_PRIORITY_PROPERTY,
|
||||
ICAL_PRODID_PROPERTY,
|
||||
ICAL_QUERY_PROPERTY,
|
||||
ICAL_QUERYNAME_PROPERTY,
|
||||
ICAL_RDATE_PROPERTY,
|
||||
ICAL_RECURRENCEID_PROPERTY,
|
||||
ICAL_RELATEDTO_PROPERTY,
|
||||
ICAL_REPEAT_PROPERTY,
|
||||
ICAL_REQUESTSTATUS_PROPERTY,
|
||||
ICAL_RESOURCES_PROPERTY,
|
||||
ICAL_RRULE_PROPERTY,
|
||||
ICAL_SCOPE_PROPERTY,
|
||||
ICAL_SEQUENCE_PROPERTY,
|
||||
ICAL_STATUS_PROPERTY,
|
||||
ICAL_SUMMARY_PROPERTY,
|
||||
ICAL_TARGET_PROPERTY,
|
||||
ICAL_TRANSP_PROPERTY,
|
||||
ICAL_TRIGGER_PROPERTY,
|
||||
ICAL_TZID_PROPERTY,
|
||||
ICAL_TZNAME_PROPERTY,
|
||||
ICAL_TZOFFSETFROM_PROPERTY,
|
||||
ICAL_TZOFFSETTO_PROPERTY,
|
||||
ICAL_TZURL_PROPERTY,
|
||||
ICAL_UID_PROPERTY,
|
||||
ICAL_URL_PROPERTY,
|
||||
ICAL_VERSION_PROPERTY,
|
||||
ICAL_X_PROPERTY,
|
||||
ICAL_XLICCLASS_PROPERTY,
|
||||
ICAL_XLICCLUSTERCOUNT_PROPERTY,
|
||||
ICAL_XLICERROR_PROPERTY,
|
||||
ICAL_XLICMIMECHARSET_PROPERTY,
|
||||
ICAL_XLICMIMECID_PROPERTY,
|
||||
ICAL_XLICMIMECONTENTTYPE_PROPERTY,
|
||||
ICAL_XLICMIMEENCODING_PROPERTY,
|
||||
ICAL_XLICMIMEFILENAME_PROPERTY,
|
||||
ICAL_XLICMIMEOPTINFO_PROPERTY,
|
||||
ICAL_NO_PROPERTY
|
||||
} icalproperty_kind;
|
||||
|
||||
|
||||
/* ACTION */
|
||||
icalproperty* icalproperty_new_action(enum icalproperty_action v);
|
||||
void icalproperty_set_action(icalproperty* prop, enum icalproperty_action v);
|
||||
enum icalproperty_action icalproperty_get_action(icalproperty* prop);icalproperty* icalproperty_vanew_action(enum icalproperty_action v, ...);
|
||||
|
||||
/* ATTACH */
|
||||
icalproperty* icalproperty_new_attach(struct icalattachtype v);
|
||||
void icalproperty_set_attach(icalproperty* prop, struct icalattachtype v);
|
||||
struct icalattachtype icalproperty_get_attach(icalproperty* prop);icalproperty* icalproperty_vanew_attach(struct icalattachtype v, ...);
|
||||
|
||||
/* ATTENDEE */
|
||||
icalproperty* icalproperty_new_attendee(const char* v);
|
||||
void icalproperty_set_attendee(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_attendee(icalproperty* prop);icalproperty* icalproperty_vanew_attendee(const char* v, ...);
|
||||
|
||||
/* CALSCALE */
|
||||
icalproperty* icalproperty_new_calscale(const char* v);
|
||||
void icalproperty_set_calscale(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_calscale(icalproperty* prop);icalproperty* icalproperty_vanew_calscale(const char* v, ...);
|
||||
|
||||
/* CATEGORIES */
|
||||
icalproperty* icalproperty_new_categories(const char* v);
|
||||
void icalproperty_set_categories(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_categories(icalproperty* prop);icalproperty* icalproperty_vanew_categories(const char* v, ...);
|
||||
|
||||
/* CLASS */
|
||||
icalproperty* icalproperty_new_class(enum icalproperty_class v);
|
||||
void icalproperty_set_class(icalproperty* prop, enum icalproperty_class v);
|
||||
enum icalproperty_class icalproperty_get_class(icalproperty* prop);icalproperty* icalproperty_vanew_class(enum icalproperty_class v, ...);
|
||||
|
||||
/* COMMENT */
|
||||
icalproperty* icalproperty_new_comment(const char* v);
|
||||
void icalproperty_set_comment(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_comment(icalproperty* prop);icalproperty* icalproperty_vanew_comment(const char* v, ...);
|
||||
|
||||
/* COMPLETED */
|
||||
icalproperty* icalproperty_new_completed(struct icaltimetype v);
|
||||
void icalproperty_set_completed(icalproperty* prop, struct icaltimetype v);
|
||||
struct icaltimetype icalproperty_get_completed(icalproperty* prop);icalproperty* icalproperty_vanew_completed(struct icaltimetype v, ...);
|
||||
|
||||
/* CONTACT */
|
||||
icalproperty* icalproperty_new_contact(const char* v);
|
||||
void icalproperty_set_contact(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_contact(icalproperty* prop);icalproperty* icalproperty_vanew_contact(const char* v, ...);
|
||||
|
||||
/* CREATED */
|
||||
icalproperty* icalproperty_new_created(struct icaltimetype v);
|
||||
void icalproperty_set_created(icalproperty* prop, struct icaltimetype v);
|
||||
struct icaltimetype icalproperty_get_created(icalproperty* prop);icalproperty* icalproperty_vanew_created(struct icaltimetype v, ...);
|
||||
|
||||
/* DESCRIPTION */
|
||||
icalproperty* icalproperty_new_description(const char* v);
|
||||
void icalproperty_set_description(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_description(icalproperty* prop);icalproperty* icalproperty_vanew_description(const char* v, ...);
|
||||
|
||||
/* DTEND */
|
||||
icalproperty* icalproperty_new_dtend(struct icaltimetype v);
|
||||
void icalproperty_set_dtend(icalproperty* prop, struct icaltimetype v);
|
||||
struct icaltimetype icalproperty_get_dtend(icalproperty* prop);icalproperty* icalproperty_vanew_dtend(struct icaltimetype v, ...);
|
||||
|
||||
/* DTSTAMP */
|
||||
icalproperty* icalproperty_new_dtstamp(struct icaltimetype v);
|
||||
void icalproperty_set_dtstamp(icalproperty* prop, struct icaltimetype v);
|
||||
struct icaltimetype icalproperty_get_dtstamp(icalproperty* prop);icalproperty* icalproperty_vanew_dtstamp(struct icaltimetype v, ...);
|
||||
|
||||
/* DTSTART */
|
||||
icalproperty* icalproperty_new_dtstart(struct icaltimetype v);
|
||||
void icalproperty_set_dtstart(icalproperty* prop, struct icaltimetype v);
|
||||
struct icaltimetype icalproperty_get_dtstart(icalproperty* prop);icalproperty* icalproperty_vanew_dtstart(struct icaltimetype v, ...);
|
||||
|
||||
/* DUE */
|
||||
icalproperty* icalproperty_new_due(struct icaltimetype v);
|
||||
void icalproperty_set_due(icalproperty* prop, struct icaltimetype v);
|
||||
struct icaltimetype icalproperty_get_due(icalproperty* prop);icalproperty* icalproperty_vanew_due(struct icaltimetype v, ...);
|
||||
|
||||
/* DURATION */
|
||||
icalproperty* icalproperty_new_duration(struct icaldurationtype v);
|
||||
void icalproperty_set_duration(icalproperty* prop, struct icaldurationtype v);
|
||||
struct icaldurationtype icalproperty_get_duration(icalproperty* prop);icalproperty* icalproperty_vanew_duration(struct icaldurationtype v, ...);
|
||||
|
||||
/* EXDATE */
|
||||
icalproperty* icalproperty_new_exdate(struct icaltimetype v);
|
||||
void icalproperty_set_exdate(icalproperty* prop, struct icaltimetype v);
|
||||
struct icaltimetype icalproperty_get_exdate(icalproperty* prop);icalproperty* icalproperty_vanew_exdate(struct icaltimetype v, ...);
|
||||
|
||||
/* EXRULE */
|
||||
icalproperty* icalproperty_new_exrule(struct icalrecurrencetype v);
|
||||
void icalproperty_set_exrule(icalproperty* prop, struct icalrecurrencetype v);
|
||||
struct icalrecurrencetype icalproperty_get_exrule(icalproperty* prop);icalproperty* icalproperty_vanew_exrule(struct icalrecurrencetype v, ...);
|
||||
|
||||
/* FREEBUSY */
|
||||
icalproperty* icalproperty_new_freebusy(struct icalperiodtype v);
|
||||
void icalproperty_set_freebusy(icalproperty* prop, struct icalperiodtype v);
|
||||
struct icalperiodtype icalproperty_get_freebusy(icalproperty* prop);icalproperty* icalproperty_vanew_freebusy(struct icalperiodtype v, ...);
|
||||
|
||||
/* GEO */
|
||||
icalproperty* icalproperty_new_geo(struct icalgeotype v);
|
||||
void icalproperty_set_geo(icalproperty* prop, struct icalgeotype v);
|
||||
struct icalgeotype icalproperty_get_geo(icalproperty* prop);icalproperty* icalproperty_vanew_geo(struct icalgeotype v, ...);
|
||||
|
||||
/* LAST-MODIFIED */
|
||||
icalproperty* icalproperty_new_lastmodified(struct icaltimetype v);
|
||||
void icalproperty_set_lastmodified(icalproperty* prop, struct icaltimetype v);
|
||||
struct icaltimetype icalproperty_get_lastmodified(icalproperty* prop);icalproperty* icalproperty_vanew_lastmodified(struct icaltimetype v, ...);
|
||||
|
||||
/* LOCATION */
|
||||
icalproperty* icalproperty_new_location(const char* v);
|
||||
void icalproperty_set_location(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_location(icalproperty* prop);icalproperty* icalproperty_vanew_location(const char* v, ...);
|
||||
|
||||
/* MAXRESULTS */
|
||||
icalproperty* icalproperty_new_maxresults(int v);
|
||||
void icalproperty_set_maxresults(icalproperty* prop, int v);
|
||||
int icalproperty_get_maxresults(icalproperty* prop);icalproperty* icalproperty_vanew_maxresults(int v, ...);
|
||||
|
||||
/* MAXRESULTSSIZE */
|
||||
icalproperty* icalproperty_new_maxresultssize(int v);
|
||||
void icalproperty_set_maxresultssize(icalproperty* prop, int v);
|
||||
int icalproperty_get_maxresultssize(icalproperty* prop);icalproperty* icalproperty_vanew_maxresultssize(int v, ...);
|
||||
|
||||
/* METHOD */
|
||||
icalproperty* icalproperty_new_method(enum icalproperty_method v);
|
||||
void icalproperty_set_method(icalproperty* prop, enum icalproperty_method v);
|
||||
enum icalproperty_method icalproperty_get_method(icalproperty* prop);icalproperty* icalproperty_vanew_method(enum icalproperty_method v, ...);
|
||||
|
||||
/* ORGANIZER */
|
||||
icalproperty* icalproperty_new_organizer(const char* v);
|
||||
void icalproperty_set_organizer(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_organizer(icalproperty* prop);icalproperty* icalproperty_vanew_organizer(const char* v, ...);
|
||||
|
||||
/* PERCENT-COMPLETE */
|
||||
icalproperty* icalproperty_new_percentcomplete(int v);
|
||||
void icalproperty_set_percentcomplete(icalproperty* prop, int v);
|
||||
int icalproperty_get_percentcomplete(icalproperty* prop);icalproperty* icalproperty_vanew_percentcomplete(int v, ...);
|
||||
|
||||
/* PRIORITY */
|
||||
icalproperty* icalproperty_new_priority(int v);
|
||||
void icalproperty_set_priority(icalproperty* prop, int v);
|
||||
int icalproperty_get_priority(icalproperty* prop);icalproperty* icalproperty_vanew_priority(int v, ...);
|
||||
|
||||
/* PRODID */
|
||||
icalproperty* icalproperty_new_prodid(const char* v);
|
||||
void icalproperty_set_prodid(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_prodid(icalproperty* prop);icalproperty* icalproperty_vanew_prodid(const char* v, ...);
|
||||
|
||||
/* QUERY */
|
||||
icalproperty* icalproperty_new_query(const char* v);
|
||||
void icalproperty_set_query(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_query(icalproperty* prop);icalproperty* icalproperty_vanew_query(const char* v, ...);
|
||||
|
||||
/* QUERYNAME */
|
||||
icalproperty* icalproperty_new_queryname(const char* v);
|
||||
void icalproperty_set_queryname(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_queryname(icalproperty* prop);icalproperty* icalproperty_vanew_queryname(const char* v, ...);
|
||||
|
||||
/* RDATE */
|
||||
icalproperty* icalproperty_new_rdate(struct icaldatetimeperiodtype v);
|
||||
void icalproperty_set_rdate(icalproperty* prop, struct icaldatetimeperiodtype v);
|
||||
struct icaldatetimeperiodtype icalproperty_get_rdate(icalproperty* prop);icalproperty* icalproperty_vanew_rdate(struct icaldatetimeperiodtype v, ...);
|
||||
|
||||
/* RECURRENCE-ID */
|
||||
icalproperty* icalproperty_new_recurrenceid(struct icaltimetype v);
|
||||
void icalproperty_set_recurrenceid(icalproperty* prop, struct icaltimetype v);
|
||||
struct icaltimetype icalproperty_get_recurrenceid(icalproperty* prop);icalproperty* icalproperty_vanew_recurrenceid(struct icaltimetype v, ...);
|
||||
|
||||
/* RELATED-TO */
|
||||
icalproperty* icalproperty_new_relatedto(const char* v);
|
||||
void icalproperty_set_relatedto(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_relatedto(icalproperty* prop);icalproperty* icalproperty_vanew_relatedto(const char* v, ...);
|
||||
|
||||
/* REPEAT */
|
||||
icalproperty* icalproperty_new_repeat(int v);
|
||||
void icalproperty_set_repeat(icalproperty* prop, int v);
|
||||
int icalproperty_get_repeat(icalproperty* prop);icalproperty* icalproperty_vanew_repeat(int v, ...);
|
||||
|
||||
/* REQUEST-STATUS */
|
||||
icalproperty* icalproperty_new_requeststatus(struct icalreqstattype v);
|
||||
void icalproperty_set_requeststatus(icalproperty* prop, struct icalreqstattype v);
|
||||
struct icalreqstattype icalproperty_get_requeststatus(icalproperty* prop);icalproperty* icalproperty_vanew_requeststatus(struct icalreqstattype v, ...);
|
||||
|
||||
/* RESOURCES */
|
||||
icalproperty* icalproperty_new_resources(const char* v);
|
||||
void icalproperty_set_resources(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_resources(icalproperty* prop);icalproperty* icalproperty_vanew_resources(const char* v, ...);
|
||||
|
||||
/* RRULE */
|
||||
icalproperty* icalproperty_new_rrule(struct icalrecurrencetype v);
|
||||
void icalproperty_set_rrule(icalproperty* prop, struct icalrecurrencetype v);
|
||||
struct icalrecurrencetype icalproperty_get_rrule(icalproperty* prop);icalproperty* icalproperty_vanew_rrule(struct icalrecurrencetype v, ...);
|
||||
|
||||
/* SCOPE */
|
||||
icalproperty* icalproperty_new_scope(const char* v);
|
||||
void icalproperty_set_scope(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_scope(icalproperty* prop);icalproperty* icalproperty_vanew_scope(const char* v, ...);
|
||||
|
||||
/* SEQUENCE */
|
||||
icalproperty* icalproperty_new_sequence(int v);
|
||||
void icalproperty_set_sequence(icalproperty* prop, int v);
|
||||
int icalproperty_get_sequence(icalproperty* prop);icalproperty* icalproperty_vanew_sequence(int v, ...);
|
||||
|
||||
/* STATUS */
|
||||
icalproperty* icalproperty_new_status(enum icalproperty_status v);
|
||||
void icalproperty_set_status(icalproperty* prop, enum icalproperty_status v);
|
||||
enum icalproperty_status icalproperty_get_status(icalproperty* prop);icalproperty* icalproperty_vanew_status(enum icalproperty_status v, ...);
|
||||
|
||||
/* SUMMARY */
|
||||
icalproperty* icalproperty_new_summary(const char* v);
|
||||
void icalproperty_set_summary(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_summary(icalproperty* prop);icalproperty* icalproperty_vanew_summary(const char* v, ...);
|
||||
|
||||
/* TARGET */
|
||||
icalproperty* icalproperty_new_target(const char* v);
|
||||
void icalproperty_set_target(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_target(icalproperty* prop);icalproperty* icalproperty_vanew_target(const char* v, ...);
|
||||
|
||||
/* TRANSP */
|
||||
icalproperty* icalproperty_new_transp(const char* v);
|
||||
void icalproperty_set_transp(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_transp(icalproperty* prop);icalproperty* icalproperty_vanew_transp(const char* v, ...);
|
||||
|
||||
/* TRIGGER */
|
||||
icalproperty* icalproperty_new_trigger(struct icaltriggertype v);
|
||||
void icalproperty_set_trigger(icalproperty* prop, struct icaltriggertype v);
|
||||
struct icaltriggertype icalproperty_get_trigger(icalproperty* prop);icalproperty* icalproperty_vanew_trigger(struct icaltriggertype v, ...);
|
||||
|
||||
/* TZID */
|
||||
icalproperty* icalproperty_new_tzid(const char* v);
|
||||
void icalproperty_set_tzid(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_tzid(icalproperty* prop);icalproperty* icalproperty_vanew_tzid(const char* v, ...);
|
||||
|
||||
/* TZNAME */
|
||||
icalproperty* icalproperty_new_tzname(const char* v);
|
||||
void icalproperty_set_tzname(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_tzname(icalproperty* prop);icalproperty* icalproperty_vanew_tzname(const char* v, ...);
|
||||
|
||||
/* TZOFFSETFROM */
|
||||
icalproperty* icalproperty_new_tzoffsetfrom(int v);
|
||||
void icalproperty_set_tzoffsetfrom(icalproperty* prop, int v);
|
||||
int icalproperty_get_tzoffsetfrom(icalproperty* prop);icalproperty* icalproperty_vanew_tzoffsetfrom(int v, ...);
|
||||
|
||||
/* TZOFFSETTO */
|
||||
icalproperty* icalproperty_new_tzoffsetto(int v);
|
||||
void icalproperty_set_tzoffsetto(icalproperty* prop, int v);
|
||||
int icalproperty_get_tzoffsetto(icalproperty* prop);icalproperty* icalproperty_vanew_tzoffsetto(int v, ...);
|
||||
|
||||
/* TZURL */
|
||||
icalproperty* icalproperty_new_tzurl(const char* v);
|
||||
void icalproperty_set_tzurl(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_tzurl(icalproperty* prop);icalproperty* icalproperty_vanew_tzurl(const char* v, ...);
|
||||
|
||||
/* UID */
|
||||
icalproperty* icalproperty_new_uid(const char* v);
|
||||
void icalproperty_set_uid(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_uid(icalproperty* prop);icalproperty* icalproperty_vanew_uid(const char* v, ...);
|
||||
|
||||
/* URL */
|
||||
icalproperty* icalproperty_new_url(const char* v);
|
||||
void icalproperty_set_url(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_url(icalproperty* prop);icalproperty* icalproperty_vanew_url(const char* v, ...);
|
||||
|
||||
/* VERSION */
|
||||
icalproperty* icalproperty_new_version(const char* v);
|
||||
void icalproperty_set_version(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_version(icalproperty* prop);icalproperty* icalproperty_vanew_version(const char* v, ...);
|
||||
|
||||
/* X */
|
||||
icalproperty* icalproperty_new_x(const char* v);
|
||||
void icalproperty_set_x(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_x(icalproperty* prop);icalproperty* icalproperty_vanew_x(const char* v, ...);
|
||||
|
||||
/* X-LIC-CLASS */
|
||||
icalproperty* icalproperty_new_xlicclass(enum icalproperty_xlicclass v);
|
||||
void icalproperty_set_xlicclass(icalproperty* prop, enum icalproperty_xlicclass v);
|
||||
enum icalproperty_xlicclass icalproperty_get_xlicclass(icalproperty* prop);icalproperty* icalproperty_vanew_xlicclass(enum icalproperty_xlicclass v, ...);
|
||||
|
||||
/* X-LIC-CLUSTERCOUNT */
|
||||
icalproperty* icalproperty_new_xlicclustercount(const char* v);
|
||||
void icalproperty_set_xlicclustercount(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_xlicclustercount(icalproperty* prop);icalproperty* icalproperty_vanew_xlicclustercount(const char* v, ...);
|
||||
|
||||
/* X-LIC-ERROR */
|
||||
icalproperty* icalproperty_new_xlicerror(const char* v);
|
||||
void icalproperty_set_xlicerror(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_xlicerror(icalproperty* prop);icalproperty* icalproperty_vanew_xlicerror(const char* v, ...);
|
||||
|
||||
/* X-LIC-MIMECHARSET */
|
||||
icalproperty* icalproperty_new_xlicmimecharset(const char* v);
|
||||
void icalproperty_set_xlicmimecharset(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_xlicmimecharset(icalproperty* prop);icalproperty* icalproperty_vanew_xlicmimecharset(const char* v, ...);
|
||||
|
||||
/* X-LIC-MIMECID */
|
||||
icalproperty* icalproperty_new_xlicmimecid(const char* v);
|
||||
void icalproperty_set_xlicmimecid(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_xlicmimecid(icalproperty* prop);icalproperty* icalproperty_vanew_xlicmimecid(const char* v, ...);
|
||||
|
||||
/* X-LIC-MIMECONTENTTYPE */
|
||||
icalproperty* icalproperty_new_xlicmimecontenttype(const char* v);
|
||||
void icalproperty_set_xlicmimecontenttype(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_xlicmimecontenttype(icalproperty* prop);icalproperty* icalproperty_vanew_xlicmimecontenttype(const char* v, ...);
|
||||
|
||||
/* X-LIC-MIMEENCODING */
|
||||
icalproperty* icalproperty_new_xlicmimeencoding(const char* v);
|
||||
void icalproperty_set_xlicmimeencoding(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_xlicmimeencoding(icalproperty* prop);icalproperty* icalproperty_vanew_xlicmimeencoding(const char* v, ...);
|
||||
|
||||
/* X-LIC-MIMEFILENAME */
|
||||
icalproperty* icalproperty_new_xlicmimefilename(const char* v);
|
||||
void icalproperty_set_xlicmimefilename(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_xlicmimefilename(icalproperty* prop);icalproperty* icalproperty_vanew_xlicmimefilename(const char* v, ...);
|
||||
|
||||
/* X-LIC-MIMEOPTINFO */
|
||||
icalproperty* icalproperty_new_xlicmimeoptinfo(const char* v);
|
||||
void icalproperty_set_xlicmimeoptinfo(icalproperty* prop, const char* v);
|
||||
const char* icalproperty_get_xlicmimeoptinfo(icalproperty* prop);icalproperty* icalproperty_vanew_xlicmimeoptinfo(const char* v, ...);
|
||||
|
||||
|
||||
#endif /*ICALPROPERTY_H*/
|
|
@ -0,0 +1,997 @@
|
|||
/* -*- Mode: C -*- */
|
||||
/*======================================================================
|
||||
FILE: icalvalue.c
|
||||
CREATOR: eric 02 May 1999
|
||||
|
||||
$Id: icalderivedvalue.c,v 1.1 2001-12-21 19:21:42 mikep%oeone.com Exp $
|
||||
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of either:
|
||||
|
||||
The LGPL as published by the Free Software Foundation, version
|
||||
2.1, available at: http://www.fsf.org/copyleft/lesser.html
|
||||
|
||||
Or:
|
||||
|
||||
The Mozilla Public License Version 1.0. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
The original code is icalvalue.c
|
||||
|
||||
Contributions from:
|
||||
Graham Davison (g.m.davison@computer.org)
|
||||
|
||||
|
||||
======================================================================*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "icalerror.h"
|
||||
#include "icalmemory.h"
|
||||
#include "icalparser.h"
|
||||
#include "icalenums.h"
|
||||
|
||||
#include "icalvalueimpl.h"
|
||||
|
||||
#include <stdlib.h> /* for malloc */
|
||||
#include <stdio.h> /* for sprintf */
|
||||
#include <string.h> /* For memset, others */
|
||||
#include <stddef.h> /* For offsetof() macro */
|
||||
#include <errno.h>
|
||||
#include <time.h> /* for mktime */
|
||||
#include <stdlib.h> /* for atoi and atof */
|
||||
#include <limits.h> /* for SHRT_MAX */
|
||||
|
||||
|
||||
|
||||
#define TMP_BUF_SIZE 1024
|
||||
|
||||
struct icalvalue_impl* icalvalue_new_impl(icalvalue_kind kind);
|
||||
|
||||
/* This map associates each of the value types with its string
|
||||
representation */
|
||||
struct icalvalue_kind_map {
|
||||
icalvalue_kind kind;
|
||||
char name[20];
|
||||
};
|
||||
|
||||
extern struct icalvalue_kind_map value_map[];
|
||||
|
||||
const char* icalvalue_kind_to_string(icalvalue_kind kind)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; value_map[i].kind != ICAL_NO_VALUE; i++) {
|
||||
if (value_map[i].kind == kind) {
|
||||
return value_map[i].name;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
icalvalue_kind icalvalue_string_to_kind(const char* str)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; value_map[i].kind != ICAL_NO_VALUE; i++) {
|
||||
if (strcmp(value_map[i].name,str) == 0) {
|
||||
return value_map[i].kind;
|
||||
}
|
||||
}
|
||||
|
||||
return value_map[i].kind;
|
||||
|
||||
}
|
||||
|
||||
icalvalue* icalvalue_new_x (const char* v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_X_VALUE);
|
||||
icalerror_check_arg_rz( (v!=0),"v");
|
||||
|
||||
icalvalue_set_x((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_x(icalvalue* value, const char* v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
icalerror_check_arg_rv( (v!=0),"v");
|
||||
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
if(impl->x_value!=0) {free((void*)impl->x_value);}
|
||||
|
||||
impl->x_value = icalmemory_strdup(v);
|
||||
|
||||
if (impl->x_value == 0){
|
||||
errno = ENOMEM;
|
||||
}
|
||||
|
||||
}
|
||||
const char* icalvalue_get_x(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_X_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->x_value;
|
||||
}
|
||||
|
||||
/* Recur is a special case, so it is not auto generated. */
|
||||
icalvalue*
|
||||
icalvalue_new_recur (struct icalrecurrencetype v)
|
||||
{
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_RECUR_VALUE);
|
||||
|
||||
icalvalue_set_recur((icalvalue*)impl,v);
|
||||
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
|
||||
void
|
||||
icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v)
|
||||
{
|
||||
struct icalvalue_impl* impl;
|
||||
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_RECUR_VALUE);
|
||||
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
if (impl->data.v_recur != 0){
|
||||
free(impl->data.v_recur);
|
||||
impl->data.v_recur = 0;
|
||||
}
|
||||
|
||||
impl->data.v_recur = malloc(sizeof(struct icalrecurrencetype));
|
||||
|
||||
if (impl->data.v_recur == 0){
|
||||
icalerror_set_errno(ICAL_NEWFAILED_ERROR);
|
||||
return;
|
||||
} else {
|
||||
memcpy(impl->data.v_recur, &v, sizeof(struct icalrecurrencetype));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
struct icalrecurrencetype
|
||||
icalvalue_get_recur(icalvalue* value)
|
||||
{
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_RECUR_VALUE);
|
||||
|
||||
return *(((struct icalvalue_impl*)value)->data.v_recur);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
icalvalue*
|
||||
icalvalue_new_trigger (struct icaltriggertype v)
|
||||
{
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_TRIGGER_VALUE);
|
||||
|
||||
icalvalue_set_trigger((icalvalue*)impl,v);
|
||||
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
|
||||
void
|
||||
icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v)
|
||||
{
|
||||
struct icalvalue_impl* impl;
|
||||
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
if(!icaltime_is_null_time(v.time)){
|
||||
icalvalue_set_datetime((icalvalue*)impl,v.time);
|
||||
impl->kind = ICAL_DATETIME_VALUE;
|
||||
} else {
|
||||
icalvalue_set_duration((icalvalue*)impl,v.duration);
|
||||
impl->kind = ICAL_DURATION_VALUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
struct icaltriggertype
|
||||
icalvalue_get_trigger(icalvalue* value)
|
||||
{
|
||||
struct icalvalue_impl *impl = (struct icalvalue_impl*)value;
|
||||
struct icaltriggertype tr;
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
|
||||
if(impl->kind == ICAL_DATETIME_VALUE){
|
||||
tr.duration = icaldurationtype_from_int(0);
|
||||
tr.time = impl->data.v_time;
|
||||
} else if(impl->kind == ICAL_DURATION_VALUE){
|
||||
tr.time = icaltime_null_time();
|
||||
tr.duration = impl->data.v_duration;
|
||||
} else {
|
||||
tr.duration = icaldurationtype_from_int(0);
|
||||
tr.time = icaltime_null_time();
|
||||
icalerror_set_errno(ICAL_BADARG_ERROR);
|
||||
}
|
||||
|
||||
return tr;
|
||||
}
|
||||
|
||||
/* DATE-TIME-PERIOD is a special case, and is not auto generated */
|
||||
|
||||
icalvalue*
|
||||
icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v)
|
||||
{
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_DATETIMEPERIOD_VALUE);
|
||||
|
||||
icalvalue_set_datetimeperiod((icalvalue*)impl,v);
|
||||
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
|
||||
void
|
||||
icalvalue_set_datetimeperiod(icalvalue* value, struct icaldatetimeperiodtype v)
|
||||
{
|
||||
struct icalvalue_impl* impl = (struct icalvalue_impl*)value;
|
||||
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_DATETIMEPERIOD_VALUE);
|
||||
|
||||
if(!icaltime_is_null_time(v.time)){
|
||||
if(!icaltime_is_valid_time(v.time)){
|
||||
icalerror_set_errno(ICAL_BADARG_ERROR);
|
||||
return;
|
||||
}
|
||||
impl->kind = ICAL_DATETIME_VALUE;
|
||||
icalvalue_set_datetime(impl,v.time);
|
||||
} else if (!icalperiodtype_is_null_period(v.period)) {
|
||||
if(!icalperiodtype_is_valid_period(v.period)){
|
||||
icalerror_set_errno(ICAL_BADARG_ERROR);
|
||||
return;
|
||||
}
|
||||
impl->kind = ICAL_PERIOD_VALUE;
|
||||
icalvalue_set_period(impl,v.period);
|
||||
} else {
|
||||
icalerror_set_errno(ICAL_BADARG_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
struct icaldatetimeperiodtype
|
||||
icalvalue_get_datetimeperiod(icalvalue* value)
|
||||
{
|
||||
struct icaldatetimeperiodtype dtp;
|
||||
|
||||
struct icalvalue_impl* impl = (struct icalvalue_impl*)value;
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_DATETIMEPERIOD_VALUE);
|
||||
|
||||
if(impl->kind == ICAL_DATETIME_VALUE){
|
||||
dtp.period = icalperiodtype_null_period();
|
||||
dtp.time = impl->data.v_time;
|
||||
} else if(impl->kind == ICAL_PERIOD_VALUE) {
|
||||
dtp.period = impl->data.v_period;
|
||||
dtp.time = icaltime_null_time();
|
||||
} else {
|
||||
dtp.period = icalperiodtype_null_period();
|
||||
dtp.time = icaltime_null_time();
|
||||
icalerror_set_errno(ICAL_BADARG_ERROR);
|
||||
}
|
||||
|
||||
return dtp;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* The remaining interfaces are 'new', 'set' and 'get' for each of the value
|
||||
types */
|
||||
|
||||
|
||||
/* Everything below this line is machine generated. Do not edit. */
|
||||
static struct icalvalue_kind_map value_map[]={
|
||||
{ICAL_BOOLEAN_VALUE,"BOOLEAN"},
|
||||
{ICAL_UTCOFFSET_VALUE,"UTC-OFFSET"},
|
||||
{ICAL_XLICCLASS_VALUE,"X-LIC-CLASS"},
|
||||
{ICAL_RECUR_VALUE,"RECUR"},
|
||||
{ICAL_METHOD_VALUE,"METHOD"},
|
||||
{ICAL_CALADDRESS_VALUE,"CAL-ADDRESS"},
|
||||
{ICAL_PERIOD_VALUE,"PERIOD"},
|
||||
{ICAL_STATUS_VALUE,"STATUS"},
|
||||
{ICAL_BINARY_VALUE,"BINARY"},
|
||||
{ICAL_TEXT_VALUE,"TEXT"},
|
||||
{ICAL_DURATION_VALUE,"DURATION"},
|
||||
{ICAL_DATETIMEPERIOD_VALUE,"DATE-TIME-PERIOD"},
|
||||
{ICAL_INTEGER_VALUE,"INTEGER"},
|
||||
{ICAL_URI_VALUE,"URI"},
|
||||
{ICAL_TRIGGER_VALUE,"TRIGGER"},
|
||||
{ICAL_ATTACH_VALUE,"ATTACH"},
|
||||
{ICAL_CLASS_VALUE,"CLASS"},
|
||||
{ICAL_FLOAT_VALUE,"FLOAT"},
|
||||
{ICAL_QUERY_VALUE,"QUERY"},
|
||||
{ICAL_STRING_VALUE,"STRING"},
|
||||
{ICAL_TRANSP_VALUE,"TRANSP"},
|
||||
{ICAL_X_VALUE,"X"},
|
||||
{ICAL_DATETIME_VALUE,"DATE-TIME"},
|
||||
{ICAL_REQUESTSTATUS_VALUE,"REQUEST-STATUS"},
|
||||
{ICAL_GEO_VALUE,"GEO"},
|
||||
{ICAL_DATE_VALUE,"DATE"},
|
||||
{ICAL_ACTION_VALUE,"ACTION"},
|
||||
{ICAL_NO_VALUE,""}
|
||||
};
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_boolean (int v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_BOOLEAN_VALUE);
|
||||
|
||||
icalvalue_set_boolean((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_boolean(icalvalue* value, int v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_BOOLEAN_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_int = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
int icalvalue_get_boolean(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_BOOLEAN_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_int;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_utcoffset (int v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_UTCOFFSET_VALUE);
|
||||
|
||||
icalvalue_set_utcoffset((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_utcoffset(icalvalue* value, int v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_UTCOFFSET_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_int = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
int icalvalue_get_utcoffset(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_UTCOFFSET_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_int;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_xlicclass (enum icalproperty_xlicclass v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_XLICCLASS_VALUE);
|
||||
|
||||
icalvalue_set_xlicclass((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_xlicclass(icalvalue* value, enum icalproperty_xlicclass v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_XLICCLASS_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_enum = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
enum icalproperty_xlicclass icalvalue_get_xlicclass(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_XLICCLASS_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_enum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_method (enum icalproperty_method v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_METHOD_VALUE);
|
||||
|
||||
icalvalue_set_method((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_method(icalvalue* value, enum icalproperty_method v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_METHOD_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_enum = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
enum icalproperty_method icalvalue_get_method(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_METHOD_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_enum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_caladdress (const char* v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_CALADDRESS_VALUE);
|
||||
icalerror_check_arg_rz( (v!=0),"v");
|
||||
|
||||
icalvalue_set_caladdress((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_caladdress(icalvalue* value, const char* v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
icalerror_check_arg_rv( (v!=0),"v");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_CALADDRESS_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
if(impl->data.v_string!=0) {free((void*)impl->data.v_string);}
|
||||
|
||||
|
||||
impl->data.v_string = icalmemory_strdup(v);
|
||||
|
||||
if (impl->data.v_string == 0){
|
||||
errno = ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
const char* icalvalue_get_caladdress(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_CALADDRESS_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_period (struct icalperiodtype v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_PERIOD_VALUE);
|
||||
|
||||
icalvalue_set_period((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_period(icalvalue* value, struct icalperiodtype v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_PERIOD_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_period = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
struct icalperiodtype icalvalue_get_period(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_PERIOD_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_period;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_status (enum icalproperty_status v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_STATUS_VALUE);
|
||||
|
||||
icalvalue_set_status((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_status(icalvalue* value, enum icalproperty_status v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_STATUS_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_enum = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
enum icalproperty_status icalvalue_get_status(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_STATUS_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_enum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_binary (const char* v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_BINARY_VALUE);
|
||||
icalerror_check_arg_rz( (v!=0),"v");
|
||||
|
||||
icalvalue_set_binary((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_binary(icalvalue* value, const char* v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
icalerror_check_arg_rv( (v!=0),"v");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_BINARY_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
if(impl->data.v_string!=0) {free((void*)impl->data.v_string);}
|
||||
|
||||
|
||||
impl->data.v_string = icalmemory_strdup(v);
|
||||
|
||||
if (impl->data.v_string == 0){
|
||||
errno = ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
const char* icalvalue_get_binary(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_BINARY_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_text (const char* v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_TEXT_VALUE);
|
||||
icalerror_check_arg_rz( (v!=0),"v");
|
||||
|
||||
icalvalue_set_text((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_text(icalvalue* value, const char* v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
icalerror_check_arg_rv( (v!=0),"v");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_TEXT_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
if(impl->data.v_string!=0) {free((void*)impl->data.v_string);}
|
||||
|
||||
|
||||
impl->data.v_string = icalmemory_strdup(v);
|
||||
|
||||
if (impl->data.v_string == 0){
|
||||
errno = ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
const char* icalvalue_get_text(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_TEXT_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_duration (struct icaldurationtype v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_DURATION_VALUE);
|
||||
|
||||
icalvalue_set_duration((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_duration(icalvalue* value, struct icaldurationtype v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_DURATION_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_duration = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
struct icaldurationtype icalvalue_get_duration(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_DURATION_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_duration;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_integer (int v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_INTEGER_VALUE);
|
||||
|
||||
icalvalue_set_integer((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_integer(icalvalue* value, int v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_INTEGER_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_int = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
int icalvalue_get_integer(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_INTEGER_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_int;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_uri (const char* v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_URI_VALUE);
|
||||
icalerror_check_arg_rz( (v!=0),"v");
|
||||
|
||||
icalvalue_set_uri((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_uri(icalvalue* value, const char* v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
icalerror_check_arg_rv( (v!=0),"v");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_URI_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
if(impl->data.v_string!=0) {free((void*)impl->data.v_string);}
|
||||
|
||||
|
||||
impl->data.v_string = icalmemory_strdup(v);
|
||||
|
||||
if (impl->data.v_string == 0){
|
||||
errno = ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
const char* icalvalue_get_uri(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_URI_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_attach (struct icalattachtype v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_ATTACH_VALUE);
|
||||
|
||||
icalvalue_set_attach((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_attach(icalvalue* value, struct icalattachtype v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_ATTACH_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_attach = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
struct icalattachtype icalvalue_get_attach(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_ATTACH_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_attach;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_class (enum icalproperty_class v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_CLASS_VALUE);
|
||||
|
||||
icalvalue_set_class((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_class(icalvalue* value, enum icalproperty_class v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_CLASS_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_enum = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
enum icalproperty_class icalvalue_get_class(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_CLASS_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_enum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_float (float v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_FLOAT_VALUE);
|
||||
|
||||
icalvalue_set_float((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_float(icalvalue* value, float v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_FLOAT_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_float = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
float icalvalue_get_float(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_FLOAT_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_float;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_query (const char* v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_QUERY_VALUE);
|
||||
icalerror_check_arg_rz( (v!=0),"v");
|
||||
|
||||
icalvalue_set_query((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_query(icalvalue* value, const char* v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
icalerror_check_arg_rv( (v!=0),"v");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_QUERY_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
if(impl->data.v_string!=0) {free((void*)impl->data.v_string);}
|
||||
|
||||
|
||||
impl->data.v_string = icalmemory_strdup(v);
|
||||
|
||||
if (impl->data.v_string == 0){
|
||||
errno = ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
const char* icalvalue_get_query(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_QUERY_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_string (const char* v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_STRING_VALUE);
|
||||
icalerror_check_arg_rz( (v!=0),"v");
|
||||
|
||||
icalvalue_set_string((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_string(icalvalue* value, const char* v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
icalerror_check_arg_rv( (v!=0),"v");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_STRING_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
if(impl->data.v_string!=0) {free((void*)impl->data.v_string);}
|
||||
|
||||
|
||||
impl->data.v_string = icalmemory_strdup(v);
|
||||
|
||||
if (impl->data.v_string == 0){
|
||||
errno = ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
const char* icalvalue_get_string(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_STRING_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_transp (enum icalproperty_transp v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_TRANSP_VALUE);
|
||||
|
||||
icalvalue_set_transp((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_transp(icalvalue* value, enum icalproperty_transp v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_TRANSP_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_enum = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
enum icalproperty_transp icalvalue_get_transp(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_TRANSP_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_enum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_datetime (struct icaltimetype v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_DATETIME_VALUE);
|
||||
|
||||
icalvalue_set_datetime((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_datetime(icalvalue* value, struct icaltimetype v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_DATETIME_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_time = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
struct icaltimetype icalvalue_get_datetime(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_DATETIME_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_time;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_requeststatus (struct icalreqstattype v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_REQUESTSTATUS_VALUE);
|
||||
|
||||
icalvalue_set_requeststatus((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_requeststatus(icalvalue* value, struct icalreqstattype v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_REQUESTSTATUS_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_requeststatus = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
struct icalreqstattype icalvalue_get_requeststatus(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_REQUESTSTATUS_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_requeststatus;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_geo (struct icalgeotype v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_GEO_VALUE);
|
||||
|
||||
icalvalue_set_geo((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_geo(icalvalue* value, struct icalgeotype v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_GEO_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_geo = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
struct icalgeotype icalvalue_get_geo(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_GEO_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_geo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_date (struct icaltimetype v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_DATE_VALUE);
|
||||
|
||||
icalvalue_set_date((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_date(icalvalue* value, struct icaltimetype v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_DATE_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_time = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
struct icaltimetype icalvalue_get_date(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_DATE_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_time;
|
||||
}
|
||||
|
||||
|
||||
|
||||
icalvalue* icalvalue_new_action (enum icalproperty_action v){
|
||||
struct icalvalue_impl* impl = icalvalue_new_impl(ICAL_ACTION_VALUE);
|
||||
|
||||
icalvalue_set_action((icalvalue*)impl,v);
|
||||
return (icalvalue*)impl;
|
||||
}
|
||||
void icalvalue_set_action(icalvalue* value, enum icalproperty_action v) {
|
||||
struct icalvalue_impl* impl;
|
||||
icalerror_check_arg_rv( (value!=0),"value");
|
||||
|
||||
icalerror_check_value_type(value, ICAL_ACTION_VALUE);
|
||||
impl = (struct icalvalue_impl*)value;
|
||||
|
||||
|
||||
impl->data.v_enum = v;
|
||||
|
||||
icalvalue_reset_kind(impl);
|
||||
}
|
||||
enum icalproperty_action icalvalue_get_action(icalvalue* value) {
|
||||
|
||||
icalerror_check_arg( (value!=0),"value");
|
||||
icalerror_check_value_type(value, ICAL_ACTION_VALUE);
|
||||
return ((struct icalvalue_impl*)value)->data.v_enum;
|
||||
}
|
|
@ -0,0 +1,324 @@
|
|||
/* -*- Mode: C -*- */
|
||||
/*======================================================================
|
||||
FILE: icalvalue.h
|
||||
CREATOR: eric 20 March 1999
|
||||
|
||||
|
||||
$Id: icalderivedvalue.h,v 1.1 2001-12-21 19:21:43 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
|
||||
|
||||
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of either:
|
||||
|
||||
The LGPL as published by the Free Software Foundation, version
|
||||
2.1, available at: http://www.fsf.org/copyleft/lesser.html
|
||||
|
||||
Or:
|
||||
|
||||
The Mozilla Public License Version 1.0. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
The original code is icalvalue.h
|
||||
|
||||
======================================================================*/
|
||||
|
||||
#ifndef ICALDERIVEDVALUE_H
|
||||
#define ICALDERIVEDVALUE_H
|
||||
|
||||
#include "icaltypes.h"
|
||||
#include "icalrecur.h"
|
||||
#include "icaltime.h"
|
||||
#include "icalduration.h"
|
||||
#include "icalperiod.h"
|
||||
|
||||
typedef void icalvalue;
|
||||
|
||||
|
||||
|
||||
void icalvalue_set_x(icalvalue* value, const char* v);
|
||||
icalvalue* icalvalue_new_x(const char* v);
|
||||
const char* icalvalue_get_x(icalvalue* value);
|
||||
|
||||
icalvalue* icalvalue_new_recur (struct icalrecurrencetype v);
|
||||
void icalvalue_set_recur(icalvalue* value, struct icalrecurrencetype v);
|
||||
struct icalrecurrencetype icalvalue_get_recur(icalvalue* value);
|
||||
|
||||
icalvalue* icalvalue_new_trigger (struct icaltriggertype v);
|
||||
void icalvalue_set_trigger(icalvalue* value, struct icaltriggertype v);
|
||||
struct icaltriggertype icalvalue_get_trigger(icalvalue* value);
|
||||
|
||||
icalvalue* icalvalue_new_datetimeperiod (struct icaldatetimeperiodtype v);
|
||||
void icalvalue_set_datetimeperiod(icalvalue* value, struct icaldatetimeperiodtype v);
|
||||
struct icaldatetimeperiodtype icalvalue_get_datetimeperiod(icalvalue* value);
|
||||
|
||||
void icalvalue_reset_kind(icalvalue* value);
|
||||
|
||||
/* Everything below this line is machine generated. Do not edit. */
|
||||
typedef enum icalvalue_kind {
|
||||
ICAL_ANY_VALUE=5000,
|
||||
ICAL_BOOLEAN_VALUE=5001,
|
||||
ICAL_UTCOFFSET_VALUE=5002,
|
||||
ICAL_XLICCLASS_VALUE=5003,
|
||||
ICAL_RECUR_VALUE=5004,
|
||||
ICAL_METHOD_VALUE=5005,
|
||||
ICAL_CALADDRESS_VALUE=5006,
|
||||
ICAL_PERIOD_VALUE=5007,
|
||||
ICAL_STATUS_VALUE=5008,
|
||||
ICAL_BINARY_VALUE=5009,
|
||||
ICAL_TEXT_VALUE=5010,
|
||||
ICAL_DURATION_VALUE=5011,
|
||||
ICAL_DATETIMEPERIOD_VALUE=5012,
|
||||
ICAL_INTEGER_VALUE=5013,
|
||||
ICAL_URI_VALUE=5014,
|
||||
ICAL_TRIGGER_VALUE=5015,
|
||||
ICAL_ATTACH_VALUE=5016,
|
||||
ICAL_CLASS_VALUE=5017,
|
||||
ICAL_FLOAT_VALUE=5018,
|
||||
ICAL_QUERY_VALUE=5019,
|
||||
ICAL_STRING_VALUE=5020,
|
||||
ICAL_TRANSP_VALUE=5021,
|
||||
ICAL_X_VALUE=5022,
|
||||
ICAL_DATETIME_VALUE=5023,
|
||||
ICAL_REQUESTSTATUS_VALUE=5024,
|
||||
ICAL_GEO_VALUE=5025,
|
||||
ICAL_DATE_VALUE=5026,
|
||||
ICAL_ACTION_VALUE=5027,
|
||||
ICAL_NO_VALUE=5028
|
||||
} icalvalue_kind ;
|
||||
|
||||
#define ICALPROPERTY_FIRST_ENUM 10000
|
||||
|
||||
typedef enum icalproperty_action {
|
||||
ICAL_ACTION_X = 10000,
|
||||
ICAL_ACTION_AUDIO = 10001,
|
||||
ICAL_ACTION_DISPLAY = 10002,
|
||||
ICAL_ACTION_EMAIL = 10003,
|
||||
ICAL_ACTION_PROCEDURE = 10004,
|
||||
ICAL_ACTION_NONE = 10005
|
||||
} icalproperty_action;
|
||||
|
||||
typedef enum icalproperty_class {
|
||||
ICAL_CLASS_X = 10006,
|
||||
ICAL_CLASS_PUBLIC = 10007,
|
||||
ICAL_CLASS_PRIVATE = 10008,
|
||||
ICAL_CLASS_CONFIDENTIAL = 10009,
|
||||
ICAL_CLASS_NONE = 10010
|
||||
} icalproperty_class;
|
||||
|
||||
typedef enum icalproperty_method {
|
||||
ICAL_METHOD_X = 10011,
|
||||
ICAL_METHOD_PUBLISH = 10012,
|
||||
ICAL_METHOD_REQUEST = 10013,
|
||||
ICAL_METHOD_REPLY = 10014,
|
||||
ICAL_METHOD_ADD = 10015,
|
||||
ICAL_METHOD_CANCEL = 10016,
|
||||
ICAL_METHOD_REFRESH = 10017,
|
||||
ICAL_METHOD_COUNTER = 10018,
|
||||
ICAL_METHOD_DECLINECOUNTER = 10019,
|
||||
ICAL_METHOD_CREATE = 10020,
|
||||
ICAL_METHOD_READ = 10021,
|
||||
ICAL_METHOD_RESPONSE = 10022,
|
||||
ICAL_METHOD_MOVE = 10023,
|
||||
ICAL_METHOD_MODIFY = 10024,
|
||||
ICAL_METHOD_GENERATEUID = 10025,
|
||||
ICAL_METHOD_DELETE = 10026,
|
||||
ICAL_METHOD_NONE = 10027
|
||||
} icalproperty_method;
|
||||
|
||||
typedef enum icalproperty_status {
|
||||
ICAL_STATUS_X = 10028,
|
||||
ICAL_STATUS_TENTATIVE = 10029,
|
||||
ICAL_STATUS_CONFIRMED = 10030,
|
||||
ICAL_STATUS_COMPLETED = 10031,
|
||||
ICAL_STATUS_NEEDSACTION = 10032,
|
||||
ICAL_STATUS_CANCELLED = 10033,
|
||||
ICAL_STATUS_INPROCESS = 10034,
|
||||
ICAL_STATUS_DRAFT = 10035,
|
||||
ICAL_STATUS_FINAL = 10036,
|
||||
ICAL_STATUS_NONE = 10037
|
||||
} icalproperty_status;
|
||||
|
||||
typedef enum icalproperty_transp {
|
||||
ICAL_TRANSP_X = 10038,
|
||||
ICAL_TRANSP_OPAQUE = 10039,
|
||||
ICAL_TRANSP_TRANSPARENT = 10040,
|
||||
ICAL_TRANSP_NONE = 10041
|
||||
} icalproperty_transp;
|
||||
|
||||
typedef enum icalproperty_xlicclass {
|
||||
ICAL_XLICCLASS_X = 10042,
|
||||
ICAL_XLICCLASS_PUBLISHNEW = 10043,
|
||||
ICAL_XLICCLASS_PUBLISHUPDATE = 10044,
|
||||
ICAL_XLICCLASS_PUBLISHFREEBUSY = 10045,
|
||||
ICAL_XLICCLASS_REQUESTNEW = 10046,
|
||||
ICAL_XLICCLASS_REQUESTUPDATE = 10047,
|
||||
ICAL_XLICCLASS_REQUESTRESCHEDULE = 10048,
|
||||
ICAL_XLICCLASS_REQUESTDELEGATE = 10049,
|
||||
ICAL_XLICCLASS_REQUESTNEWORGANIZER = 10050,
|
||||
ICAL_XLICCLASS_REQUESTFORWARD = 10051,
|
||||
ICAL_XLICCLASS_REQUESTSTATUS = 10052,
|
||||
ICAL_XLICCLASS_REQUESTFREEBUSY = 10053,
|
||||
ICAL_XLICCLASS_REPLYACCEPT = 10054,
|
||||
ICAL_XLICCLASS_REPLYDECLINE = 10055,
|
||||
ICAL_XLICCLASS_REPLYDELEGATE = 10056,
|
||||
ICAL_XLICCLASS_REPLYCRASHERACCEPT = 10057,
|
||||
ICAL_XLICCLASS_REPLYCRASHERDECLINE = 10058,
|
||||
ICAL_XLICCLASS_ADDINSTANCE = 10059,
|
||||
ICAL_XLICCLASS_CANCELEVENT = 10060,
|
||||
ICAL_XLICCLASS_CANCELINSTANCE = 10061,
|
||||
ICAL_XLICCLASS_CANCELALL = 10062,
|
||||
ICAL_XLICCLASS_REFRESH = 10063,
|
||||
ICAL_XLICCLASS_COUNTER = 10064,
|
||||
ICAL_XLICCLASS_DECLINECOUNTER = 10065,
|
||||
ICAL_XLICCLASS_MALFORMED = 10066,
|
||||
ICAL_XLICCLASS_OBSOLETE = 10067,
|
||||
ICAL_XLICCLASS_MISSEQUENCED = 10068,
|
||||
ICAL_XLICCLASS_UNKNOWN = 10069,
|
||||
ICAL_XLICCLASS_NONE = 10070
|
||||
} icalproperty_xlicclass;
|
||||
|
||||
#define ICALPROPERTY_LAST_ENUM 10071
|
||||
|
||||
|
||||
/* BOOLEAN */
|
||||
icalvalue* icalvalue_new_boolean(int v);
|
||||
int icalvalue_get_boolean(icalvalue* value);
|
||||
void icalvalue_set_boolean(icalvalue* value, int v);
|
||||
|
||||
|
||||
/* UTC-OFFSET */
|
||||
icalvalue* icalvalue_new_utcoffset(int v);
|
||||
int icalvalue_get_utcoffset(icalvalue* value);
|
||||
void icalvalue_set_utcoffset(icalvalue* value, int v);
|
||||
|
||||
|
||||
/* X-LIC-CLASS */
|
||||
icalvalue* icalvalue_new_xlicclass(enum icalproperty_xlicclass v);
|
||||
enum icalproperty_xlicclass icalvalue_get_xlicclass(icalvalue* value);
|
||||
void icalvalue_set_xlicclass(icalvalue* value, enum icalproperty_xlicclass v);
|
||||
|
||||
|
||||
/* METHOD */
|
||||
icalvalue* icalvalue_new_method(enum icalproperty_method v);
|
||||
enum icalproperty_method icalvalue_get_method(icalvalue* value);
|
||||
void icalvalue_set_method(icalvalue* value, enum icalproperty_method v);
|
||||
|
||||
|
||||
/* CAL-ADDRESS */
|
||||
icalvalue* icalvalue_new_caladdress(const char* v);
|
||||
const char* icalvalue_get_caladdress(icalvalue* value);
|
||||
void icalvalue_set_caladdress(icalvalue* value, const char* v);
|
||||
|
||||
|
||||
/* PERIOD */
|
||||
icalvalue* icalvalue_new_period(struct icalperiodtype v);
|
||||
struct icalperiodtype icalvalue_get_period(icalvalue* value);
|
||||
void icalvalue_set_period(icalvalue* value, struct icalperiodtype v);
|
||||
|
||||
|
||||
/* STATUS */
|
||||
icalvalue* icalvalue_new_status(enum icalproperty_status v);
|
||||
enum icalproperty_status icalvalue_get_status(icalvalue* value);
|
||||
void icalvalue_set_status(icalvalue* value, enum icalproperty_status v);
|
||||
|
||||
|
||||
/* BINARY */
|
||||
icalvalue* icalvalue_new_binary(const char* v);
|
||||
const char* icalvalue_get_binary(icalvalue* value);
|
||||
void icalvalue_set_binary(icalvalue* value, const char* v);
|
||||
|
||||
|
||||
/* TEXT */
|
||||
icalvalue* icalvalue_new_text(const char* v);
|
||||
const char* icalvalue_get_text(icalvalue* value);
|
||||
void icalvalue_set_text(icalvalue* value, const char* v);
|
||||
|
||||
|
||||
/* DURATION */
|
||||
icalvalue* icalvalue_new_duration(struct icaldurationtype v);
|
||||
struct icaldurationtype icalvalue_get_duration(icalvalue* value);
|
||||
void icalvalue_set_duration(icalvalue* value, struct icaldurationtype v);
|
||||
|
||||
|
||||
/* INTEGER */
|
||||
icalvalue* icalvalue_new_integer(int v);
|
||||
int icalvalue_get_integer(icalvalue* value);
|
||||
void icalvalue_set_integer(icalvalue* value, int v);
|
||||
|
||||
|
||||
/* URI */
|
||||
icalvalue* icalvalue_new_uri(const char* v);
|
||||
const char* icalvalue_get_uri(icalvalue* value);
|
||||
void icalvalue_set_uri(icalvalue* value, const char* v);
|
||||
|
||||
|
||||
/* ATTACH */
|
||||
icalvalue* icalvalue_new_attach(struct icalattachtype v);
|
||||
struct icalattachtype icalvalue_get_attach(icalvalue* value);
|
||||
void icalvalue_set_attach(icalvalue* value, struct icalattachtype v);
|
||||
|
||||
|
||||
/* CLASS */
|
||||
icalvalue* icalvalue_new_class(enum icalproperty_class v);
|
||||
enum icalproperty_class icalvalue_get_class(icalvalue* value);
|
||||
void icalvalue_set_class(icalvalue* value, enum icalproperty_class v);
|
||||
|
||||
|
||||
/* FLOAT */
|
||||
icalvalue* icalvalue_new_float(float v);
|
||||
float icalvalue_get_float(icalvalue* value);
|
||||
void icalvalue_set_float(icalvalue* value, float v);
|
||||
|
||||
|
||||
/* QUERY */
|
||||
icalvalue* icalvalue_new_query(const char* v);
|
||||
const char* icalvalue_get_query(icalvalue* value);
|
||||
void icalvalue_set_query(icalvalue* value, const char* v);
|
||||
|
||||
|
||||
/* STRING */
|
||||
icalvalue* icalvalue_new_string(const char* v);
|
||||
const char* icalvalue_get_string(icalvalue* value);
|
||||
void icalvalue_set_string(icalvalue* value, const char* v);
|
||||
|
||||
|
||||
/* TRANSP */
|
||||
icalvalue* icalvalue_new_transp(enum icalproperty_transp v);
|
||||
enum icalproperty_transp icalvalue_get_transp(icalvalue* value);
|
||||
void icalvalue_set_transp(icalvalue* value, enum icalproperty_transp v);
|
||||
|
||||
|
||||
/* DATE-TIME */
|
||||
icalvalue* icalvalue_new_datetime(struct icaltimetype v);
|
||||
struct icaltimetype icalvalue_get_datetime(icalvalue* value);
|
||||
void icalvalue_set_datetime(icalvalue* value, struct icaltimetype v);
|
||||
|
||||
|
||||
/* REQUEST-STATUS */
|
||||
icalvalue* icalvalue_new_requeststatus(struct icalreqstattype v);
|
||||
struct icalreqstattype icalvalue_get_requeststatus(icalvalue* value);
|
||||
void icalvalue_set_requeststatus(icalvalue* value, struct icalreqstattype v);
|
||||
|
||||
|
||||
/* GEO */
|
||||
icalvalue* icalvalue_new_geo(struct icalgeotype v);
|
||||
struct icalgeotype icalvalue_get_geo(icalvalue* value);
|
||||
void icalvalue_set_geo(icalvalue* value, struct icalgeotype v);
|
||||
|
||||
|
||||
/* DATE */
|
||||
icalvalue* icalvalue_new_date(struct icaltimetype v);
|
||||
struct icaltimetype icalvalue_get_date(icalvalue* value);
|
||||
void icalvalue_set_date(icalvalue* value, struct icaltimetype v);
|
||||
|
||||
|
||||
/* ACTION */
|
||||
icalvalue* icalvalue_new_action(enum icalproperty_action v);
|
||||
enum icalproperty_action icalvalue_get_action(icalvalue* value);
|
||||
void icalvalue_set_action(icalvalue* value, enum icalproperty_action v);
|
||||
|
||||
#endif /*ICALVALUE_H*/
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,142 @@
|
|||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
/*======================================================================
|
||||
FILE: icaltimezone.h
|
||||
CREATOR: Damon Chaplin 15 March 2001
|
||||
|
||||
|
||||
$Id: icaltimezone.h,v 1.1 2001-12-21 19:21:38 mikep%oeone.com Exp $
|
||||
$Locker: $
|
||||
|
||||
(C) COPYRIGHT 2001, Damon Chaplin
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of either:
|
||||
|
||||
The LGPL as published by the Free Software Foundation, version
|
||||
2.1, available at: http://www.fsf.org/copyleft/lesser.html
|
||||
|
||||
Or:
|
||||
|
||||
The Mozilla Public License Version 1.0. You may obtain a copy of
|
||||
the License at http://www.mozilla.org/MPL/
|
||||
|
||||
|
||||
======================================================================*/
|
||||
|
||||
|
||||
#ifndef ICALTIMEZONE_H
|
||||
#define ICALTIMEZONE_H
|
||||
|
||||
#include <stdio.h> /* For FILE* */
|
||||
#include "icaltime.h"
|
||||
#include "icalarray.h"
|
||||
#include "icalcomponent.h"
|
||||
|
||||
|
||||
/*
|
||||
* Creating/Destroying individual icaltimezones.
|
||||
*/
|
||||
|
||||
/* Creates a new icaltimezone. */
|
||||
icaltimezone *icaltimezone_new (void);
|
||||
|
||||
/* Frees all memory used for the icaltimezone. Set free_struct to free the
|
||||
icaltimezone struct as well. */
|
||||
void icaltimezone_free (icaltimezone *zone,
|
||||
int free_struct);
|
||||
|
||||
|
||||
/*
|
||||
* Accessing timezones.
|
||||
*/
|
||||
|
||||
/* Returns the array of builtin icaltimezones. */
|
||||
icalarray* icaltimezone_get_builtin_timezones (void);
|
||||
|
||||
/* Returns a single builtin timezone, given its Olson city name. */
|
||||
icaltimezone* icaltimezone_get_builtin_timezone (const char *location);
|
||||
|
||||
/* Returns a single builtin timezone, given its TZID. */
|
||||
icaltimezone* icaltimezone_get_builtin_timezone_from_tzid (const char *tzid);
|
||||
|
||||
/* Returns the UTC timezone. */
|
||||
icaltimezone* icaltimezone_get_utc_timezone (void);
|
||||
|
||||
/* Returns the TZID of a timezone. */
|
||||
char* icaltimezone_get_tzid (icaltimezone *zone);
|
||||
|
||||
/* Returns the city name of a timezone. */
|
||||
char* icaltimezone_get_location (icaltimezone *zone);
|
||||
|
||||
/* Returns the TZNAME properties used in the latest STANDARD and DAYLIGHT
|
||||
components. If they are the same it will return just one, e.g. "LMT".
|
||||
If they are different it will format them like "EST/EDT". Note that this
|
||||
may also return NULL. */
|
||||
char* icaltimezone_get_tznames (icaltimezone *zone);
|
||||
|
||||
/* Returns the latitude of a builtin timezone. */
|
||||
double icaltimezone_get_latitude (icaltimezone *zone);
|
||||
|
||||
/* Returns the longitude of a builtin timezone. */
|
||||
double icaltimezone_get_longitude (icaltimezone *zone);
|
||||
|
||||
/* Returns the VTIMEZONE component of a timezone. */
|
||||
icalcomponent* icaltimezone_get_component (icaltimezone *zone);
|
||||
|
||||
/* Sets the VTIMEZONE component of an icaltimezone, initializing the tzid,
|
||||
location & tzname fields. It returns 1 on success or 0 on failure, i.e.
|
||||
no TZID was found. */
|
||||
int icaltimezone_set_component (icaltimezone *zone,
|
||||
icalcomponent *comp);
|
||||
|
||||
/*
|
||||
* Converting times between timezones.
|
||||
*/
|
||||
|
||||
void icaltimezone_convert_time (struct icaltimetype *tt,
|
||||
icaltimezone *from_zone,
|
||||
icaltimezone *to_zone);
|
||||
|
||||
|
||||
/*
|
||||
* Getting offsets from UTC.
|
||||
*/
|
||||
|
||||
/* Calculates the UTC offset of a given local time in the given timezone.
|
||||
It is the number of seconds to add to UTC to get local time.
|
||||
The is_daylight flag is set to 1 if the time is in daylight-savings time. */
|
||||
int icaltimezone_get_utc_offset (icaltimezone *zone,
|
||||
struct icaltimetype *tt,
|
||||
int *is_daylight);
|
||||
|
||||
/* Calculates the UTC offset of a given UTC time in the given timezone.
|
||||
It is the number of seconds to add to UTC to get local time.
|
||||
The is_daylight flag is set to 1 if the time is in daylight-savings time. */
|
||||
int icaltimezone_get_utc_offset_of_utc_time (icaltimezone *zone,
|
||||
struct icaltimetype *tt,
|
||||
int *is_daylight);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Handling arrays of timezones. Mainly for internal use.
|
||||
*/
|
||||
icalarray* icaltimezone_array_new (void);
|
||||
|
||||
void icaltimezone_array_append_from_vtimezone (icalarray *timezones,
|
||||
icalcomponent *child);
|
||||
void icaltimezone_array_free (icalarray *timezones);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Debugging Output.
|
||||
*/
|
||||
|
||||
/* Dumps information about changes in the timezone up to and including
|
||||
max_year. */
|
||||
int icaltimezone_dump_changes (icaltimezone *zone,
|
||||
int max_year,
|
||||
FILE *fp);
|
||||
|
||||
#endif /* ICALTIMEZONE_H */
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче