Example #1
0
func (m *EntryProxyerManager) destroy() {
	for _, entry := range m.Entries {
		dbus.UnInstallObject(entry)
	}
	dbus.UnInstallObject(m)
	if busdaemon != nil {
		pkgbus.DestroyDBusDaemon(busdaemon)
		busdaemon = nil
	}
}
Example #2
0
func (m *Manager) destroy() {
	dbus.UnInstallObject(_m.mouse)
	dbus.UnInstallObject(_m.touchpad)
	dbus.UnInstallObject(_m.kbd)
	dbus.UnInstallObject(_m.wacom)
	dbus.UnInstallObject(_m)

	if _m.logger != nil {
		_m.logger.EndTracing()
	}
}
Example #3
0
func (s *Setting) destroy() {
	if s.core != nil {
		s.core.Unref()
		s.core = nil
	}
	dbus.UnInstallObject(s)
}
Example #4
0
func finalizeLibs() {
	if power != nil {
		power.batGroup.Destroy()
		power.batGroup = nil
		dbus.UnInstallObject(power)
		power = nil
	}
	if upower != nil {
		libupower.DestroyUpower(upower)
		upower = nil
	}
	if login1 != nil {
		liblogin1.DestroyManager(login1)
		login1 = nil
	}
	if mediaKey != nil {
		libkeybinding.DestroyMediaKey(mediaKey)
		mediaKey = nil
	}
	if notifier != nil {
		libnotifications.DestroyNotifier(notifier)
		notifier = nil
	}

	player = nil
}
Example #5
0
func destroyAgent(a *agent) {
	for key, ch := range a.pendingKeys {
		close(ch)
		delete(a.pendingKeys, key)
	}
	nmAgentUnregister()
	dbus.UnInstallObject(a)
}
func (m *Manager) clearConnectionSessions() {
	m.connectionSessionsLock.Lock()
	defer m.connectionSessionsLock.Unlock()
	for _, session := range m.connectionSessions {
		dbus.UnInstallObject(session)
	}
	m.connectionSessions = nil
}
Example #7
0
func finalize() {
	finiGSettings()
	endKeyBinding()

	dbus.UnInstallObject(_manager)
	_manager = nil
	logger.EndTracing()
}
Example #8
0
func (m *Manager) destroy() {
	if m.watcher != nil {
		m.watcher.EndWatch()
		m.watcher = nil
	}

	m.uninstallUsers(m.UserList)
	dbus.UnInstallObject(m)
}
Example #9
0
func (s *Setting) destroy() {
	s.lock.Lock()
	defer s.lock.Unlock()
	if s.core != nil {
		s.core.Unref()
		s.core = nil
	}
	dbus.UnInstallObject(s)
}
Example #10
0
func Stop() {
	if _sysInfo == nil {
		return
	}

	_sysInfo.logger.EndTracing()
	dbus.UnInstallObject(_sysInfo)
	_sysInfo = nil
}
Example #11
0
func (s *Audio) setPropSources(v []*Source) {
	for _, o := range s.Sources {
		dbus.UnInstallObject(o)
	}
	for _, o := range v {
		dbus.InstallOnSession(o)
	}
	s.Sources = v
	dbus.NotifyChange(s, "Sources")
}
Example #12
0
func (s *Audio) setPropSinkInputs(v []*SinkInput) {
	for _, o := range s.SinkInputs {
		dbus.UnInstallObject(o)
	}
	for _, o := range v {
		dbus.InstallOnSession(o)
	}
	s.SinkInputs = v
	dbus.NotifyChange(s, "SinkInputs")
}
Example #13
0
func (m *EntryManager) destroyEntry(appId string) {
	if e, ok := m.appEntries[appId]; ok {
		e.detachNormalApp()
		e.detachRuntimeApp()
		dbus.ReleaseName(e)
		dbus.UnInstallObject(e)
		logger.Info("destroyEntry:", appId)
	}
	delete(m.appEntries, appId)
}
Example #14
0
func Stop() {
	if manager == nil {
		return
	}

	destroyDbusDaemon()
	DestroyManager(manager)
	dbus.UnInstallObject(manager)
	manager = nil
	logger.EndTracing()
}
Example #15
0
func (m *Manager) destroy() {
	if m.settings != nil {
		m.settings.Unref()
		m.settings = nil
	}

	if m.td1 != nil {
		timedate1.DestroyTimedate1(m.td1)
		m.td1 = nil
	}

	dbus.UnInstallObject(m)
}
Example #16
0
func (self *Launcher) destroy() {
	if self.setting != nil {
		self.setting.destroy()
		launcher.setting = nil
	}
	if self.store != nil {
		storeApi.DestroyDStoreDesktop(self.store)
		self.store = nil
	}
	if self.appMonitor != nil {
		self.appMonitor.Close()
		self.appMonitor = nil
	}
	dbus.UnInstallObject(self)
}
Example #17
0
func (a *Audio) removeSinkInput(idx uint32) {
	var tryRemoveSinkInput *SinkInput
	var newSinkInputList []*SinkInput
	for _, si := range a.SinkInputs {
		if si.index == idx {
			tryRemoveSinkInput = si
		} else {
			newSinkInputList = append(newSinkInputList, si)
		}
	}

	if tryRemoveSinkInput != nil {
		dbus.UnInstallObject(tryRemoveSinkInput)
		a.SinkInputs = newSinkInputList
		dbus.NotifyChange(a, "SinkInputs")
	}
}
func (m *Manager) removeConnectionSession(session *ConnectionSession) {
	m.connectionSessionsLock.Lock()
	defer m.connectionSessionsLock.Unlock()

	dbus.UnInstallObject(session)

	i := m.getConnectionSessionIndex(session)
	if i < 0 {
		logger.Warning("connection session index is -1", session.sessionPath)
		return
	}

	copy(m.connectionSessions[i:], m.connectionSessions[i+1:])
	newlen := len(m.connectionSessions) - 1
	m.connectionSessions[newlen] = nil
	m.connectionSessions = m.connectionSessions[:newlen]
}
Example #19
0
func (m *Manager) destroy() {
	m.destroyThemes()
	m.dtheme.Destroy()
	m.gtk.Destroy()
	m.icon.Destroy()
	m.cursor.Destroy()
	m.sound.Destroy()
	m.bg.Destroy()
	m.greeter.Destroy()
	m.font.Destroy()

	Unref(m.settings)
	Unref(m.gnomeSettings)

	// if dbus.InstallOnSession() not called, what will happen?
	// Now(2014.14.18) it is ok.
	dbus.UnInstallObject(m)
}
Example #20
0
func (m *EntryProxyerManager) unregisterEntry(name string) {
	if !isEntryNameValid(name) {
		return
	}
	logger.Debugf("unregister entry: %s", name)
	entryId, ok := getEntryId(name)
	if !ok {
		return
	}
	logger.Debugf("unregister entry id: %s", entryId)

	// find the index
	index := -1
	var entry *EntryProxyer = nil
	for i, e := range m.Entries {
		if e.entryId == entryId {
			index = i
			entry = e
			break
		}
	}

	if index < 0 {
		logger.Warningf("slice out of bounds, entry len: %d, index: %d", len(m.Entries), index)
		return
	}
	logger.Debugf("entry len: %d, index: %d", len(m.Entries), index)

	if entry != nil {
		dbus.UnInstallObject(entry)
	}

	// remove the entry from slice
	copy(m.Entries[index:], m.Entries[index+1:])
	m.Entries[len(m.Entries)-1] = nil
	m.Entries = m.Entries[:len(m.Entries)-1]

	dbus.Emit(m, "Removed", entry.Id)

	logger.Infof("unregister entry success: %s", name)
}
Example #21
0
func (a *Audio) destroy() {
	close(a.siPollerExit)
	dbus.UnInstallObject(a)
}
Example #22
0
func (e *HideStateManager) destroy() {
	close(e.cleanToggleShowChan)
	dbus.UnInstallObject(e)
}
Example #23
0
func (m *Manager) destroy() {
	unregisterZoneArea()
	finalizeDBusIFC()
	dbus.UnInstallObject(m)
}
Example #24
0
func DestroyGrub2(grub *Grub2) {
	grub.stopUpdateLoop()
	dbus.UnInstallObject(grub.theme)
	dbus.UnInstallObject(grub)
}
Example #25
0
func DestroyBluetooth(b *Bluetooth) {
	bluezDestroyObjectManager(b.objectManager)
	dbus.UnInstallObject(bluetooth)
}
Example #26
0
func (media *MediaMount) destroy() {
	dbus.UnInstallObject(media)
	media.settings.Unref()
}
Example #27
0
func (ss *ScreenSaver) destroy() {
	dbus.UnInstallObject(ss)
}
Example #28
0
func (p *DockProperty) destroy() {
	dbus.UnInstallObject(p)
}
Example #29
0
func (dapp *DefaultApps) destroy() {
	dbus.UnInstallObject(dapp)
	if dapp.watcher != nil {
		dapp.watcher.EndWatch()
	}
}
func (a *XMouseAreaProxyer) destroy() {
	dbus.UnInstallObject(a)
}