ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] Как eject'ить CD с помощью dbus
@ 2010-10-29 17:20 Андрей Черепанов
  0 siblings, 0 replies; only message in thread
From: Андрей Черепанов @ 2010-10-29 17:20 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]

Возникла задача - грамотно извлечь CD по кнопке на клавиатуре. Можно было 
повешать eject, но при этом не будет сообщения в KDE4 о невозможности 
извлечения (к примеру). Хочется сделать через dbus-send, но qdbus(viewer) не 
показывает ничего про Solid, хотя у Solid в коде прописывается интерфейс 

Q_DECLARE_INTERFACE(Solid::Ifaces::OpticalDrive, 
"org.kde.Solid.Ifaces.OpticalDrive/0.1")

и вызов:

bool Solid::OpticalDrive::eject()
{
    Q_D(OpticalDrive);
    return_SOLID_CALL(Ifaces::OpticalDrive *, d->backendObject(), false, 
eject());
}

а dbus-monitor при извлечении по кнопке в нотификаторе выдаёт:

method call sender=:1.121 -> dest=org.freedesktop.DBus serial=153 
path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string 
"type='signal',path='/org/kde/solid/HalDevice_/org/freedesktop/Hal/devices/storage_model_DVD_RAM_UJ_861H',interface='org.kde.solid.HalDevice',member='ejectRequested'"


P.S. Мопед не мой, я только объяву разместил. :)

-- 
Андрей Черепанов
ALT Linux
cas@altlinux.ru

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-10-29 17:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-29 17:20 [devel] Как eject'ить CD с помощью dbus Андрей Черепанов

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git