Back to index

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

List of all members.

Public Member Functions

def __init__
def destroy
def set_auth_info
def reconnect

Public Attributes

 parent
 prompt_allowed
 try_as_root
 semantic
 queue
 thread
 bindings

Private Member Functions

def _call_function

Detailed Description

Definition at line 585 of file asyncipp.py.


Constructor & Destructor Documentation

def asyncipp.IPPAuthConnection.__init__ (   self,
  reply_handler = None,
  error_handler = None,
  auth_handler = None,
  host = None,
  port = None,
  encryption = None,
  parent = None,
  try_as_root = True,
  prompt_allowed = True,
  semantic = None 
)

Definition at line 589 of file asyncipp.py.

00589 
00590                   semantic=None):
00591         self.parent = parent
00592         self.prompt_allowed = prompt_allowed
00593         self.try_as_root = try_as_root
00594         self.semantic = semantic
00595 
00596         user = None
00597         creds = authconn.global_authinfocache.lookup_auth_info (host=host,
00598                                                                 port=port)
00599         if creds:
00600             if creds[0] != 'root' or try_as_root:
00601                 user = creds[0]
00602             del creds
00603 
00604         # The "connect" operation.
00605         op = _IPPAuthOperation (reply_handler, error_handler, self)
00606         IPPConnection.__init__ (self, reply_handler=reply_handler,
00607                                 error_handler=op.error_handler,
00608                                 auth_handler=op.auth_handler, user=user,
00609                                 host=host, port=port, encryption=encryption)


Member Function Documentation

def asyncipp.IPPAuthConnection._call_function (   self,
  fn,
  args,
  kwds 
) [private]

Reimplemented from asyncipp.IPPConnection.

Definition at line 614 of file asyncipp.py.

00614 
00615     def _call_function (self, fn, *args, **kwds):
00616         reply_handler = error_handler = auth_handler = False
00617         if kwds.has_key ("reply_handler"):
00618             reply_handler = kwds["reply_handler"]
00619             del kwds["reply_handler"]
00620         if kwds.has_key ("error_handler"):
00621             error_handler = kwds["error_handler"]
00622             del kwds["error_handler"]
00623         if kwds.has_key ("auth_handler"):
00624             auth_handler = kwds["auth_handler"]
00625             del kwds["auth_handler"]
00626 
00627         # Store enough information about the current operation to
00628         # restart it if necessary.
00629         op = _IPPAuthOperation (reply_handler, error_handler, self,
00630                                 self.thread.user, fn, args, kwds)
00631 
00632         # Run the operation but use our own error and auth handlers.
00633         op.submit_task ()

Reimplemented from asyncipp.IPPConnection.

Definition at line 610 of file asyncipp.py.

00610 
00611     def destroy (self):
00612         self.semantic = None
00613         IPPConnection.destroy (self)

Here is the caller graph for this function:

def asyncipp.IPPConnection.reconnect (   self,
  user,
  reply_handler = None,
  error_handler = None 
) [inherited]

Definition at line 278 of file asyncipp.py.

00278 
00279     def reconnect (self, user, reply_handler=None, error_handler=None):
00280         debugprint ("Reconnect...")
00281         self.queue.put ((True, (user,), {},
00282                          reply_handler, error_handler, False))

Here is the caller graph for this function:

def asyncipp.IPPConnection.set_auth_info (   self,
  password 
) [inherited]
Call this from your auth_handler function.

Definition at line 274 of file asyncipp.py.

00274 
00275     def set_auth_info (self, password):
00276         """Call this from your auth_handler function."""
00277         self.thread.set_auth_info (password)


Member Data Documentation

Definition at line 250 of file asyncipp.py.

Definition at line 590 of file asyncipp.py.

Definition at line 591 of file asyncipp.py.

Definition at line 230 of file asyncipp.py.

Definition at line 593 of file asyncipp.py.

Definition at line 231 of file asyncipp.py.

Definition at line 592 of file asyncipp.py.


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