| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Net::Google::Calendar::Calendar; |
|
2
|
|
|
|
|
|
|
{ |
|
3
|
|
|
|
|
|
|
$Net::Google::Calendar::Calendar::VERSION = '1.05'; |
|
4
|
|
|
|
|
|
|
} |
|
5
|
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
1637
|
use base qw(Net::Google::Calendar::Entry); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
120
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Net::Google::Calendar::Calendar - entry class for Net::Google::Calendar Calendar objects |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 METHODS |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Note this is very rough at the moment - there are plenty of |
|
15
|
|
|
|
|
|
|
convenience methods that could be added but for now you'll |
|
16
|
|
|
|
|
|
|
have to access them using the underlying C |
|
17
|
|
|
|
|
|
|
object. |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head2 new |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=cut |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub new { |
|
24
|
|
|
|
|
|
|
my ($class, %opts) = @_; |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
my $self = $class->SUPER::new( Version => '1.0', %opts ); |
|
27
|
|
|
|
|
|
|
$self->_initialize(); |
|
28
|
|
|
|
|
|
|
return $self; |
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub _initialize { |
|
32
|
|
|
|
|
|
|
my $self = shift; |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
$self->{_gd_ns} = XML::Atom::Namespace->new(gd => 'http://schemas.google.com/g/2005'); |
|
35
|
|
|
|
|
|
|
$self->{_gcal_ns} = XML::Atom::Namespace->new(gCal => 'http://schemas.google.com/gCal/2005'); |
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head2 summary [value] |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
A summary of the calendar. |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=cut |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub summary { |
|
45
|
|
|
|
|
|
|
my $self= shift; |
|
46
|
|
|
|
|
|
|
if (@_) { |
|
47
|
|
|
|
|
|
|
$self->set($self->ns, 'summary', shift); |
|
48
|
|
|
|
|
|
|
} |
|
49
|
|
|
|
|
|
|
return $self->get($self->ns, 'summary'); |
|
50
|
|
|
|
|
|
|
} |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head2 edit_url |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Get the edit url |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub edit_url { |
|
60
|
|
|
|
|
|
|
my $self = shift; |
|
61
|
|
|
|
|
|
|
my $force = shift || 0; |
|
62
|
|
|
|
|
|
|
my $url = $self->_generic_url('edit'); |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
$url =~ s!/allcalendars/full!/owncalendars/full! if $force; |
|
65
|
|
|
|
|
|
|
return $url; |
|
66
|
|
|
|
|
|
|
} |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 color |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
The color assigned to the calendar. |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub color { |
|
75
|
|
|
|
|
|
|
my $self = shift; |
|
76
|
|
|
|
|
|
|
if (@_) {} |
|
77
|
|
|
|
|
|
|
if (my $el = $self->elem->getChildrenByTagName('gCal:color')->[0]) { |
|
78
|
|
|
|
|
|
|
return $el->getAttribute('value'); |
|
79
|
|
|
|
|
|
|
} |
|
80
|
|
|
|
|
|
|
return; |
|
81
|
|
|
|
|
|
|
} |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head2 override_name |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Returns the override name of the calendar. Not always set. |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=cut |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
sub override_name { |
|
90
|
|
|
|
|
|
|
my $self = shift; |
|
91
|
|
|
|
|
|
|
if (@_) {} |
|
92
|
|
|
|
|
|
|
if (my $el = $self->elem->getChildrenByTagName('gCal:overridename')->[0]) { |
|
93
|
|
|
|
|
|
|
return $el->getAttribute('value'); |
|
94
|
|
|
|
|
|
|
} |
|
95
|
|
|
|
|
|
|
return; |
|
96
|
|
|
|
|
|
|
} |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head2 access_level |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
Returns the access level of the calendar. |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=cut |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
sub access_level { |
|
105
|
|
|
|
|
|
|
my $self = shift; |
|
106
|
|
|
|
|
|
|
if (@_) {} |
|
107
|
|
|
|
|
|
|
if (my $el = $self->elem->getChildrenByTagName('gCal:accesslevel')->[0]) { |
|
108
|
|
|
|
|
|
|
return $el->getAttribute('value'); |
|
109
|
|
|
|
|
|
|
} |
|
110
|
|
|
|
|
|
|
return; |
|
111
|
|
|
|
|
|
|
} |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head2 hidden |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Returns true if the calendar is hidden, false otherwise |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=cut |
|
118
|
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
sub hidden { |
|
120
|
|
|
|
|
|
|
my $self = shift; |
|
121
|
|
|
|
|
|
|
if (@_) {} |
|
122
|
|
|
|
|
|
|
if (my $el = $self->elem->getChildrenByTagName('gCal:hidden')->[0]) { |
|
123
|
|
|
|
|
|
|
if ($el->getAttribute('value') eq 'true') { |
|
124
|
|
|
|
|
|
|
return 1; |
|
125
|
|
|
|
|
|
|
} |
|
126
|
|
|
|
|
|
|
} |
|
127
|
|
|
|
|
|
|
return 0; |
|
128
|
|
|
|
|
|
|
} |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=head2 selected |
|
132
|
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
Returns true if the calendar is selected, false otherwise. |
|
134
|
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=cut |
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
sub selected { |
|
138
|
|
|
|
|
|
|
my $self = shift; |
|
139
|
|
|
|
|
|
|
if (@_) {} |
|
140
|
|
|
|
|
|
|
if (my $el = $self->elem->getChildrenByTagName('gCal:selected')->[0]) { |
|
141
|
|
|
|
|
|
|
if ($el->getAttribute('value') eq 'true') { |
|
142
|
|
|
|
|
|
|
return 1; |
|
143
|
|
|
|
|
|
|
} |
|
144
|
|
|
|
|
|
|
} |
|
145
|
|
|
|
|
|
|
return 0; |
|
146
|
|
|
|
|
|
|
} |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=head2 time_zone |
|
149
|
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
Returns the time zone of the calendar. |
|
151
|
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=cut |
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
sub time_zone { |
|
155
|
|
|
|
|
|
|
my $self = shift; |
|
156
|
|
|
|
|
|
|
if (@_) {} |
|
157
|
|
|
|
|
|
|
if (my $el = $self->elem->getChildrenByTagName('gCal:timezone')->[0]) { |
|
158
|
|
|
|
|
|
|
return $el->getAttribute('value'); |
|
159
|
|
|
|
|
|
|
} |
|
160
|
|
|
|
|
|
|
return; |
|
161
|
|
|
|
|
|
|
} |
|
162
|
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=head2 times_cleaned |
|
166
|
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
Returns the value of timesCleaned |
|
168
|
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
=cut |
|
170
|
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
sub times_cleaned { |
|
172
|
|
|
|
|
|
|
my $self = shift; |
|
173
|
|
|
|
|
|
|
if (@_) {} |
|
174
|
|
|
|
|
|
|
if (my $el = $self->elem->getChildrenByTagName('gCal:timesCleaned')->[0]) { |
|
175
|
|
|
|
|
|
|
return $el->getAttribute('value'); |
|
176
|
|
|
|
|
|
|
} |
|
177
|
|
|
|
|
|
|
return; |
|
178
|
|
|
|
|
|
|
} |
|
179
|
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
1; |