I need to enable/disable print button in my application based on status of available printers.
For USB drivers, I am checking sysfs ( /sys/class/usbmisc/lp0/dev ). But for Network drivers I didn't get such node. So I am using lpstate -p command to get status. If status is idle or ready, I accept it as network printer is available.
Is there a better way of checking network printer status??