Author: toad
Date: 2006-12-14 20:55:09 +0000 (Thu, 14 Dec 2006)
New Revision: 11404

Added:
   trunk/freenet/src/freenet/plugin/api/PluginFetchException.java
   trunk/freenet/src/freenet/plugin/api/PluginFetchResult.java
   trunk/freenet/src/freenet/plugin/api/PluginFreenetURI.java
   trunk/freenet/src/freenet/plugin/api/package-info.java
   trunk/freenet/src/freenet/support/api/package-info.java
Removed:
   trunk/freenet/src/freenet/support/api/PluginFetchException.java
   trunk/freenet/src/freenet/support/api/PluginFetchResult.java
   trunk/freenet/src/freenet/support/api/PluginFreenetURI.java
Modified:
   trunk/freenet/src/freenet/plugin/api/ProvidesSimpleKeyFetch.java
Log:
Add package-info.java files to plugins.api and support.api.
Move some files around.

Copied: trunk/freenet/src/freenet/plugin/api/PluginFetchException.java (from 
rev 11395, trunk/freenet/src/freenet/support/api/PluginFetchException.java)
===================================================================
--- trunk/freenet/src/freenet/plugin/api/PluginFetchException.java              
                (rev 0)
+++ trunk/freenet/src/freenet/plugin/api/PluginFetchException.java      
2006-12-14 20:55:09 UTC (rev 11404)
@@ -0,0 +1,11 @@
+/* This code is part of Freenet. It is distributed under the GNU General
+ * Public License, version 2 (or at your option any later version). See
+ * http://www.gnu.org/ for further details of the GPL. */
+package freenet.plugin.api;
+
+/**
+ * Base class of exceptions thrown when a plugin fetch fails.
+ */
+public abstract class PluginFetchException extends Exception {
+
+}

Copied: trunk/freenet/src/freenet/plugin/api/PluginFetchResult.java (from rev 
11395, trunk/freenet/src/freenet/support/api/PluginFetchResult.java)
===================================================================
--- trunk/freenet/src/freenet/plugin/api/PluginFetchResult.java                 
        (rev 0)
+++ trunk/freenet/src/freenet/plugin/api/PluginFetchResult.java 2006-12-14 
20:55:09 UTC (rev 11404)
@@ -0,0 +1,19 @@
+package freenet.plugin.api;
+
+import java.io.InputStream;
+
+public interface PluginFetchResult {
+       
+       /** MIME type of fetched data */
+       public String getMIMEType();
+       
+       /** Get an InputStream for the data */
+       public InputStream getInputStream();
+       
+       /** Get the size of the data */
+       public long size();
+       
+       /** Finished with the data, can free it */
+       public void free();
+
+}

Copied: trunk/freenet/src/freenet/plugin/api/PluginFreenetURI.java (from rev 
11395, trunk/freenet/src/freenet/support/api/PluginFreenetURI.java)
===================================================================
--- trunk/freenet/src/freenet/plugin/api/PluginFreenetURI.java                  
        (rev 0)
+++ trunk/freenet/src/freenet/plugin/api/PluginFreenetURI.java  2006-12-14 
20:55:09 UTC (rev 11404)
@@ -0,0 +1,15 @@
+/* This code is part of Freenet. It is distributed under the GNU General
+ * Public License, version 2 (or at your option any later version). See
+ * http://www.gnu.org/ for further details of the GPL. */
+package freenet.plugin.api;
+
+/**
+ * Base interface of FreenetURI.
+ * Provides an interface for plugins.
+ * Anything inside the node should use FreenetURI directly.
+ * Any dangerous methods should be left out of this interface.
+ * BaseFreenetURI's are constructed via FreenetPluginManager.
+ */
+public interface PluginFreenetURI {
+
+}

Modified: trunk/freenet/src/freenet/plugin/api/ProvidesSimpleKeyFetch.java
===================================================================
--- trunk/freenet/src/freenet/plugin/api/ProvidesSimpleKeyFetch.java    
2006-12-14 20:49:58 UTC (rev 11403)
+++ trunk/freenet/src/freenet/plugin/api/ProvidesSimpleKeyFetch.java    
2006-12-14 20:55:09 UTC (rev 11404)
@@ -3,10 +3,6 @@
  * http://www.gnu.org/ for further details of the GPL. */
 package freenet.plugin.api;

