API Reference

Common Defintions

 

[headers defined in RFC 1036

Note: From, Date, Newsgroups, Subject, Message-Id and Path are all required headers.

[Other contsants defined by this package

& Default_News_Port : constant Port_Number := 119; [exceptions. this are as defined in RFC 1036

Exception Name

& Service_Discontiuned : exception; -- 400 & No_Such_Newsgroup : exception; -- 411 & No_NewsGroup_Has_Been_Selected : exception; -- 412 & No_Current_Article : exception; -- 420 & No_Next_Article : exception; -- 421 & No_Previous_Article : exception; -- 422 & No_Such_Article_Number : exception; -- 423 & No_Such_Article : exception; -- 430 & Article_Not_Wanted : exception; -- 435 & Transfer_Failed : exception; -- 436 & Article_Rejected : exception; -- 437 & Posting_Not_Allowed : exception; -- 440 & Posting_Failed : exception; -- 441 & Command_Not_Recognised : exception; -- 500 & Command_Syntax_Error : exception; -- 501 & Permission_Denied : exception; -- 502 & Program_Fault : exception; -- 503

[String constants for news server commands

& Article_Command : constant String := "ARTICLE"; & Body_Command : constant String := "BODY";

& Group_Command : constant String := "GROUP";

& Head_Command : constant String := "HEAD";

& Last_Command : constant String := "LAST";

& List_Command : constant String := "LIST";

& NewGroups_Command : constant String := "NEWGROUPS"; & NewNews_Command : constant String := "NEWNEWS"; & Next_Command : constant String := "NEXT";

& Post_Command : constant String := "POST";

& Quit_Command : constant String := "QUIT";

& Stat_Command : constant String := "STAT";

[Other exceptions

& Response_Not_Recognised : exception;

this is raised when the server responds with an unknown code or a code that should not be returned for that operation

   Missing_Required_Headers : exception; 

this is raised when a post or article procedure encounters a message which does not have all the required headers, and is thus considered to be malformed.

function Name

   function Name (Group : in News_Group) return Unbounded_String;  

procedure Name

   procedure Name (Group      : in out News_Group;  
                   Group_Name : in     Unbounded_String); 

function High

   function High (Group : in News_Group) return Natural;  

procedure High

   procedure High (Group  : in out News_Group;  
                   Number : in     Natural); 

function Low

   function Low (Group : in News_Group) return Natural;  

procedure Low

   procedure Low (Group  : in out News_Group;  
                  Number : in     Natural); 

function Posting

   function Posting (Group : in News_Group) return Boolean;  

procedure Posting

   procedure Posting (Group   : in out News_Group;  
                      Posting : in     Boolean); 

Sets the posting attribute of the group.