Version: v0.0.0-...-520a03a Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2021 License: GPL-3.0 Imports: 8 Imported by: 0




View Source
const (
	DBusPath = "/com/deepin/daemon/Logined"


This section is empty.


func Unregister

func Unregister(m *Manager)

Unregister destroy and free Manager object


type Manager

type Manager struct {
	UserList       string
	LastLogoutUser uint32
	// contains filtered or unexported fields

Manager manager logined user list

func Register

func Register(logger *log.Logger, service *dbusutil.Service) (*Manager, error)

Register register and install loginedManager on dbus

func (*Manager) GetExportedMethods

func (v *Manager) GetExportedMethods() dbusutil.ExportedMethods

func (*Manager) GetInterfaceName

func (*Manager) GetInterfaceName() string

type SessionInfo

type SessionInfo struct {
	// Active  bool
	Uid     uint32
	Desktop string
	Display string
	// contains filtered or unexported fields

SessionInfo Show logined session info, if type is tty or ssh, no desktop and display

func (*SessionInfo) Equal

func (info *SessionInfo) Equal(target *SessionInfo) bool

Equal Check whether equal with target

type SessionInfos

type SessionInfos []*SessionInfo

SessionInfos Logined session list

func (SessionInfos) Add

func (infos SessionInfos) Add(info *SessionInfo) (SessionInfos, bool)

Add Add user to list, if exist and equal, return false else replace it, return true

func (SessionInfos) Delete

func (infos SessionInfos) Delete(p dbus.ObjectPath) (SessionInfos, bool)

Delete Delete user from list, if deleted, return true

func (SessionInfos) Index

func (infos SessionInfos) Index(p dbus.ObjectPath) int32

Index Find the user position in list, if not found, return -1

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL