godock: github.com/sqp/godock/libs/srvdbus/dlogbus Index | Files

package dlogbus

import "github.com/sqp/godock/libs/srvdbus/dlogbus"

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


Package Files



const SrvObj = "org.cairodock.DockLog"

SrvObj is the Dbus object name for the service.

const SrvPath = "/org/cairodock/DockLog"

SrvPath is the Dbus path name for the service.

func Action Uses

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

Action sends an action to the dlogbus server.

type Client Uses

type Client struct {

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

func (*Client) Restart Uses

func (client *Client) Restart() error

Restart sends the Restart action to the dlogbus server.

type Server Uses

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 Uses

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 Uses

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

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

func (*Server) DockRestart Uses

func (o *Server) DockRestart() error

DockRestart restarts the dock.

func (*Server) DockStart Uses

func (o *Server) DockStart() error

DockStart starts the dock.

func (*Server) DockStop Uses

func (o *Server) DockStop() error

DockStop stops the dock.

func (*Server) IsStarted Uses

func (o *Server) IsStarted() bool

IsStarted returns whether the managed dock is started or not.

func (*Server) Restart Uses

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

Restart restarts the dock.

func (*Server) SetArgs Uses

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

SetArgs sets the dock command args.

Package dlogbus imports 6 packages (graph) and is imported by 1 packages. Updated 2016-09-13. Refresh now. Tools for package owners.