This file is indexed.

/usr/share/pyshared/gdata/calendar/data.py is in python-gdata 2.0.14-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
#!/usr/bin/python
#
# Copyright (C) 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


"""Contains the data classes of the Google Calendar Data API"""


__author__ = 'j.s@google.com (Jeff Scudder)'


import atom.core
import atom.data
import gdata.acl.data
import gdata.data
import gdata.geo.data
import gdata.opensearch.data


GCAL_NAMESPACE = 'http://schemas.google.com/gCal/2005'
GCAL_TEMPLATE = '{http://schemas.google.com/gCal/2005/}%s'
WEB_CONTENT_LINK_REL = '%s/%s' % (GCAL_NAMESPACE, 'webContent')


class AccessLevelProperty(atom.core.XmlElement):
  """Describes how much a given user may do with an event or calendar"""
  _qname = GCAL_TEMPLATE % 'accesslevel'
  value = 'value'


class AllowGSync2Property(atom.core.XmlElement):
  """Whether the user is permitted to run Google Apps Sync"""
  _qname = GCAL_TEMPLATE % 'allowGSync2'
  value = 'value'


class AllowGSyncProperty(atom.core.XmlElement):
  """Whether the user is permitted to run Google Apps Sync"""
  _qname = GCAL_TEMPLATE % 'allowGSync'
  value = 'value'


class AnyoneCanAddSelfProperty(atom.core.XmlElement):
  """Whether anyone can add self as attendee"""
  _qname = GCAL_TEMPLATE % 'anyoneCanAddSelf'
  value = 'value'


class CalendarAclRole(gdata.acl.data.AclRole):
  """Describes the Calendar roles of an entry in the Calendar access control list"""
  _qname = gdata.acl.data.GACL_TEMPLATE % 'role'


class CalendarCommentEntry(gdata.data.GDEntry):
  """Describes an entry in a feed of a Calendar event's comments"""


class CalendarCommentFeed(gdata.data.GDFeed):
  """Describes feed of a Calendar event's comments"""
  entry = [CalendarCommentEntry]


class CalendarComments(gdata.data.Comments):
  """Describes a container of a feed link for Calendar comment entries"""
  _qname = gdata.data.GD_TEMPLATE % 'comments'


class CalendarExtendedProperty(gdata.data.ExtendedProperty):
  """Defines a value for the realm attribute that is used only in the calendar API"""
  _qname = gdata.data.GD_TEMPLATE % 'extendedProperty'


class CalendarWhere(gdata.data.Where):
  """Extends the base Where class with Calendar extensions"""
  _qname = gdata.data.GD_TEMPLATE % 'where'


class ColorProperty(atom.core.XmlElement):
  """Describes the color of a calendar"""
  _qname = GCAL_TEMPLATE % 'color'
  value = 'value'


class GuestsCanInviteOthersProperty(atom.core.XmlElement):
  """Whether guests can invite others to the event"""
  _qname = GCAL_TEMPLATE % 'guestsCanInviteOthers'
  value = 'value'


class GuestsCanModifyProperty(atom.core.XmlElement):
  """Whether guests can modify event"""
  _qname = GCAL_TEMPLATE % 'guestsCanModify'
  value = 'value'


class GuestsCanSeeGuestsProperty(atom.core.XmlElement):
  """Whether guests can see other attendees"""
  _qname = GCAL_TEMPLATE % 'guestsCanSeeGuests'
  value = 'value'


class HiddenProperty(atom.core.XmlElement):
  """Describes whether a calendar is hidden"""
  _qname = GCAL_TEMPLATE % 'hidden'
  value = 'value'


class IcalUIDProperty(atom.core.XmlElement):
  """Describes the UID in the ical export of the event"""
  _qname = GCAL_TEMPLATE % 'uid'
  value = 'value'


class OverrideNameProperty(atom.core.XmlElement):
  """Describes the override name property of a calendar"""
  _qname = GCAL_TEMPLATE % 'overridename'
  value = 'value'


class PrivateCopyProperty(atom.core.XmlElement):
  """Indicates whether this is a private copy of the event, changes to which should not be sent to other calendars"""
  _qname = GCAL_TEMPLATE % 'privateCopy'
  value = 'value'


class QuickAddProperty(atom.core.XmlElement):
  """Describes whether gd:content is for quick-add processing"""
  _qname = GCAL_TEMPLATE % 'quickadd'
  value = 'value'


class ResourceProperty(atom.core.XmlElement):
  """Describes whether gd:who is a resource such as a conference room"""
  _qname = GCAL_TEMPLATE % 'resource'
  value = 'value'
  id = 'id'


class EventWho(gdata.data.Who):
  """Extends the base Who class with Calendar extensions"""
  _qname = gdata.data.GD_TEMPLATE % 'who'
  resource = ResourceProperty


class SelectedProperty(atom.core.XmlElement):
  """Describes whether a calendar is selected"""
  _qname = GCAL_TEMPLATE % 'selected'
  value = 'value'


class SendAclNotificationsProperty(atom.core.XmlElement):
  """Describes whether to send ACL notifications to grantees"""
  _qname = GCAL_TEMPLATE % 'sendAclNotifications'
  value = 'value'


class CalendarAclEntry(gdata.acl.data.AclEntry):
  """Describes an entry in a feed of a Calendar access control list (ACL)"""
  send_acl_notifications = SendAclNotificationsProperty


class CalendarAclFeed(gdata.data.GDFeed):
  """Describes a Calendar access contorl list (ACL) feed"""
  entry = [CalendarAclEntry]


class SendEventNotificationsProperty(atom.core.XmlElement):
  """Describes whether to send event notifications to other participants of the event"""
  _qname = GCAL_TEMPLATE % 'sendEventNotifications'
  value = 'value'


class SequenceNumberProperty(atom.core.XmlElement):
  """Describes sequence number of an event"""
  _qname = GCAL_TEMPLATE % 'sequence'
  value = 'value'


class CalendarRecurrenceExceptionEntry(gdata.data.GDEntry):
  """Describes an entry used by a Calendar recurrence exception entry link"""
  uid = IcalUIDProperty
  sequence = SequenceNumberProperty


class CalendarRecurrenceException(gdata.data.RecurrenceException):
  """Describes an exception to a recurring Calendar event"""
  _qname = gdata.data.GD_TEMPLATE % 'recurrenceException'


class SettingsProperty(atom.core.XmlElement):
  """User preference name-value pair"""
  _qname = GCAL_TEMPLATE % 'settingsProperty'
  name = 'name'
  value = 'value'


class SettingsEntry(gdata.data.GDEntry):
  """Describes a Calendar Settings property entry"""
  settings_property = SettingsProperty


class CalendarSettingsFeed(gdata.data.GDFeed):
  """Personal settings for Calendar application"""
  entry = [SettingsEntry]


class SuppressReplyNotificationsProperty(atom.core.XmlElement):
  """Lists notification methods to be suppressed for this reply"""
  _qname = GCAL_TEMPLATE % 'suppressReplyNotifications'
  methods = 'methods'


class SyncEventProperty(atom.core.XmlElement):
  """Describes whether this is a sync scenario where the Ical UID and Sequence number are honored during inserts and updates"""
  _qname = GCAL_TEMPLATE % 'syncEvent'
  value = 'value'


class When(gdata.data.When):
  """Extends the gd:when element to add reminders"""
  reminder = [gdata.data.Reminder]


class CalendarEventEntry(gdata.data.BatchEntry):
  """Describes a Calendar event entry"""
  quick_add = QuickAddProperty
  send_event_notifications = SendEventNotificationsProperty
  sync_event = SyncEventProperty
  anyone_can_add_self = AnyoneCanAddSelfProperty
  extended_property = [CalendarExtendedProperty]
  sequence = SequenceNumberProperty
  guests_can_invite_others = GuestsCanInviteOthersProperty
  guests_can_modify = GuestsCanModifyProperty
  guests_can_see_guests = GuestsCanSeeGuestsProperty
  georss_where = gdata.geo.data.GeoRssWhere
  private_copy = PrivateCopyProperty
  suppress_reply_notifications = SuppressReplyNotificationsProperty
  uid = IcalUIDProperty
  where = [gdata.data.Where]
  when = [When]
  who = [gdata.data.Who]
  transparency = gdata.data.Transparency
  comments = gdata.data.Comments
  event_status = gdata.data.EventStatus
  visibility = gdata.data.Visibility
  recurrence = gdata.data.Recurrence
  recurrence_exception = [gdata.data.RecurrenceException]
  original_event = gdata.data.OriginalEvent
  reminder = [gdata.data.Reminder]


class TimeZoneProperty(atom.core.XmlElement):
  """Describes the time zone of a calendar"""
  _qname = GCAL_TEMPLATE % 'timezone'
  value = 'value'


class TimesCleanedProperty(atom.core.XmlElement):
  """Describes how many times calendar was cleaned via Manage Calendars"""
  _qname = GCAL_TEMPLATE % 'timesCleaned'
  value = 'value'


class CalendarEntry(gdata.data.GDEntry):
  """Describes a Calendar entry in the feed of a user's calendars"""
  timezone = TimeZoneProperty
  overridename = OverrideNameProperty
  hidden = HiddenProperty
  selected = SelectedProperty
  times_cleaned = TimesCleanedProperty
  color = ColorProperty
  where = [CalendarWhere]
  accesslevel = AccessLevelProperty


class CalendarEventFeed(gdata.data.BatchFeed):
  """Describes a Calendar event feed"""
  allow_g_sync2 = AllowGSync2Property
  timezone = TimeZoneProperty
  entry = [CalendarEventEntry]
  times_cleaned = TimesCleanedProperty
  allow_g_sync = AllowGSyncProperty


class CalendarFeed(gdata.data.GDFeed):
  """Describes a feed of Calendars"""
  entry = [CalendarEntry]


class WebContentGadgetPref(atom.core.XmlElement):
  """Describes a single web content gadget preference"""
  _qname = GCAL_TEMPLATE % 'webContentGadgetPref'
  name = 'name'
  value = 'value'


class WebContent(atom.core.XmlElement):
  """Describes a "web content" extension"""
  _qname = GCAL_TEMPLATE % 'webContent'
  height = 'height'
  width = 'width'
  web_content_gadget_pref = [WebContentGadgetPref]
  url = 'url'
  display = 'display'


class WebContentLink(atom.data.Link):
  """Describes a "web content" link"""
  def __init__(self, title=None, href=None, link_type=None,
               web_content=None):
    atom.data.Link.__init__(self, rel=WEB_CONTENT_LINK_REL, title=title, href=href,
        link_type=link_type)

  web_content = WebContent