Back to index

system-config-printer  1.3.9+20120706
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
probe_printer.BackgroundSmbAuthContext Class Reference
Inheritance diagram for probe_printer.BackgroundSmbAuthContext:
Inheritance graph
[legend]
Collaboration diagram for probe_printer.BackgroundSmbAuthContext:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def perform_authentication

Public Attributes

 passes

Private Member Functions

def _do_perform_authentication

Private Attributes

 _gui_event
 _do_perform_authentication_result

Detailed Description

An SMB AuthContext class that is only ever run from
a non-GUI thread.

Definition at line 200 of file probe_printer.py.


Constructor & Destructor Documentation

def probe_printer.BackgroundSmbAuthContext.__init__ (   self,
  args,
  kwargs 
)

Definition at line 204 of file probe_printer.py.

00204 
00205     def __init__ (self, *args, **kwargs):
00206         self._gui_event = threading.Event ()
00207         pysmb.AuthContext.__init__ (self, *args, **kwargs)


Member Function Documentation

Definition at line 208 of file probe_printer.py.

00208 
00209     def _do_perform_authentication (self):
00210         gtk.gdk.threads_enter ()
00211         result = pysmb.AuthContext.perform_authentication (self)
00212         gtk.gdk.threads_leave ()
00213         self._do_perform_authentication_result = result
00214         self._gui_event.set ()
        

Definition at line 215 of file probe_printer.py.

00215 
00216     def perform_authentication (self):
00217         if (self.passes == 0 or
00218             not self.has_failed or
00219             not self.auth_called or
00220             (self.auth_called and not self.tried_guest)):
00221             # Safe to call the base function.  It won't try any UI stuff.
00222             return pysmb.AuthContext.perform_authentication (self)
00223 
00224         self._gui_event.clear ()
00225         gobject.timeout_add (1, self._do_perform_authentication)
00226         self._gui_event.wait ()
00227         return self._do_perform_authentication_result


Member Data Documentation

Definition at line 212 of file probe_printer.py.

Definition at line 205 of file probe_printer.py.

Definition at line 216 of file probe_printer.py.


The documentation for this class was generated from the following file: