[Qt-interest] Block Device File I/O
Alex
shao.tu at gmail.com
Tue Jun 1 05:22:31 CEST 2010
Thanks reply.
My goal is very simple.
What I want to do is writing a disk file to /dev/nstXX.
Yes, the /dev/nstXX is the standard mount point for a tape drive under
Linux.
Also, yes, I just want to develop an archive application using QT framework.
I agree with you that I may implement my own class inherits QIODevice to
achieve.
But, my problem is that I have no idea how to implement the real I/O action
under QT framework.
Especially for a block device file.
Can anybody help me?
Alex
2010/6/1 Rohan Prabhu <rohan at rohanprabhu.com>
> Qt does not have any native functions that support direct interaction
> with devices. Thinking about it, when Qt does not even support a
> standard as universal as USB, it is almost impossible to imagine
> and/or expect Qt to support devices. This is so that maintaining
> cross-platform support amongst the various devices that are possible
> is just way too complicated, and not all devices have an abstraction
> defined within their host operating system, thereby making a
> generalization (what you would expect of a toolkit like Qt) is simply
> impossible and would rather make things more cumbersome. Drivers for
> standards like USB are written over the interface and have their own
> added problems.
>
> If, the drivers on your system do make the magnetic tape readable in a
> sense that it mounts to a volume, a partition or a mount point, then
> you can definitely use one of the subclasses of QIODevice (or you may
> have to make one on your own) for your purpose. If your magnetic tape
> is mounted as /dev/mag0, then maybe you can use QFile with it provided
> that Qt reads attributes from such mount points well and thereby sets
> various properties like sequential etc. properly. From what I believe,
> such should be the case, but I can't be very sure.
>
> Least to say, the description of your problem is very vague and short.
> You're asking for something that from the first sight doesn't seem to
> be a common question. You would like to elaborate it further and
> provide more details.
>
> Regards,
> Rohan
>
> On Tue, Jun 1, 2010 at 7:28 AM, Alex <shao.tu at gmail.com> wrote:
> > Hi,
> >
> >
> > Did anybody experience to read/write data to/from a magnetic tape unsing
> > native QT method?
> > How do I do that?
> > Thanks!
> >
> >
> > Alex
> >
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
> >
> >
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100601/3cf92c18/attachment.html
More information about the Qt-interest-old
mailing list