comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: ANN: http & smtp etc packages to adapower
Date: Thu, 13 Feb 2003 06:57:08 GMT
Date: 2003-02-13T06:57:08+00:00	[thread overview]
Message-ID: <8lH2a.93830$be.72060@rwcrnsc53> (raw)

David Botton will soon be posting on www.adapower.com some packages
I sent in the hopes they would help someone build the killer Ada app ;)

http            offers Open/Get/Head/Post routines to access web
                pages.  It includes line (ie, crlf) oriented read
                with Content-length or transfer-encoding: chunked
                sizes.  It will save/send cookies (default) or
                ignore them.  multitasking safe, of course.

smtp            handles smtp (e-mail send) protocol

sorts           generic List/Merge sort (Knuth Vol 3, alg. 5.2.4L)

WORM_Str        Write Once, Read Many String store, also includes
                binary search generic subpackage.

Notify          A 31 line demo of the above, that reads a web page
                and emails the first line containing the word "title",
                if there is such a line.

The style of usage, from the Notify demo, is:

  Http.Open(Web, "www.somewhere.com");
  Http.Get(Web, "/", Response, Send_Cookies => False);
  loop
    Http.Get_Line(Web, Line, Last);
    exit when Last = 0;
    if Ada.Strings.Fixed.Index(Line(1 .. Last), "title") /= 0 then
      Smtp.Open(Email, Host => "mail.myISP.com");
      Smtp.Send_Message_Info(Email, Sender => "me@myISP.com",
        To => "you@yourISP.com", Subject => "Notify");
      Smtp.Put_Content_Line(Email, Line(1 .. Last));
      Smtp.Finish_Message(Email);
      Smtp.Close(Email);
      exit;
    end if;
  end loop;
  Http.Close(Web);

The posted packages are unrestricted in use and themselves use the
GMGPL version of Windows Claw, available via www.adapower.com



             reply	other threads:[~2003-02-13  6:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-13  6:57 tmoran [this message]
2003-02-13 13:22 ` ANN: http & smtp etc packages to adapower Wojtek Narczynski
2003-02-13 13:33 ` Preben Randhol
2003-02-13 18:42   ` David Botton
2003-02-13 20:49   ` tmoran
2003-02-13 21:05     ` Preben Randhol
2003-02-14  2:15       ` tmoran
2003-02-14 21:57       ` Randy Brukardt
2003-02-13 22:28     ` Pascal Obry
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox