srvdbus

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: 7 Imported by: 0

Documentation

Overview

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

Index

Constants

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

SrvObj is the Dbus object name for the service.

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

SrvPath is the Dbus path name for the service.

Variables

This section is empty.

Functions

func AppletDebug

func AppletDebug(applet string, state bool) error

AppletDebug forwards action set debug to a remote applet.

func SourceCodeBuildTarget

func SourceCodeBuildTarget() error

SourceCodeBuildTarget forwards action build source target to the dock.

func SourceCodeGrepTarget

func SourceCodeGrepTarget(data string) error

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

func SourceCodeOpenFile

func SourceCodeOpenFile(data string) error

SourceCodeOpenFile forwards action open source code file to the dock.

func SourceCodeVersions

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

func UploadFiles(filePath ...string) error

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

func UploadString

func UploadString(data string) error

UploadString forwards action upload string content to the dock.

Types

type AppService

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

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

Loader is a multi applet manager.

func NewLoader

func NewLoader(log cdtype.Logger) *Loader

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

func (*Loader) AppletDebug

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

AppletDebug change the debug state of an active applet.

func (*Loader) Connect

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

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

func (*Loader) SetManager

func (load *Loader) SetManager(mgr AppService)

SetManager sets the applet manager service.

func (*Loader) SourceCodeBuildTarget

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

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

func (*Loader) SourceCodeGrepTarget

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

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

func (*Loader) SourceCodeOpenFile

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

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

func (*Loader) SourceCodeVersions

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

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

func (*Loader) StartLoop

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

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

UploadFiles send files to a one-click hosting service.

func (*Loader) UploadString

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

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

type MgrDbus

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

Path Synopsis
Package dbuscommon provides a common dbus server and client base to extend.
Package dbuscommon provides a common dbus server and client base to extend.
Package dlogbus provides a Dbus service (and client) for a dock external launcher.
Package dlogbus provides a Dbus service (and client) for a dock external launcher.
Package dockbus provides a Dbus client for the main dock Dbus service.
Package dockbus provides a Dbus client for the main dock Dbus service.
Package dockpath defines paths used by the main dock dbus service.
Package dockpath defines paths used by the main dock dbus service.
Package mgrdbus provides a Dbus service (and client) for external applets management.
Package mgrdbus provides a Dbus service (and client) for external applets management.

Jump to

Keyboard shortcuts

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