You're right, there's no standard API, so you must design one yourself. The spec is quite clear that it is outside the requirements of the specification to define APIs for certain device classes because that would reduce flexibility. The spec would also need to be updated for changes and advances in technology.
Cheers Christopher Armstrong [email protected] ----- Original message ----- > Christopher and Miguel > > Thank you for your comments. > > What I would like to realize is: > the client bundle, which would like to use USB disk as a storage, > calls Java API (OSGi Service) indepnedent of OS. > > As far as I know, there is no such API standardized. > Therefore, people would define such API by themselves. > It results in lack of portability; the client bundle can work with only > their environment. > > Don't we need to have such standardized Java API(OSGi Service) for it ? > > Best regards, > > Ikuo > > On Tue, 16 Feb 2010 08:10:42 +0100 > Miguel <[email protected]> wrote: > > Miguel> other faster solution on linux is to use udev rules(m...@mcm:~$ ls > Miguel> /etc/udev/rules.d/). This way you can add a rule which runs a script > when a Miguel> usb dongle is switch on. > Miguel> > Miguel> Miguel > Miguel> > Miguel> > Miguel> On Tue, Feb 16, 2010 at 7:20 AM, Christopher Armstrong < > Miguel> [email protected]> wrote: > Miguel> > Miguel> > > Miguel> > No, no such API exists. You will need to implement a driver for USB > events Miguel> > and devices yourself. > Miguel> > > Miguel> > On Linux, it is possible to incorporate DBus-Java into a bundle and > talk to Miguel> > the HAL daemon for events. HAL has device nodes specifically > for USB Miguel> > devices, storage devices and also for "volumes" that appear > on > a disk. It Miguel> > has a specific interface > (org.freedesktop.Hal.Device.Volume > IIRC) for volume Miguel> > devices that lets you mount/unmount and lock the > volume. Miguel> > > Miguel> > On Windows, you might be able to write something that talks to the > Windows Miguel> > driver layer. > Miguel> > > Miguel> > Cheers > Miguel> > Chris > Miguel> > > Miguel> > > Miguel> > On 16/02/2010, at 10:58 AM, Ikuo Yamasaki wrote: > Miguel> > > Miguel> > Hi all, > Miguel> >> > Miguel> >> As far as I know, there is no OSGi Service API for USB Device (like > UPnP Miguel> >> Device Service Spec.), while Device Access Spec. mentions > about > USB Miguel> >> Device, just an example. > Miguel> >> > Miguel> >> I wonder if there is any common way to handle USB Device of > Miguel> >> storage device (USB disk) in OSGi. > Miguel> >> > Miguel> >> What the client bundle needs to do is > Miguel> >> > Miguel> >> - notified events of attachement or detachement of a USB disk. > Miguel> >> - with the knowledge of the file path of the top node of the USB > Miguel> >> disk. > Miguel> >> > Miguel> >> Best regards, > Miguel> >> > Miguel> >> --------------------- > Miguel> >> NTT Cyber Solutions Laboratories > Miguel> >> > Miguel> >> Ikuo YAMASAKI > Miguel> >> E-mail: [email protected] > Miguel> >> TEL +81-46-859-8537 FAX +81-46-855-1282 > Miguel> >> > Miguel> >> > Miguel> >> _______________________________________________ > Miguel> >> OSGi Developer Mail List > Miguel> >> [email protected] > Miguel> >> https://mail.osgi.org/mailman/listinfo/osgi-dev > Miguel> >> > Miguel> > > Miguel> > -------- > Miguel> > Christopher Armstrong > Miguel> > [email protected] > Miguel> > > Miguel> > > Miguel> > > Miguel> > > Miguel> > > Miguel> > > Miguel> > _______________________________________________ > Miguel> > OSGi Developer Mail List > Miguel> > [email protected] > Miguel> > https://mail.osgi.org/mailman/listinfo/osgi-dev > Miguel> > > > > > _______________________________________________ > OSGi Developer Mail List > [email protected] > https://mail.osgi.org/mailman/listinfo/osgi-dev _______________________________________________ OSGi Developer Mail List [email protected] https://mail.osgi.org/mailman/listinfo/osgi-dev
