def _connect(self, callback=None):
     self._connecting = True
     asyncconn.Connection(host=self._host,
                          port=self._port,
                          encryption=self._encryption,
                          reply_handler=self._connected,
                          error_handler=self._connected)
 def __init__(self):
     self.bus = dbus.SessionBus()
     bus_name = dbus.service.BusName(CONFIG_BUS, bus=self.bus)
     dbus.service.Object.__init__(self, bus_name, CONFIG_PATH)
     self._cupsconn = asyncconn.Connection()
     self._pathn = 0
     self._jobapplet = None
     self._jobappletpath = None
     self._ppds = None
     self._language = locale.getlocale(locale.LC_MESSAGES)[0]
Example #3
0
 def _query_cups(self):
     debugprint("Asking CUPS for PPDs")
     if (not self._conn):
         c = asyncconn.Connection(host=self._host,
                                  encryption=self._encryption,
                                  reply_handler=self._cups_connect_reply,
                                  error_handler=self._cups_error)
         self._conn = c
     else:
         self._cups_connect_reply(self._conn, None)