From: Jake H. <jh...@po...> - 2005-01-28 15:04:01
|
The link for EROS in my last e-mail was incorrect. It should have been: http://www.eros-os.org/ Since I didn't have a good example of d-bus/GNOME integration, here is one from the IBM article: == Even though D-BUS is relatively new, it has been adopted very quickly. As I mentioned earlier, udev can be built with D-BUS support so that it sends a signal when a device is hot-plugged. Any application can listen to these events and perform actions when they are received. For example, gnome-volume-manager can detect the insertion of a USB memory stick and automatically mount it; or, it can automatically download photos when a digital camera is plugged in. A more amusing but far less useful example is the combination of Jamboree and Ringaling. Jamboree is a simple music player that has a D-BUS interface so that it can be told to play, go to the next song, change the volume, and so on. Ringaling is a small program that opens /dev/ttyS0 (a serial port) and watches what is received. When Ringaling sees the text "RING," it uses D-BUS to tell Jamboree to turn down the volume. The net result is that if you have a modem plugged into your computer and your phone rings, the music is turned down for you. This is what computers are for! == Pretty cool hack! Even cooler would be to detect that your cellphone is ringing using some sort of Bluetooth notification, or you could try to detect if anyone's phone is ringing using a microphone and an FFT analysis to listen for "ringing" sounds. Then you would only need to write a replacement for Ringaling and Jamboree, or in our case Coldfish, would continue to work unchanged. A further hypothetical: this "ring" notification app could be wired by the user to implement an arbitrary user or system-wide policy such as lowering the volume on all audio output devices, perhaps by triggering a script or a plugin dll. Or there might be multiple apps that want to listen for this event. On that note, I discovered another article describing a way in which you could abstract services using d-bus where it wouldn't matter which application you were using to do something. It sounds somewhat like how Amiga apps could be scripting using ARexx or Mac apps could be scripted with AppleScript and OSA, but more generic between applications. http://code.eikke.com/DesktopAbstractionLayer/presentation-1.txt I had a CS professor at my university, Dr. Craig Rich, who had a pretty neat layout of his applications and documents on his Mac (this was before OS X). He renamed all of his applications from whatever their original names were to generic names, for example Netscape was renamed to "Web Browser" and Eudora became "E-Mail Client". In the Mac world, renaming the executable generally doesn't break anything. He could then change e-mail clients, for example, and of course the icon would change, but the name would be the same and so the app would be alphabetized into the same place in the Apple quick launch menu. Also notice that Windows only has user associations for certain types of Internet locations (HTML, e-mail, news) plus file extensions and events such as inserting a blank CD-R or a DVD movie. You can choose the default audio output device or what happens when you double-click on a .mp3 file, but if there is a certain activity that isn't tied to a particular data file or URL, for example the default "TV tuner" app, I'm not sure how you would specify that except through some special registry key or something. -Jake |