function showSlotInfo()
{
  var present = true;
  ClearInfoList();
  switch (selected_slot.status) {
   case nsIPKCS11Slot.SLOT_DISABLED:
     AddInfoRow(bundle.getString("devinfo_status"),
                bundle.getString("devinfo_stat_disabled"),
                "tok_status");
     present = false;
     break;
   case nsIPKCS11Slot.SLOT_NOT_PRESENT:
     AddInfoRow(bundle.getString("devinfo_status"),
                bundle.getString("devinfo_stat_notpresent"),
                "tok_status");
     present = false;
     break;
   case nsIPKCS11Slot.SLOT_UNINITIALIZED:
     AddInfoRow(bundle.getString("devinfo_status"),
                bundle.getString("devinfo_stat_uninitialized"),
                "tok_status");
     break;
   case nsIPKCS11Slot.SLOT_NOT_LOGGED_IN:
     AddInfoRow(bundle.getString("devinfo_status"),
                bundle.getString("devinfo_stat_notloggedin"),
                "tok_status");
     break;
   case nsIPKCS11Slot.SLOT_LOGGED_IN:
     AddInfoRow(bundle.getString("devinfo_status"),
                bundle.getString("devinfo_stat_loggedin"),
                "tok_status");
     break;
   case nsIPKCS11Slot.SLOT_READY:
     AddInfoRow(bundle.getString("devinfo_status"),
                bundle.getString("devinfo_stat_ready"),
                "tok_status");
     break;
  }
  AddInfoRow(bundle.getString("devinfo_desc"),
             selected_slot.desc, "slot_desc");
  AddInfoRow(bundle.getString("devinfo_manID"),
             selected_slot.manID, "slot_manID");
  AddInfoRow(bundle.getString("devinfo_hwversion"),
             selected_slot.HWVersion, "slot_hwv");
  AddInfoRow(bundle.getString("devinfo_fwversion"),
             selected_slot.FWVersion, "slot_fwv");
  if (present) {
     showTokenInfo();
  }
}
// show a list of info about a slot
show a list of info about a slot
show a list of info about a slot
function showSlotInfo()
{
  var present = true;
  ClearInfoList();
  switch (selected_slot.status) {
   case nsIPKCS11Slot.SLOT_DISABLED:
     AddInfoRow(bundle.getString("devinfo_status"),
                bundle.getString("devinfo_stat_disabled"),
                "tok_status");
     present = false;
     break;
   case nsIPKCS11Slot.SLOT_NOT_PRESENT:
     AddInfoRow(bundle.getString("devinfo_status"),
                bundle.getString("devinfo_stat_notpresent"),
                "tok_status");
     present = false;
     break;
   case nsIPKCS11Slot.SLOT_UNINITIALIZED:
     AddInfoRow(bundle.getString("devinfo_status"),
                bundle.getString("devinfo_stat_uninitialized"),
                "tok_status");
     break;
   case nsIPKCS11Slot.SLOT_NOT_LOGGED_IN:
     AddInfoRow(bundle.getString("devinfo_status"),
                bundle.getString("devinfo_stat_notloggedin"),
                "tok_status");
     break;
   case nsIPKCS11Slot.SLOT_LOGGED_IN:
     AddInfoRow(bundle.getString("devinfo_status"),
                bundle.getString("devinfo_stat_loggedin"),
                "tok_status");
     break;
   case nsIPKCS11Slot.SLOT_READY:
     AddInfoRow(bundle.getString("devinfo_status"),
                bundle.getString("devinfo_stat_ready"),
                "tok_status");
     break;
  }
  AddInfoRow(bundle.getString("devinfo_desc"),
             selected_slot.desc, "slot_desc");
  AddInfoRow(bundle.getString("devinfo_manID"),
             selected_slot.manID, "slot_manID");
  AddInfoRow(bundle.getString("devinfo_hwversion"),
             selected_slot.HWVersion, "slot_hwv");
  AddInfoRow(bundle.getString("devinfo_fwversion"),
             selected_slot.FWVersion, "slot_fwv");
  if (present) {
     showTokenInfo();
  }
}
function showSlotInfo ( ) { var present = true ; ClearInfoList ( ) ; switch ( selected_slot . status ) { case nsIPKCS11Slot . SLOT_DISABLED : AddInfoRow ( bundle . getString ( "devinfo_status" ) , bundle . getString ( "devinfo_stat_disabled" ) , "tok_status" ) ; present = false ; break ; case nsIPKCS11Slot . SLOT_NOT_PRESENT : AddInfoRow ( bundle . getString ( "devinfo_status" ) , bundle . getString ( "devinfo_stat_notpresent" ) , "tok_status" ) ; present = false ; break ; case nsIPKCS11Slot . SLOT_UNINITIALIZED : AddInfoRow ( bundle . getString ( "devinfo_status" ) , bundle . getString ( "devinfo_stat_uninitialized" ) , "tok_status" ) ; break ; case nsIPKCS11Slot . SLOT_NOT_LOGGED_IN : AddInfoRow ( bundle . getString ( "devinfo_status" ) , bundle . getString ( "devinfo_stat_notloggedin" ) , "tok_status" ) ; break ; case nsIPKCS11Slot . SLOT_LOGGED_IN : AddInfoRow ( bundle . getString ( "devinfo_status" ) , bundle . getString ( "devinfo_stat_loggedin" ) , "tok_status" ) ; break ; case nsIPKCS11Slot . SLOT_READY : AddInfoRow ( bundle . getString ( "devinfo_status" ) , bundle . getString ( "devinfo_stat_ready" ) , "tok_status" ) ; break ; } AddInfoRow ( bundle . getString ( "devinfo_desc" ) , selected_slot . desc , "slot_desc" ) ; AddInfoRow ( bundle . getString ( "devinfo_manID" ) , selected_slot . manID , "slot_manID" ) ; AddInfoRow ( bundle . getString ( "devinfo_hwversion" ) , selected_slot . HWVersion , "slot_hwv" ) ; AddInfoRow ( bundle . getString ( "devinfo_fwversion" ) , selected_slot . FWVersion , "slot_fwv" ) ; if ( present ) { showTokenInfo ( ) ; } }
show a list of info about a slot
show a list of info about a slot