[jcifs] Re: smb printers with jcifs
crh at ubiqx.mn.org
Sat Jun 15 08:08:41 EST 2002
On Fri, Jun 14, 2002 at 05:40:19PM -0400, Michael B. Allen wrote:
> The SHARE_INFO_1 structures, of which the type field you speak of is a
> member, are returned in the results array of the NetShareEnumResponse on
> lines 992 (list) and 1184 (listFiles) of jcifs/smb/SmbFile.java.
Thanks, Mike. / Michael: You got that? :)
> Of course
> you might also check SmbTree.service if an SMB_COM_TREE_CONNECT_ANDX has
> occured. I don't think I want four more isXxx methods but I would happy
> with one isPrinter. Or we could have some kind of getType method that
> returns SmbFile.TYPE_DISK, SmbFile.TYPE_PRINTER, SmbFile.TYPE_DEVICE, or
> SmbFile.TYPE_IPC (in which case we could drop isWorkgroup and add
> TYPE_WORKGROUP and TYPE_SERVER too).
In my *quick* read of the NetServerEnum2 description, it seems to me that
the TYPE_WORKGROUP, TYPE_SERVER, etc. represent a different class of
values. They seem to indicate which server type the server itself
The STYPE_DISKTREE, STYPE_PRINTQ seem to referr the share itself. I don't
see the two overlapping, but I do like the idea of a getType method in
> Whatever the case this is simply a matter of adding a serviceType member to
> SmbFile.java and ensuring that it is appropriately set in the few places
> where SmbFile objects may be created (grep for 'new SmbFile(') with
> particular attention being paid to the SmbFiles created in the listFiles
> method. It would be necessary to consider creation scenarios that have the
> potential to violate state consistency but that should not be too
> difficult; jCIFS ain't spaghetti.
No, it's good code. I've just been wildly busy. I suppose that's not
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/ -)----- crh at ubiqx.org
More information about the jcifs