NS Client API

wiht <[email protected]> Sat, 20 Sep 2003 20:21:00 -0400
Newsgroups gmane.comp.security.invisiblenet.iip.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------030404050508030604090901
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

The client API for the naming service is included in the attachment. It will 
need improvement, but this is it for now.

--------------030404050508030604090901
Content-Type: text/plain;
 name="nsapi.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="nsapi.txt"

Naming Service Client API
Version 1.0
September 20, 2003

This API enables client software to query naming servers. At the moment, only
a Java version is available, but versions in other programming languages will
be written as the I2P network support for those languages becomes better. The
author welcomes suggestions for adding to and/or improving this API and for
writing it in other programming languages.

public interface NSQuery {

   public final static int QUERY_SUCCESS = 0;
   public final static int QUERY_FAILURE = 1;

   /* Sets the default server to query. */
   public void setDefaultServer( Destination ds );

   /* The following methods send queries corresponding to the
    * types in the naming service specification.
    */
   public String getGroupInformation( String groupName );
   public Entity_Record getEntityInformation( String entityName );
   public Entity_List getList( int service );

   /* Same queries, but allow specification of server to query. */
   public String getGroupInfo( String groupName, Destination ns );
   public Entity_Record getEntityInfo( String entityName, Destination ns );
   public Entity_List getEntityList( int service, Destination ns );

   /* See whether last query was successful. */
   public int queryStatus();

}

--------------030404050508030604090901
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
iip-dev mailing list
[email protected]
http://lists.invisiblenet.net/mailman/listinfo/iip-dev

--------------030404050508030604090901--