dlogbus

package
v0.0.0-...-0caaa62 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2017 License: GPL-3.0-or-later Imports: 6 Imported by: 0

Documentation

Overview

Package dlogbus provides a Dbus service (and client) for a dock external launcher.

Index

Constants

View Source
const SrvObj = "org.cairodock.DockLog"

SrvObj is the Dbus object name for the service.

View Source
const SrvPath = "/org/cairodock/DockLog"

SrvPath is the Dbus path name for the service.

Variables

This section is empty.

Functions

func Action

func Action(action func(*Client) error) error

Action sends an action to the dlogbus server.

Types

type Client

type Client struct {
	*dbuscommon.Client
}

Client defines a Dbus client to connect to the dlogbus server.

func (*Client) Restart

func (client *Client) Restart() error

Restart sends the Restart action to the dlogbus server.

type Server

type Server struct {
	*dbuscommon.Server // Dbus connection.

	DockArgs []string
	// contains filtered or unexported fields
}

Server defines a Dbus server that manage the state of a cdc program.

func NewServer

func NewServer(dockArgs []string, log cdtype.Logger) *Server

NewServer creates a dlogbus server instance with cdc command args. Only one can be active.

func (*Server) Connect

func (o *Server) Connect() (bool, error)

Connect connects to the DBus API and starts the remote service.

func (*Server) DockRestart

func (o *Server) DockRestart() error

DockRestart restarts the dock.

func (*Server) DockStart

func (o *Server) DockStart() error

DockStart starts the dock.

func (*Server) DockStop

func (o *Server) DockStop() error

DockStop stops the dock.

func (*Server) IsStarted

func (o *Server) IsStarted() bool

IsStarted returns whether the managed dock is started or not.

func (*Server) Restart

func (o *Server) Restart() *dbus.Error

Restart restarts the dock.

func (*Server) SetArgs

func (o *Server) SetArgs(args []string) *Server

SetArgs sets the dock command args.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL