delegator

package
v0.0.0-...-9514eed Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2016 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// JobDestination is dbus destination for backend and operations
	JobDestination = "com.deepin.filemanager.Backend.Operations"
	// JobObjectPath is dbus object path for backend and operations.
	JobObjectPath = "/com/deepin/filemanager/Backend/Operations"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChmodJob

type ChmodJob struct {
	Done func(string)
	// contains filtered or unexported fields
}

ChmodJob exports to dbus.

func NewChmodJob

func NewChmodJob(uri string, permission uint32) *ChmodJob

NewChmodJob creates a new ChmodJob for dbus.

func (*ChmodJob) Execute

func (job *ChmodJob) Execute()

Execute chmod job.

func (*ChmodJob) GetDBusInfo

func (job *ChmodJob) GetDBusInfo() dbus.DBusInfo

type ChownJob

type ChownJob struct {
	Done func(string)
	// contains filtered or unexported fields
}

ChownJob exports to dbus.

func NewChownJob

func NewChownJob(uri string, newOwner string, newGroup string) *ChownJob

NewChownJob creates a new chown job for dbus.

func (*ChownJob) Execute

func (job *ChownJob) Execute()

Execute chown job.

func (*ChownJob) GetDBusInfo

func (job *ChownJob) GetDBusInfo() dbus.DBusInfo

GetDBusInfo returns dbus information.

type CopyJob

type CopyJob struct {
	Done             func(string)
	TotalAmount      func(int64, uint16)
	ProcessedAmount  func(int64, uint16)
	ProcessedPercent func(int64)
	Copying          func(string)
	Aborted          func()
	// contains filtered or unexported fields
}

CopyJob exports to dbus.

func NewCopyJob

func NewCopyJob(srcUrls []string, destDirURL string, targetName string, flags uint32, uiDelegate IUIDelegate) *CopyJob

NewCopyJob creates a new copy job for dbus.

func (*CopyJob) Abort

func (job *CopyJob) Abort()

Abort the job.

func (*CopyJob) Execute

func (job *CopyJob) Execute()

Execute copy job.

func (*CopyJob) GetDBusInfo

func (job *CopyJob) GetDBusInfo() dbus.DBusInfo

GetDBusInfo returns dbus information.

type CreateJob

type CreateJob struct {
	Done func(string, string)
	// contains filtered or unexported fields
}

CreateJob exports to dbus.

func NewCreateDirectoryJob

func NewCreateDirectoryJob(destDirURL string, dirname string, uiDelegate IUIDelegate) *CreateJob

NewCreateDirectoryJob creates a new create job to create a new directory.

func NewCreateFileFromTemplateJob

func NewCreateFileFromTemplateJob(uri string, tempateURL string, uiDelegate IUIDelegate) *CreateJob

NewCreateFileFromTemplateJob creates a new create job to create a new file from a template.

func NewCreateFileJob

func NewCreateFileJob(destDirURL string, filename string, initContent []byte, uiDelegate IUIDelegate) *CreateJob

NewCreateFileJob creates a new create job to create a new file.

func NewLinkJob

func NewLinkJob(srcURL string, destDirURL string, uiDelegate IUIDelegate) *CreateJob

NewLinkJob creates a new job to creates a link.

func (*CreateJob) Execute

func (job *CreateJob) Execute()

Execute create job.

func (*CreateJob) GetDBusInfo

func (job *CreateJob) GetDBusInfo() dbus.DBusInfo

GetDBusInfo returns dbus information.

type DefaultLaunchAppInfo

type DefaultLaunchAppInfo struct {
	Name string
	Id   string
}

type DeleteJob

type DeleteJob struct {
	Done             func()
	TotalAmount      func(int64, uint16)
	ProcessedAmount  func(int64, uint16)
	ProcessedPercent func(int64)
	Aborted          func()
	Deleting         func(string)
	// contains filtered or unexported fields
}

DeleteJob exports to dbus.

func NewDeleteJob

func NewDeleteJob(urls []string, shouldConfirm bool, uiDelegate IUIDelegate) *DeleteJob

NewDeleteJob creates a new delete job for dbus.

func (*DeleteJob) Abort

func (job *DeleteJob) Abort()

Abort the job.

func (*DeleteJob) Execute

func (job *DeleteJob) Execute()

Execute delete job.

func (*DeleteJob) GetDBusInfo

func (job *DeleteJob) GetDBusInfo() dbus.DBusInfo

GetDBusInfo returns dbus information.

type EmptyTrashJob

type EmptyTrashJob struct {
	Done func()
	// contains filtered or unexported fields
}

EmptyTrashJob for dbus.

func NewEmptyTrashJob

func NewEmptyTrashJob(shouldConfirmTrash bool, uiDelegate IUIDelegate) *EmptyTrashJob

NewEmptyTrashJob creates a new EmptyTrashJob for dbus.

func (*EmptyTrashJob) Execute

func (job *EmptyTrashJob) Execute()

Execute empty trash job.

func (*EmptyTrashJob) GetDBusInfo

func (job *EmptyTrashJob) GetDBusInfo() dbus.DBusInfo

GetDBusInfo returns dbus information.

type GetAllLaunchAppsJob

type GetAllLaunchAppsJob struct {
	Done          func(string)
	LaunchAppInfo func(string)
	// contains filtered or unexported fields
}

func NewGetAllLaunchAppsJob

func NewGetAllLaunchAppsJob() *GetAllLaunchAppsJob

func (*GetAllLaunchAppsJob) Execute

func (job *GetAllLaunchAppsJob) Execute()

func (*GetAllLaunchAppsJob) GetDBusInfo

func (job *GetAllLaunchAppsJob) GetDBusInfo() dbus.DBusInfo

type GetDefaultLaunchAppJob

type GetDefaultLaunchAppJob struct {
	Done                 func(string)
	DefaultLaunchAppInfo func(string)
	// contains filtered or unexported fields
}

GetDefaultLaunchAppJob exports to dbus.

func NewGetDefaultLaunchAppJob

func NewGetDefaultLaunchAppJob(uri string, mustSupportURI bool) *GetDefaultLaunchAppJob

NewGetDefaultLaunchAppJob creates a new GetLaunchAppJob for dbus.

func (*GetDefaultLaunchAppJob) Execute

func (job *GetDefaultLaunchAppJob) Execute()

Execute GetDefaultLaunchAppJob.

func (*GetDefaultLaunchAppJob) GetDBusInfo

func (job *GetDefaultLaunchAppJob) GetDBusInfo() dbus.DBusInfo

GetDBusInfo returns dbus information.

type GetRecommendedLaunchAppsJob

type GetRecommendedLaunchAppsJob struct {
	Done                     func(string)
	RecommendedLaunchAppInfo func(string)
	// contains filtered or unexported fields
}

func NewGetRecommendedLaunchAppsJob

func NewGetRecommendedLaunchAppsJob(uri string) *GetRecommendedLaunchAppsJob

func (*GetRecommendedLaunchAppsJob) Execute

func (job *GetRecommendedLaunchAppsJob) Execute()

func (*GetRecommendedLaunchAppsJob) GetDBusInfo

func (job *GetRecommendedLaunchAppsJob) GetDBusInfo() dbus.DBusInfo

type GetTemplateJob

type GetTemplateJob struct {
	// contains filtered or unexported fields
}

func NewGetTemplateJob

func NewGetTemplateJob(templateDirURI string) *GetTemplateJob

NewListJob creates a new list job for dbus.

func (*GetTemplateJob) Execute

func (job *GetTemplateJob) Execute() []string

func (*GetTemplateJob) GetDBusInfo

func (job *GetTemplateJob) GetDBusInfo() dbus.DBusInfo

GetDBusInfo returns dbus information.

type IUIDelegate

type IUIDelegate operations.IUIDelegate

IUIDelegate is the interface for UIDelegate, a alias for operations.IUIDelegate.

func NewUIDelegate

func NewUIDelegate(conn *dbus.Conn, dest string, objPath string, iface string) (IUIDelegate, error)

NewUIDelegate creates a new UIDelegate for dbus.

type IUndoManager

type IUndoManager interface{}

TODO: make a real interface.

type LaunchAppInfo

type LaunchAppInfo struct {
	Names []string
	Ids   []string
}

type ListJob

type ListJob struct {
	EntryInfo       func(operations.ListProperty)
	Done            func(string)
	ProcessedAmount func(int64, uint16)
	Aborted         func()
	// contains filtered or unexported fields
}

ListJob exports to dbus.

func NewListJob

func NewListJob(path string, flags operations.ListJobFlag) *ListJob

NewListJob creates a new list job for dbus.

func (*ListJob) Abort

func (job *ListJob) Abort()

Abort the job.

func (*ListJob) Execute

func (job *ListJob) Execute() []operations.ListProperty

Execute list job.

func (*ListJob) GetDBusInfo

func (job *ListJob) GetDBusInfo() dbus.DBusInfo

GetDBusInfo returns dbus information.

type MoveJob

type MoveJob struct {
	Done             func(string)
	TotalAmount      func(int64, uint16)
	ProcessedAmount  func(int64, uint16)
	ProcessedPercent func(int64)
	Moving           func(string)
	Aborted          func()
	// contains filtered or unexported fields
}

MoveJob exports to dbus.

func NewMoveJob

func NewMoveJob(srcUrls []string, destDirURL string, targetName string, flags uint32, uiDelegate IUIDelegate) *MoveJob

