Branch: Tag:

2001-09-21

2001-09-21 09:53:01 by Per Hedbor <ph@opera.com>

Variable types for userdb and auth method selection

Rev: server/etc/modules/Variable.pmod/module.pmod:1.67

1: - // $Id: module.pmod,v 1.66 2001/09/12 23:37:42 nilsson Exp $ + // $Id: module.pmod,v 1.67 2001/09/21 09:53:01 per Exp $      #include <module.h>   #include <roxen.h>
1221:    }   }    + class AuthMethodChoice + { +  inherit StringChoice; +  constant type = "AuthMethodChoice";    -  +  static Configuration config; +  +  array get_choice_list( ) +  { +  return ({ " all" }) + sort( config->auth_modules()->name ); +  } +  +  static void create( string default_value, int flags, +  string std_name, string std_doc, +  Configuration c ) +  { +  config = c; +  ::create( default_value, ({}), flags, std_name, std_doc ); +  } + } +  + class UserDBChoice + { +  inherit StringChoice; +  constant type = "UserDBChoice"; +  +  static Configuration config; +  +  array get_choice_list( ) +  { +  return ({ " all" }) + sort( config->user_databases()->name ); +  } +  +  static void create( string default_value, int flags, +  string std_name, string std_doc, +  Configuration c ) +  { +  config = c; +  ::create( default_value, ({}), flags, std_name, std_doc ); +  } + } +  +    // =====================================================================   // List baseclass   // =====================================================================