docs.kde.org
The K3b DCOP Interface
Prev
Next

Chapter 4. The K3b DCOP Interface

Table of Contents

The default K3bInterface
K3bProjectInterface

K3b features, like many other KDE applications as well, a DCOP interface which makes it possible to control a part of it's functionality from e.g. a shellscript.

To use these DCOP functions you can either use the dcop commandline program or the more convenient Kdcop application. Both provide the same functionality so it's mostly a matter of taste and context of usage when deciding which way to choose.

This chapter assumes that you're using the dcop commandline program. To access K3b's DCOP functions, make sure that K3b is started and then enter something like this at a console:

# dcop k3b K3bInterface [function]

Besides the generic DCOP functions available to all KDE applications, K3b's DCOP interface mainly consists of two parts as described below.

The default K3bInterface

The default K3b DCOP interface provides functionality like copyCD, formatDVD, and methods for creating new projects.

DCOPRef createDataCDProject()
DCOPRef createAudioCDProject()
DCOPRef createMixedCDProject()
DCOPRef createVideoCDProject()
DCOPRef createMovixCDProject()
DCOPRef createDataDVDProject()
DCOPRef createVideoDVDProject()
DCOPRef createMovixDVDProject()
DCOPRef openProject(KURL url)
QValueList<DCOPRef> projects()
DCOPRef currentProject()
void copyCd()
void copyDvd()
void eraseCdrw()
void formatDvd()
void burnCdImage(KURL url)
void burnDvdImage(KURL url)

As result from one of the createXXXProject methods one gets a DCOP reference to the newly created project:

DCOPRef(k3b,K3bProject-0)

Alternatively you may create a project using the command line:

# k3b --audiocd

and then retrieve a reference to this project with

# dcop k3b K3bInterface currentProject

Using this reference it is possible to manipulate the project using the K3bProjectInterface.

Prev
Next
Home


docs.kde.org