-import freenet.support.api.Bucket;
-import freenet.support.api.PluginFetchException;
-import freenet.support.api.PluginFetchResult;
-import freenet.support.api.PluginFreenetURI;

 /**
  * Provides an interface to the client for it to fetch keys from.

Added: trunk/freenet/src/freenet/plugin/api/package-info.java
===================================================================
--- trunk/freenet/src/freenet/plugin/api/package-info.java                      
        (rev 0)
+++ trunk/freenet/src/freenet/plugin/api/package-info.java      2006-12-14 
20:55:09 UTC (rev 11404)
@@ -0,0 +1,9 @@
+/**
+ * Provides the API necessary to write a plugin for Freenet. Freenet plugins 
run in
+ * the same JVM as the node, but they can only access it through a limited 
API. All
+ * plugins must implement the FreenetPlugin interface, and zero or more of the 
+ * Needs* interfaces depending on what services they require from the node. 
These 
+ * interfaces indicate to the node what services are required by the plugin; 
the node
+ * may ask the user whether (s)he wants to allow the plugin to use these 
services.
+ */
+package freenet.plugin.api;
\ No newline at end of file

Deleted: trunk/freenet/src/freenet/support/api/PluginFetchException.java
===================================================================
--- trunk/freenet/src/freenet/support/api/PluginFetchException.java     
2006-12-14 20:49:58 UTC (rev 11403)
+++ trunk/freenet/src/freenet/support/api/PluginFetchException.java     
2006-12-14 20:55:09 UTC (rev 11404)
@@ -1,11 +0,0 @@
-/* This code is part of Freenet. It is distributed under the GNU General
- * Public License, version 2 (or at your option any later version). See
- * http://www.gnu.org/ for further details of the GPL. */
-package freenet.support.api;
-
-/**
- * Base class of exceptions thrown when a plugin fetch fails.
- */
-public abstract class PluginFetchException extends Exception {
-
-}

Deleted: trunk/freenet/src/freenet/support/api/PluginFetchResult.java
===================================================================
--- trunk/freenet/src/freenet/support/api/PluginFetchResult.java        
2006-12-14 20:49:58 UTC (rev 11403)
+++ trunk/freenet/src/freenet/support/api/PluginFetchResult.java        
2006-12-14 20:55:09 UTC (rev 11404)
@@ -1,19 +0,0 @@
-package freenet.support.api;
-
-import java.io.InputStream;
-
-public interface PluginFetchResult {
-       
-       /** MIME type of fetched data */
-       public String getMIMEType();
-       
-       /** Get an InputStream for the data */
-       public InputStream getInputStream();
-       
-       /** Get the size of the data */
-       public long size();
-       
-       /** Finished with the data, can free it */
-       public void free();
-
-}

Deleted: trunk/freenet/src/freenet/support/api/PluginFreenetURI.java
===================================================================
--- trunk/freenet/src/freenet/support/api/PluginFreenetURI.java 2006-12-14 
20:49:58 UTC (rev 11403)
+++ trunk/freenet/src/freenet/support/api/PluginFreenetURI.java 2006-12-14 
20:55:09 UTC (rev 11404)
@@ -1,15 +0,0 @@
-/* This code is part of Freenet. It is distributed under the GNU General
- * Public License, version 2 (or at your option any later version). See
- * http://www.gnu.org/ for further details of the GPL. */
-package freenet.support.api;
-
-/**
- * Base interface of FreenetURI.
- * Provides an interface for plugins.
- * Anything inside the node should use FreenetURI directly.
- * Any dangerous methods should be left out of this interface.
- * BaseFreenetURI's are constructed via FreenetPluginManager.
- */
-public interface PluginFreenetURI {
-
-}

Added: trunk/freenet/src/freenet/support/api/package-info.java
===================================================================
--- trunk/freenet/src/freenet/support/api/package-info.java                     
        (rev 0)
+++ trunk/freenet/src/freenet/support/api/package-info.java     2006-12-14 
20:55:09 UTC (rev 11404)
@@ -0,0 +1,8 @@
+/**
+ * Package for plugin-safe packages and interfaces which are also used by the 
rest of
+ * the node, e.g. Bucket. Generally this will be interfaces, but there may be 
a few
+ * classes too. Anything here must not support more functionality than is 
really
+ * necessary; it must not be possible for a plugin to escalate its privelidges
+ * through this API.
+ */
+package freenet.support.api;
\ No newline at end of file


Reply via email to