This file is indexed.

/usr/bin/blueman-applet is in blueman 1.23-0ubuntu2.

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

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
#!/usr/bin/python

# 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 sys
import os.path
import os
import pynotify
import dbus
import dbus.glib
import gobject
import gtk
import gtk.gdk
import __builtin__

#support running uninstalled
_dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
if os.path.exists(os.path.join(_dirname,"ChangeLog")):
	sys.path.insert(0, _dirname)

from blueman.Constants import *
from blueman.Functions import *

from blueman.main.DbusService import DbusService

import blueman.plugins.applet
from blueman.plugins.AppletPlugin import AppletPlugin
from blueman.plugins.BasePlugin import BasePlugin

import blueman.bluez as Bluez

from blueman.main.SignalTracker import SignalTracker

from blueman.main.PluginManager import PersistentPluginManager

class BluemanApplet(object):

	def __init__(self):
		setup_icon_path()
		if not pynotify.init("Blueman"):
			dprint("Error: Failed to init pynotify")
		
		check_single_instance("blueman-applet")


		self.Manager = None
		self.DbusSvc = DbusService("org.blueman.Applet", "/")
		self.Signals = SignalTracker()
		
		self.Plugins = PersistentPluginManager(AppletPlugin, blueman.plugins.applet, self)
		self.Plugins.Load()
			
		self.Plugins.Run("on_plugins_loaded")
	

		self.bus = dbus.SystemBus()
		self.bus.watch_name_owner("org.bluez", self.on_dbus_name_owner_change)
		
		self.bus.add_signal_receiver(self.on_adapter_property_changed, "PropertyChanged", "org.bluez.Adapter", "org.bluez", path_keyword="path")


		gtk.main()
		
	
	def manager_init(self):
		try:

			self.Signals.DisconnectAll()
			self.Manager = Bluez.Manager("gobject")
			self.Plugins.Run("on_manager_state_changed", True)

			self.Signals.Handle("bluez", self.Manager, self.on_adapter_removed, "AdapterRemoved")
			self.Signals.Handle("bluez", self.Manager, self.on_adapter_added, "AdapterAdded")
		
		except dbus.exceptions.DBusException, e:
			dprint(e)
			self.manager_deinit()
			dprint("Bluez DBus API not available. Listening for DBus name ownership changes")
	
	def manager_deinit(self):
		self.Signals.DisconnectAll()
		self.Manager = None
		self.Plugins.Run("on_manager_state_changed", False)
		
	def on_dbus_name_owner_change(self, owner):
		dprint("org.bluez owner changed to", owner)
		if owner == "":
			self.manager_deinit()
		elif self.Manager == None:
			self.manager_init()
		
	def on_adapter_property_changed(self, key, value, path):
		self.Plugins.Run("on_adapter_property_changed", path, key, value)
	
	def on_adapter_added(self, path):
		dprint("Adapter added ", path)
		def on_activate():
			dprint("Adapter activated")
			self.Plugins.Run("on_adapter_added", path)

		adapter = Bluez.Adapter(path)
		wait_for_adapter(adapter, on_activate)
		
	def on_adapter_removed(self, path):
		dprint("Adapter removed ", path)
		self.Plugins.Run("on_adapter_removed", path)

BluemanApplet()