This file is indexed.

/usr/share/pyshared/blueman/ods/OdsServer.py is in blueman 1.23-0ubuntu2.

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
# Copyright (C) 2008 Valmantas Paliksa <walmis at balticum-tv dot lt>
# Copyright (C) 2008 Tadas Dailyda <tadas at dailyda dot com>
#
# Licensed under the GNU General Public License Version 3
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
# 
import gobject
from blueman.ods.OdsBase import OdsBase
from blueman.ods.OdsServerSession import OdsServerSession

class OdsServer(OdsBase):
	__gsignals__ = {
		'started' : (gobject.SIGNAL_NO_HOOKS, gobject.TYPE_NONE, ()),
		'stopped' : (gobject.SIGNAL_NO_HOOKS, gobject.TYPE_NONE, ()),
		'closed' : (gobject.SIGNAL_NO_HOOKS, gobject.TYPE_NONE, ()),
		'error-occured' : (gobject.SIGNAL_NO_HOOKS, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT,)),
		'session-created' : (gobject.SIGNAL_NO_HOOKS, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT,)),
		'session-removed' : (gobject.SIGNAL_NO_HOOKS, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT,)),
	}
	
	def __init__(self, obj_path):
		OdsBase.__init__(self, "org.openobex.Server", obj_path)
		
		self.Handle("Started", self.on_started)
		self.Handle("Stopped", self.on_stopped)
		self.Handle("Closed", self.on_closed)
		self.Handle("ErrorOccured", self.on_error)
		self.Handle("SessionCreated", self.on_session_created)
		self.Handle("SessionRemoved", self.on_session_removed)
		
		self.sessions = {}
		
	def __del__(self):
		dprint("deleting server object")
		
	def DisconnectAll(self, *args):
		for k, v in self.sessions.iteritems():
			v.DisconnectAll()
		self.sessions = {}
		OdsBase.DisconnectAll(self, *args)
		
	def on_started(self):
		self.emit("started")
		
	def on_stopped(self):
		self.emit("stopped")
		
	def on_closed(self):
		self.emit("closed")
		self.DisconnectAll()
		
	def on_error(self, err_name, err_message):
		self.emit("error-occured", err_name, err_message)
		self.DisconnectAll()
		
	def on_session_created(self, path):
		dprint(path)
		self.sessions[path] = OdsServerSession(path)
		self.emit("session-created", self.sessions[path])
		
	def on_session_removed(self, path):
		dprint(path)
		self.emit("session-removed", path)
		self.sessions[path].DisconnectAll()
		del self.sessions[path]