Diff for /parser3/src/classes/mail.C between versions 1.23 and 1.24

version 1.23, 2001/04/28 08:43:47 version 1.24, 2001/04/28 10:58:26
Line 28 Line 28
 class MMail : public Methoded {  class MMail : public Methoded {
 public:  public:
         MMail(Pool& pool);          MMail(Pool& pool);
   public: // Methoded
         bool used_directly() { return true; }          bool used_directly() { return true; }
           void configure_user(Request& r);
 };  };
   
 // helpers  // helpers
Line 394  static void sendmail(Request& r, const S Line 396  static void sendmail(Request& r, const S
         } else          } else
                 PTHROW(0, 0,                  PTHROW(0, 0,
                         &method_name,                          &method_name,
                         "$"MAIN_CLASS_NAME":"MAIL_NAME" not defined");                          "$" MAIN_CLASS_NAME ":" MAIL_NAME " not defined");
 #endif  #endif
 }  }
   
Line 419  static void _send(Request& r, const Stri Line 421  static void _send(Request& r, const Stri
         sendmail(r, method_name, letter, from, to);          sendmail(r, method_name, letter, from, to);
 }  }
   
 // constructor  // constructor & configurator
   
 MMail::MMail(Pool& apool) : Methoded(apool) {  MMail::MMail(Pool& apool) : Methoded(apool) {
         set_name(*NEW String(pool(), MAIL_CLASS_NAME));          set_name(*NEW String(pool(), MAIL_CLASS_NAME));
Line 428  MMail::MMail(Pool& apool) : Methoded(apo Line 430  MMail::MMail(Pool& apool) : Methoded(apo
         add_native_method("send", Method::CT_STATIC, _send, 1, 1);          add_native_method("send", Method::CT_STATIC, _send, 1, 1);
 }  }
   
   void MMail::configure_user(Request& r) {
           Pool& pool=r.pool();
   
           // $MAIN:MAIL[$SMTP[mail.design.ru]]
           if(Value *mail_element=r.main_class->get_element(*mail_name))
                   if(!(r.mail=mail_element->get_hash()))
                           PTHROW(0, 0,
                                   0,
                                   "$" MAIL_CLASS_NAME ":" MAIL_NAME " is not hash");
   }
   
 // global variable  // global variable
   
 Methoded *mail_class;  Methoded *mail_class;

Removed from v.1.23  
changed lines
  Added in v.1.24


E-mail: