sbuild-auth-conv-tty.cc File Reference

#include <config.h>
#include "sbuild-auth-conv-tty.h"
#include "sbuild-log.h"
#include <iostream>
#include <signal.h>
#include <termios.h>
#include <unistd.h>
#include <boost/format.hpp>

Include dependency graph for sbuild-auth-conv-tty.cc:

Go to the source code of this file.

Typedefs

typedef std::pair< auth_conv_tty::error_code,
const char * > 
emap

Functions

void reset_alarm (struct sigaction *orig_sa)
 Disable the alarm and signal handler.
void alarm_handler (int ignore)
 Handle the SIGALRM signal.
bool set_alarm (int delay, struct sigaction *orig_sa)
 Set the SIGALARM handler, and set the timeout to delay seconds.

Variables

emap init_errors []
 This is a list of the supported error codes.
volatile sig_atomic_t timer_expired = false


Typedef Documentation

typedef std::pair<auth_conv_tty::error_code,const char *> emap [static]

Definition at line 41 of file sbuild-auth-conv-tty.cc.


Function Documentation

void @0::alarm_handler ( int  ignore  )  [static]

Handle the SIGALRM signal.

Parameters:
ignore the signal number (unused).

Definition at line 79 of file sbuild-auth-conv-tty.cc.

Referenced by sbuild::lock::set_alarm(), and set_alarm().

Here is the caller graph for this function:

void @0::reset_alarm ( struct sigaction *  orig_sa  )  [static]

Disable the alarm and signal handler.

Parameters:
orig_sa the signal handler to restore.

Definition at line 65 of file sbuild-auth-conv-tty.cc.

Referenced by sbuild::auth_conv_tty::read_string().

Here is the caller graph for this function:

bool @0::set_alarm ( int  delay,
struct sigaction *  orig_sa 
) [static]

Set the SIGALARM handler, and set the timeout to delay seconds.

The old signal handler is stored in orig_sa.

Parameters:
delay the delay (in seconds) before SIGALRM is raised.
orig_sa the location to store the original signal handler.
Returns:
true on success, false on failure.

Definition at line 93 of file sbuild-auth-conv-tty.cc.

References alarm_handler().

Referenced by sbuild::auth_conv_tty::read_string().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

emap init_errors[] [static]

Initial value:

    {
      emap(auth_conv_tty::TIMEOUT,         N_("Timed out")),
      
      emap(auth_conv_tty::TIMEOUT_PENDING, N_("Time is running out...")),
      emap(auth_conv_tty::TERMIOS,         N_("Failed to get terminal settings")),
      
      emap(auth_conv_tty::CONV_TYPE,       N_("Unsupported conversation type '%1%'"))
    }
This is a list of the supported error codes.

It's used to construct the real error codes map.

Definition at line 47 of file sbuild-auth-conv-tty.cc.

volatile sig_atomic_t timer_expired = false [static]

Definition at line 57 of file sbuild-auth-conv-tty.cc.

Referenced by sbuild::auth_conv_tty::get_delay(), and sbuild::auth_conv_tty::read_string().


Generated on Sat Jan 27 16:11:20 2007 for schroot by  doxygen 1.5.1