gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r17899 - in gnunet-java: . src/org/gnunet/util/config


From: gnunet
Subject: [GNUnet-SVN] r17899 - in gnunet-java: . src/org/gnunet/util/config
Date: Wed, 2 Nov 2011 00:09:36 +0100

Author: dold
Date: 2011-11-02 00:09:36 +0100 (Wed, 02 Nov 2011)
New Revision: 17899

Modified:
   gnunet-java/ISSUES
   gnunet-java/src/org/gnunet/util/config/Configuration.java
Log:
added method declarations for configuration

Modified: gnunet-java/ISSUES
===================================================================
--- gnunet-java/ISSUES  2011-11-01 21:50:41 UTC (rev 17898)
+++ gnunet-java/ISSUES  2011-11-01 23:09:36 UTC (rev 17899)
@@ -1,4 +1,4 @@
-* java has no native unix domain sockets (=>use library, licensing issues?)
+* java has no native unix domain sockets (=>use JNI library, licensing issues?)
 * package structure, inner classes vs. packages
 * naming conventions: stick with java standards?
 * ugly cross-reference to TransmitReadyNotify.java in 
org.gnunet.util.client.Client

Modified: gnunet-java/src/org/gnunet/util/config/Configuration.java
===================================================================
--- gnunet-java/src/org/gnunet/util/config/Configuration.java   2011-11-01 
21:50:41 UTC (rev 17898)
+++ gnunet-java/src/org/gnunet/util/config/Configuration.java   2011-11-01 
23:09:36 UTC (rev 17899)
@@ -1,13 +1,139 @@
 package org.gnunet.util.config;
 
 import java.io.*;
+import java.util.List;
 
+import org.gnunet.util.time.RelativeTime;
+
 public class Configuration {
        public Configuration(String filename) throws FileNotFoundException {
-               FileInputStream fstream = new FileInputStream(filename);
-               DataInputStream in = new DataInputStream(fstream);
-               BufferedReader br = new BufferedReader(new 
InputStreamReader(in));
                throw new UnsupportedOperationException();
        }
 
+       /**
+        * Parse a configuration file, add all of the options in the file to the
+        * configuration environment.
+        * 
+        * @param filename
+        *            name of the configuration file
+        */
+       public void parse(String filename) {
+               FileInputStream fstream;
+               try {
+                       fstream = new FileInputStream(filename);
+                       DataInputStream in = new DataInputStream(fstream);
+                       BufferedReader br = new BufferedReader(new 
InputStreamReader(in));
+               } catch (FileNotFoundException e) {
+                       e.printStackTrace();
+               }
+               
+               throw new UnsupportedOperationException();
+       }
+
+       /**
+        * Test if there are configuration options that were changed since the 
last
+        * save.
+        */
+       public boolean isDirty() {
+               throw new UnsupportedOperationException();
+       }
+
+       /**
+        * Write configuration file.
+        * 
+        * @param filename
+        *            where to write the configuration
+        */
+       public void write(String filename) {
+               throw new UnsupportedOperationException();
+       }
+
+       /**
+        * Remove the given section and all options in it.
+        */
+       public void removeSection(String section) {
+               throw new UnsupportedOperationException();
+       }
+       
+       
+       @Override
+       public Configuration clone() {
+               throw new UnsupportedOperationException();
+       }
+       
+       
+        /* Write only configuration entries that have been changed to 
configuration file
+        * @param cfgNew new configuration
+        * @param filename where to write the configuration diff between 
default and new
+        */
+
+       public void writeDiffs(Configuration cfgNew, String filename) {
+               throw new UnsupportedOperationException();
+       }
+       
+       public void setValueString(String section, String option, String value) 
{
+               throw new UnsupportedOperationException();
+       }
+       
+       public void setValueNumber(String section, String option, long value) {
+               throw new UnsupportedOperationException();
+       }
+       
+       public long getValueNumer(String section, String option) {
+               throw new UnsupportedOperationException();
+       }
+       
+       public String getValueString(String section, String option) {
+               throw new UnsupportedOperationException();
+       }
+       
+       
+       public RelativeTime getValueTime(String section, String option) {
+               throw new UnsupportedOperationException();
+       }
+       
+       public String getValueChoice(String section, String option, 
List<String> choices) {
+               throw new UnsupportedOperationException();
+       }
+       
+       public boolean haveValue(String section, String option) {
+               throw new UnsupportedOperationException();
+       }
+       
+       
+       /**
+        * Expand an expression of the form "$FOO/BAR" to "DIRECTORY/BAR"
+        * where either in the "PATHS" section or the environtment
+        * "FOO" is set to "DIRECTORY".
+        *
+        * @param orig string to $-expand
+        * @return $-expanded string
+        */
+
+       public String expandDollar(String orig) {
+               throw new UnsupportedOperationException();
+       }
+       
+       public String getValueFileName(String section, String option) {
+               throw new UnsupportedOperationException();
+       }
+       
+       public boolean getValueYesNo(String section, String option) {
+               throw new UnsupportedOperationException();
+       }
+       
+       public boolean appendValueFilename(String section, String option, 
String value) {
+               throw new UnsupportedOperationException();
+       }
+       
+       public boolean removeValueFilename(String section, String option, 
String value) {
+               throw new UnsupportedOperationException();
+       }
+       
+       public boolean load(String filename) {
+               throw new UnsupportedOperationException();
+       }
+       
+       
+
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]