NewMoveJob creates a new move job for dbus.

func (*MoveJob) Abort

func (job *MoveJob) Abort()

Abort the job.

func (*MoveJob) Execute

func (job *MoveJob) Execute()

Execute move job.

func (*MoveJob) GetDBusInfo

func (job *MoveJob) GetDBusInfo() dbus.DBusInfo

GetDBusInfo returns dbus information.

type RenameJob

type RenameJob struct {
	Done func(string)
	// TODO: it maybe be better that using 'Renamed func(newFile string, oldName string)' as signal.
	OldName func(string)
	NewFile func(string)
	// contains filtered or unexported fields
}

func NewRenameJob

func NewRenameJob(fileURL string, newName string) *RenameJob

func (*RenameJob) Execute

func (job *RenameJob) Execute()

func (*RenameJob) GetDBusInfo

func (job *RenameJob) GetDBusInfo() dbus.DBusInfo

type Response

type Response struct {
	Code       int32
	ApplyToAll bool
	UserData   string
}

Response will be used to store dbus result, because private fields cannot be accessed.

type SetDefaultLaunchAppJob

type SetDefaultLaunchAppJob struct {
	Done func(string)
	// contains filtered or unexported fields
}

SetDefaultLaunchAppJob exports to dbus.

func NewSetDefaultLaunchAppJob

func NewSetDefaultLaunchAppJob(id string, mimeType string) *SetDefaultLaunchAppJob

NewSetDefaultLaunchAppJob creates a new SetLaunchAppJob for dbus.

func (*SetDefaultLaunchAppJob) Execute

func (job *SetDefaultLaunchAppJob) Execute()

Execute SetDefaultLaunchAppJob.

func (*SetDefaultLaunchAppJob) GetDBusInfo

func (job *SetDefaultLaunchAppJob) GetDBusInfo() dbus.DBusInfo

GetDBusInfo returns dbus information.

type StatJob

type StatJob struct {
	Stat func(operations.StatProperty)
	Done func(string)
	// contains filtered or unexported fields
}

StatJob exports to dbus.

func NewStatJob

func NewStatJob(uri string) *StatJob

NewStatJob creates a new stat job for dbus.

func (*StatJob) Execute

func (job *StatJob) Execute()

Execute stat job.

func (*StatJob) GetDBusInfo

func (job *StatJob) GetDBusInfo() dbus.DBusInfo

GetDBusInfo returns dbus information.

type TrashJob

type TrashJob struct {
	Done             func()
	Trashing         func(string)
	Deleting         func(string)
	ProcessedAmount  func(int64, uint16)
	ProcessedPercent func(int64)
	Aborted          func()
	// contains filtered or unexported fields
}

TrashJob exports to dbus.

func NewTrashJob

func NewTrashJob(urls []string, shouldConfirmTrash bool, uiDelegate IUIDelegate) *TrashJob

NewTrashJob creates a new trash job for dbus.

func (*TrashJob) Abort

func (job *TrashJob) Abort()

Abort the job.

func (*TrashJob) Execute

func (job *TrashJob) Execute()

Execute trash job.

func (*TrashJob) GetDBusInfo

func (job *TrashJob) GetDBusInfo() dbus.DBusInfo

GetDBusInfo returns dbus information.

type UIDelegate

type UIDelegate struct {
	// contains filtered or unexported fields
}

UIDelegate is a proxy for dbus UIDelegate.

func (*UIDelegate) AskDelete

func (delegate *UIDelegate) AskDelete(primaryText string, secondaryText string, detailText string, flags operations.UIFlags) operations.Response

AskDelete asks user whether delete.

func (*UIDelegate) AskDeleteConfirmation

func (delegate *UIDelegate) AskDeleteConfirmation(primaryText string, secondaryText string, detailText string) bool

AskDeleteConfirmation asks for the confirm for delete.

func (*UIDelegate) AskRetry

func (delegate *UIDelegate) AskRetry(primaryText string, secondaryText string, detailText string) operations.Response

AskRetry asks user whether to retry this operation.

func (*UIDelegate) AskSkip

func (delegate *UIDelegate) AskSkip(primaryText string, secondaryText string, detailText string, flags operations.UIFlags) operations.Response

AskSkip asks user whether skip this error.

func (*UIDelegate) ConflictDialog

func (delegate *UIDelegate) ConflictDialog() operations.Response

ConflictDialog is used for the conflict situaction like copy.

type UndoManager

type UndoManager struct {
	UndoAvailable        func(bool)
	UndoJobFinished      func()
	UndoTextChanged      func(string)
	JobRecordingStarted  func(int32) // op
	JobRecordingFinished func(int32) //op
}

TODO: make a dbus undomanager.

func (*UndoManager) Undo

func (*UndoManager) Undo()

Jump to

Keyboard shortcuts

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