This file is indexed.

/usr/lib/python2.7/dist-packages/txdav/common/inotifications.py is in calendarserver 5.2+dfsg-1.

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
##
# Copyright (c) 2010-2014 Apple Inc. All rights reserved.
#
# 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.
##

"""
Common notification interfaces
"""

from zope.interface.interface import Interface
from txdav.idav import IDataStoreObject


__all__ = [
    "INotificationCollection",
    "INotificationObject",
]

class INotificationCollection(Interface):
    """
    NotificationCollection

    A notification collection is a container for notification objects.
    A notification collection belongs to a specific principal.
    """

    def name(): #@NoSelf
        """
        Identify this notification collection.

        @return: the name of this notification collection.
        @rtype: C{str}
        """

    def notificationObjects(): #@NoSelf
        """
        Retrieve the notification objects contained in this notification
        collection with the given C{componentType}.

        @param componentType: a string.
        @return: an iterable of L{INotificationObject}s.
        """

    def notificationObjectWithName(name): #@NoSelf
        """
        Retrieve the notification object with the given C{name} contained
        in this notification collection.

        @param name: a string.
        @return: an L{INotificationObject} or C{None} if no such notification
            object exists.
        """

    def notificationObjectWithUID(uid): #@NoSelf
        """
        Retrieve the notification object with the given C{uid} contained
        in this notification collection.

        @param uid: a string.
        @return: an L{INotificationObject} or C{None} if no such notification
            object exists.
        """

    def writeNotificationObject(uid, xmltype, xmldata): #@NoSelf
        """
        Write a notification with the given C{uid} in this notification
        collection from the given C{xmldata} with given C{xmltype}.  If a
        L{INotificationObject} with the same uid already exists in this
        L{INotificationCollection}, it will be overwritten.

        @param uid: a string uniquely identifying the notification to be
            written.
        @type uid: C{str}

        @param xmltype: the node within the notification payload, emptied of
            its children, to indicate the type of notification and fill out the
            C{CS:notificationtype} property.

        @type xmltype: an instance of
            L{txdav.xml.base.WebDAVElement},
            most likely a subclass like L{twistedcaldav.customxml.InviteReply},
            L{twistedcaldav.customxml.InviteRemove}, etc.

        @param xmldata: the serialized representation of the C{CS:notification}
            node.
        @type xmldata: C{str}
        """

    def removeNotificationObjectWithName(name): #@NoSelf
        """
        Remove the notification object with the given C{name} from this
        notification collection. If C{deleteOnly} is C{True} then do not

        @param name: a string.
        @type name: C{str}

        @raise NoSuchObjectResourceError: if no such NoSuchObjectResourceError
            object exists.
        """

    def removeNotificationObjectWithUID(uid): #@NoSelf
        """
        Remove the notification object with the given C{uid} from this
        notification collection.

        @param uid: a string.
        @raise NoSuchObjectResourceError: if the notification object does
            not exist.
        """

    def syncToken(): #@NoSelf
        """
        Retrieve the current sync token for this notification.

        @return: a string containing a sync token.
        """

    def properties(): #@NoSelf
        """
        Retrieve the property store for this notification.

        @return: an L{IPropertyStore}.
        """



class INotificationObject(IDataStoreObject):
    """
    Notification object

    An notification object describes an XML notification.
    """

    def setData(uid, xmltype, xmldata, inserting=False): #@NoSelf
        """
        Rewrite this notification object to match the given C{xmltype} and
        C{xmldata}. C{xmldata} must have the same UID as this notification object.

        @param xmltype: a string.
        @param xmldata: a string.
        @raise InvalidObjectResourceError: if the given
            C{xmltype} or C{xmldata} is not a valid for
            an notification object.
        """

    def xmldata(): #@NoSelf
        """
        Retrieve the notification data for this notification object.

        @return: a string.
        """

    def uid(): #@NoSelf
        """
        Retrieve the UID for this notification object.

        @return: a string containing a UID.
        """

    def notificationCollection(): #@NoSelf
        """
        @return: the parent L{INotificationCollection} which this
            L{INotificationObject} was retrieved from.

        @rtype: L{INotificationCollection}
        """