comp.lang.ada
 help / color / mirror / Atom feed
* ANN: http & smtp etc packages to adapower
@ 2003-02-13  6:57 tmoran
  2003-02-13 13:22 ` Wojtek Narczynski
  2003-02-13 13:33 ` Preben Randhol
  0 siblings, 2 replies; 9+ messages in thread
From: tmoran @ 2003-02-13  6:57 UTC (permalink / 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



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-02-14 21:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-13  6:57 ANN: http & smtp etc packages to adapower tmoran
2003-02-13 13:22 ` 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

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