This file is indexed.

/usr/share/pyshared/telepathy/_generated/Connection_Interface_Simple_Presence.py is in python-telepathy 0.15.19-2.1build1.

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
# -*- coding: utf-8 -*-
# Generated from the Telepathy spec
""" Copyright (C) 2005-2008 Collabora Limited 
 Copyright (C) 2005, 2006 Nokia Corporation 
 Copyright (C) 2006 INdT 

    This library is free software; you can redistribute it and/or modify it
      under the terms of the GNU Lesser General Public License as published by
      the Free Software Foundation; either version 2.1 of the License, or (at
      your option) any later version.

    This library is distributed in the hope that it will be useful, but
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
      General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
      along with this library; if not, write to the Free Software Foundation,
      Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  
"""

import dbus.service


class ConnectionInterfaceSimplePresence(dbus.service.Interface):
    """\
      This interface is for services which have a concept of presence which
        can be published for yourself and monitored on your contacts.

      Presence on an individual (yourself or one of your contacts) is
        modelled as a status and a status message. Valid statuses are defined
        per connection, and a list of those that can be set on youself
        can be obtained from the
        Statuses
        property.

      Each status has an arbitrary string identifier which should have an
        agreed meaning between the connection manager and any client which is
        expected to make use of it. The following well-known values should be
        used where possible to allow clients to identify common choices:

      
        
          status identifier
          Connection_Presence_Type
          comments
        
        
          available
          Connection_Presence_Type_Available
          
        
        
          away
          Connection_Presence_Type_Away
          
        
        
          brb
          Connection_Presence_Type_Away
          Be Right Back (a more specific form of Away)
        
        
          busy
          Connection_Presence_Type_Busy
          
        
        dnd
          Connection_Presence_Type_Busy
          Do Not Disturb (a more specific form of Busy)
        
        
          xa
          Connection_Presence_Type_Extended_Away
          Extended Away
        
        
          hidden
          Connection_Presence_Type_Hidden
          Also known as "Invisible" or "Appear Offline"
        
        
          offline
          Connection_Presence_Type_Offline
          
        
        
          unknown
          Connection_Presence_Type_Unknown
          special, see below
        
        
          error
          Connection_Presence_Type_Error
          special, see below
        
      

      As well as these well-known status identifiers, every status also has
        a numerical type value chosen from
        Connection_Presence_Type which can be
        used by the client to classify even unknown statuses into different
        fundamental types.

      These numerical types exist so that even if a client does not
        understand the string identifier being used, and hence cannot present
        the presence to the user to set on themselves, it may display an
        approximation of the presence if it is set on a contact.

      As well as the normal status identifiers, there are two special ones
        that may be present: 'unknown' with type Unknown and 'error' with type
        Error. 'unknown' indicates that it is impossible to determine the
        presence of a contact at this time, for example because it's not on the
        'subscribe' list and the protocol only allows one to determine the
        presence of contacts you're subscribed to. 'error' indicates that there
        was a failure in determining the status of a contact.

      If the connection has a 'subscribe' contact list,
        PresencesChanged
        signals should be emitted to indicate changes of contacts on this list,
        and should also be emitted for changes in your own presence. Depending
        on the protocol, the signal may also be emitted for others such as
        people with whom you are communicating, and any user interface should
        be updated accordingly.
    """

    def __init__(self):
        self._interfaces.add('org.freedesktop.Telepathy.Connection.Interface.SimplePresence')

    @dbus.service.method('org.freedesktop.Telepathy.Connection.Interface.SimplePresence', in_signature='ss', out_signature='')
    def SetPresence(self, Status, Status_Message):
        """
        Request that the presence status and status message are published for
          the connection.  Changes will be indicated by
          PresencesChanged
          signals being emitted.

        This method may be called on a newly-created connection while it
          is still in the DISCONNECTED state, to request that when the
          connection connects, it will do so with the selected status.

        In DISCONNECTED state the
          Statuses
          property will indicate which statuses are allowed to be set
          while DISCONNECTED (none, if the Connection Manager doesn't allow
          this). This value MUST NOT be cached, as the set of allowed
          presences might change upon connecting.
      
        """
        raise NotImplementedError
  
    @dbus.service.method('org.freedesktop.Telepathy.Connection.Interface.SimplePresence', in_signature='au', out_signature='a{u(uss)}')
    def GetPresences(self, Contacts):
        """
        Get presence previously emitted by
        PresencesChanged for the given
        contacts. Data is returned in the same structure as the
        PresencesChanged signal; no additional network requests are made.
      
        """
        raise NotImplementedError
  
    @dbus.service.signal('org.freedesktop.Telepathy.Connection.Interface.SimplePresence', signature='a{u(uss)}')
    def PresencesChanged(self, Presence):
        """
        This signal should be emitted when your own presence has been changed,
        or the presence of the member of any of the connection's channels has
        been changed.
      
        """
        pass