![]() |
Joe Phillips <jaiger@net-foundry.com> writes: > On Fri, May 05, 2000 at 04:36:37PM +0200, Ulrich Eckhardt wrote: > > Dmitry Bely wrote: > > > > whats about an option for HylaFAX to specify a sort order independend > > from the JobFmt paramters and Protocol. Something like a SortFmt which > > uses nearly the same syntax like JobFmt but specifys the sort order > > of the queues ? > > > > This should help all clients. > > I vote against this. I see job sorting as the client's responsibility. The > client is a view of the data on the server. Why complicate the server just > for sorting? Adding a SortFmt command to the protocol could also increase > network overhead (for IMHO useless features.) Every time the user decides > they want to sort by some other field, the SortFmt string is sent and then > the joblist is queried (again) from the server. The same data could be > transmitted many times over. Without a SortFmt, the data is sent once > and the client can sort and re-sort at will without utilizing the network. Agree completely (and disagree with Ulrich :-)) Parsing list data is an easy task -- you can set comma (or tab) separated format via JOBFMT/RECVFMT commands: "%-3j,%3i,%1a,%6.6o,%-12.12e,%5P,%5D,%7z,%.25s,%k" and then split the fields by strtok() or similar function on the client's side. Once you've parsed the data, sort/display them as user needs -- he/she might want to change sorting interactively just by selecting an appropriate column. The WHFC's approach, displaying data from the server without any processing is *wrong* (IMHO). Hope to hear from you soon, Dmitry