Back to index

system-config-printer  1.3.9+20120706
Classes | Functions | Variables
scp-dbus-service Namespace Reference

Classes

class  KillTimer
class  FetchedPPDs
class  GetBestDriversRequest
class  GroupPhysicalDevicesRequest
class  ConfigPrintingNewPrinterDialog
class  ConfigPrintingPrinterPropertiesDialog
class  ConfigPrintingJobApplet
class  ConfigPrinting

Functions

def _client_demo

Variables

string CONFIG_BUS = 'org.fedoraproject.Config.Printing'
string CONFIG_PATH = '/org/fedoraproject/Config/Printing'
string CONFIG_IFACE = 'org.fedoraproject.Config.Printing'
string CONFIG_NEWPRINTERDIALOG_IFACE = ".NewPrinterDialog"
string CONFIG_PRINTERPROPERTIESDIALOG_IFACE = ".PrinterPropertiesDialog"
string CONFIG_JOBVIEWER_IFACE = ".JobViewer"
 g_ppds = None
 g_killtimer = None
 client_demo = False
tuple loop = gobject.MainLoop()
tuple cp = ConfigPrinting()

Function Documentation

def scp-dbus-service._client_demo ( ) [private]

Definition at line 466 of file scp-dbus-service.py.

00466 
00467 def _client_demo ():
00468     # Client demo
00469     if len (sys.argv) > 2:
00470         device_uri = sys.argv[2]
00471         device_id = ''
00472         if (len (sys.argv) > 4 and
00473             sys.argv[3] == '--devid'):
00474             device_id = sys.argv[4]
00475     else:
00476         print "Device URI required"
00477         return
00478 
00479     import gtk
00480     bus = dbus.SessionBus ()
00481     obj = bus.get_object (CONFIG_BUS, CONFIG_PATH)
00482     iface = dbus.Interface (obj, CONFIG_IFACE)
00483     path = iface.NewPrinterDialog ()
00484     debugprint (path)
00485 
00486     obj = bus.get_object (CONFIG_BUS, path)
00487     iface = dbus.Interface (obj, CONFIG_NEWPRINTERDIALOG_IFACE)
00488     loop = gobject.MainLoop ()
00489     def on_canceled(path=None):
00490         print "%s: Dialog canceled" % path
00491         loop.quit ()
00492 
00493     def on_added(name, path=None):
00494         print "%s: Printer '%s' added" % (path, name)
00495         loop.quit ()
00496 
00497     w = gtk.Window ()
00498     w.show_now ()
00499     iface.connect_to_signal ("DialogCanceled", on_canceled,
00500                              path_keyword="path")
00501     iface.connect_to_signal ("PrinterAdded", on_added,
00502                              path_keyword="path")
00503 
00504     iface.NewPrinterFromDevice (w.window.xid, device_uri, device_id)
00505     loop.run ()


Variable Documentation

scp-dbus-service.client_demo = False

Definition at line 522 of file scp-dbus-service.py.

string scp-dbus-service.CONFIG_BUS = 'org.fedoraproject.Config.Printing'

Definition at line 41 of file scp-dbus-service.py.

string scp-dbus-service.CONFIG_IFACE = 'org.fedoraproject.Config.Printing'

Definition at line 43 of file scp-dbus-service.py.

string scp-dbus-service.CONFIG_JOBVIEWER_IFACE = ".JobViewer"

Definition at line 46 of file scp-dbus-service.py.

string scp-dbus-service.CONFIG_NEWPRINTERDIALOG_IFACE = ".NewPrinterDialog"

Definition at line 44 of file scp-dbus-service.py.

string scp-dbus-service.CONFIG_PATH = '/org/fedoraproject/Config/Printing'

Definition at line 42 of file scp-dbus-service.py.

string scp-dbus-service.CONFIG_PRINTERPROPERTIESDIALOG_IFACE = ".PrinterPropertiesDialog"

Definition at line 45 of file scp-dbus-service.py.

tuple scp-dbus-service.cp = ConfigPrinting()

Definition at line 537 of file scp-dbus-service.py.

tuple scp-dbus-service.g_killtimer = None

Definition at line 49 of file scp-dbus-service.py.

scp-dbus-service.g_ppds = None

Definition at line 48 of file scp-dbus-service.py.

tuple scp-dbus-service.loop = gobject.MainLoop()

Definition at line 535 of file scp-dbus-service.py.