4
package Data::ICal::Entry::Alarm::Email;
6
use base qw/Data::ICal::Entry/;
10
Data::ICal::Entry::Alarm::Email - Represents an emailed alarm in an iCalendar file
15
my $valarm = Data::ICal::Entry::Alarm::Audio->new();
16
$valarm->add_properties(
17
attach => [ "basic:ftp://host.com/pub/sounds/bell-01.aud", { fmttype => "audio/basic" } ],
18
# Dat*e*::ICal is not a typo here
19
trigger => [ Date::ICal->new( epoch => ... )->ical, { value => 'DATE-TIME' } ],
22
$vevent->add_entry($valarm);
26
A L<Data::ICal::Entry::Alarm::Email> object represents an emailed alarm attached
27
to a todo item or event in an iCalendar file. (Note that the iCalendar RFC
28
refers to entries as "components".) It is a subclass of L<Data::ICal::Entry>
29
and accepts all of its methods.
31
The C<attendee> properties are intended as the recipient list of the email; the C<summary>
32
as its subject; the C<description> as its body; and the C<attach> as its attachments.
40
Creates a new L<Data::ICal::Entry::Alarm::Email> object; sets its C<ACTION> property
47
my $self = $class->SUPER::new(@_);
48
$self->add_property( action => "EMAIL" );
52
=head2 ical_entry_type
54
Returns C<VALARM>, its iCalendar entry name.
58
sub ical_entry_type {'VALARM'}
60
=head2 optional_unique_properties
62
According to the iCalendar standard, the C<duration> and C<retreat> properties may be specified
63
at most one time for an emailed alarm, and if one is specified, the other one must be also,
64
though this module does not enforce that restriction.
68
sub optional_unique_properties {
74
=head2 mandatory_unique_properties
76
According to the iCalendar standard, the following properties must be specified
77
exactly once for an emailed alarm:
79
description summary trigger
81
In addition, the C<action> property must be specified exactly once, but the
82
module automatically sets it for you.
86
sub mandatory_unique_properties {
88
action description summary trigger
92
=head2 mandatory_repeatable_properties
94
According to the iCalendar standard, the C<attendee> property must be specified
95
at least once for an emailed alarm.
99
sub mandatory_repeatable_properties {
105
=head2 optional_repeatable_properties
107
According to the iCalendar standard, the C<attach> property may be specified
108
any number of times for an emailed alarm.
112
sub optional_repeatable_properties {
120
Jesse Vincent C<< <jesse@bestpractical.com> >> with David Glasser and Simon Wistow
123
=head1 LICENCE AND COPYRIGHT
125
Copyright (c) 2005, Best Practical Solutions, LLC. All rights reserved.
127
This module is free software; you can redistribute it and/or
128
modify it under the same terms as Perl itself. See L<perlartistic>.
131
=head1 DISCLAIMER OF WARRANTY
133
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
134
FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
135
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
136
PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
137
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
138
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
139
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
140
YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
141
NECESSARY SERVICING, REPAIR, OR CORRECTION.
143
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
144
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
145
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
146
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
147
OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
148
THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
149
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
150
FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
151
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF