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

package srvdbus

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

Package srvdbus provides a Dbus service (and client) with dock applets management.

Index

Package Files

srvdbus.go

Constants

const SrvObj = "org.cairodock.GoDock"

SrvObj is the Dbus object name for the service.

const SrvPath = "/org/cairodock/GoDock"

SrvPath is the Dbus path name for the service.

func AppletDebug Uses

func AppletDebug(applet string, state bool) error

AppletDebug forwards action set debug to a remote applet.

func SourceCodeBuildTarget Uses

func SourceCodeBuildTarget() error

SourceCodeBuildTarget forwards action build source target to the dock.

func SourceCodeGrepTarget Uses

func SourceCodeGrepTarget(data string) error

SourceCodeGrepTarget forwards action grep text in source code to the dock.

func SourceCodeOpenFile Uses

func SourceCodeOpenFile(data string) error

SourceCodeOpenFile forwards action open source code file to the dock.

func SourceCodeVersions Uses

func SourceCodeVersions() (list []*versions.Repo, e error)

SourceCodeVersions get source versions data.

func UpToShareLastLink() (string, error)

UpToShareLastLink get the last uploaded link from the dock.

func UpToShareLinks() (string, error)

UpToShareLinks get all uploaded links from the dock.

func UploadFiles Uses

func UploadFiles(filePath ...string) error

UploadFiles forwards action upload files (location) to the dock.

func UploadString Uses

func UploadString(data string) error

UploadString forwards action upload string content to the dock.

type AppService Uses

type AppService interface {
    CountActive() int
    GetApplets(name string) (list []cdtype.AppInstance)
    Tick()
}

AppService defines common applets service actions to remotely interact with applets.

type Loader Uses

type Loader struct {
    *dbuscommon.Server // Dbus connection.
    // contains filtered or unexported fields
}

Loader is a multi applet manager.

func NewLoader Uses

func NewLoader(log cdtype.Logger) *Loader

NewLoader creates a loader with the given list of applets services.

func (*Loader) AppletDebug Uses

func (load *Loader) AppletDebug(applet string, state bool) *dbus.Error

AppletDebug change the debug state of an active applet.

func (*Loader) Connect Uses

func (load *Loader) Connect() (bool, error)

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

func (*Loader) SetManager Uses

func (load *Loader) SetManager(mgr AppService)

SetManager sets the applet manager service.

func (*Loader) SourceCodeBuildTarget Uses

func (load *Loader) SourceCodeBuildTarget() *dbus.Error

SourceCodeBuildTarget send data (raw text or file) to a one-click hosting service.

func (*Loader) SourceCodeGrepTarget Uses

func (load *Loader) SourceCodeGrepTarget(data string) *dbus.Error

SourceCodeGrepTarget send data (raw text or file) to a one-click hosting service.

func (*Loader) SourceCodeOpenFile Uses

func (load *Loader) SourceCodeOpenFile(data string) *dbus.Error

SourceCodeOpenFile send data (raw text or file) to a one-click hosting service.

func (*Loader) SourceCodeVersions Uses

func (load *Loader) SourceCodeVersions() (out []byte, err *dbus.Error)

SourceCodeVersions gets versions data. returned json: []*versions.Repo

func (*Loader) StartLoop Uses

func (load *Loader) StartLoop()

StartLoop handle applets until there's none of them alive.

func (load *Loader) UpToShareLastLink() (string, *dbus.Error)

UpToShareLastLink gets the link of the last item sent to a one-click hosting service.

func (load *Loader) UpToShareLinks() (out []map[string]string, e *dbus.Error)

UpToShareLinks gets all links of items sent to one-click hosting services.

func (*Loader) UploadFiles Uses

func (load *Loader) UploadFiles(data []string) *dbus.Error

UploadFiles send files to a one-click hosting service.

func (*Loader) UploadString Uses

func (load *Loader) UploadString(data string) *dbus.Error

UploadString send raw text to a one-click hosting service.

type MgrDbus Uses

type MgrDbus interface {
    IsActive(path string) bool
    OnSignal(path string, s *dbus.Signal) bool
}

MgrDbus defines actions needed by the Dbus grouped applets manager.

Directories

PathSynopsis
dbuscommonPackage dbuscommon provides a common dbus server and client base to extend.
dlogbusPackage dlogbus provides a Dbus service (and client) for a dock external launcher.
dockbusPackage dockbus provides a Dbus client for the main dock Dbus service.
dockpathPackage dockpath defines paths used by the main dock dbus service.
mgrdbusPackage mgrdbus provides a Dbus service (and client) for external applets management.

Package srvdbus imports 7 packages (graph) and is imported by 3 packages. Updated 2017-12-01. Refresh now. Tools for package owners.