directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r179459 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
Date Wed, 01 Jun 2005 23:20:45 GMT
Author: elecharny
Date: Wed Jun  1 16:20:44 2005
New Revision: 179459

URL: http://svn.apache.org/viewcvs?rev=179459&view=rev
Log:
Added the DelResponse states

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java?rev=179459&r1=179458&r2=179459&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/LdapStatesEnum.java
Wed Jun  1 16:20:44 2005
@@ -283,6 +283,24 @@
     public static int LAST_COMPARE_RESPONSE_STATE = 4;
 
     //=========================================================================
+    // DelResponse 
+    //=========================================================================
+    /**  Del Response Tag */
+    public static int DEL_RESPONSE_TAG = 0;
+
+    /**  Del Response Length */
+    public static int DEL_RESPONSE_LENGTH = 1;
+
+    /**  Del Response Value */
+    public static int DEL_RESPONSE_VALUE = 2;
+
+    /**  Del Response Ldap Result (we will switch the grammar here) */
+    public static int DEL_RESPONSE_LDAP_RESULT = 3;
+
+    /** Last state */
+    public static int LAST_DEL_RESPONSE_STATE = 4;
+
+    //=========================================================================
     // LdapResult grammar states 
     //=========================================================================
     /** LdapResult Code Tag */
@@ -382,18 +400,24 @@
     /** AbandonRequest number */
     public static final int ABANDON_REQUEST_GRAMMAR = 6;
 
-    /** AddRequest Grammar */
+    /** AddResponse Grammar */
     public static final int ADD_RESPONSE_GRAMMAR_SWITCH = 0x0800;
 
-    /** AddRequest number */
+    /** AddResponse number */
     public static final int ADD_RESPONSE_GRAMMAR = 7;
     
-    /** AddRequest Grammar */
+    /** CompareResponse Grammar */
     public static final int COMPARE_RESPONSE_GRAMMAR_SWITCH = 0x0900;
 
-    /** AddRequest number */
+    /** CompareResponse number */
     public static final int COMPARE_RESPONSE_GRAMMAR = 8;
     
+    /** DelResponse Grammar */
+    public static final int DEL_RESPONSE_GRAMMAR_SWITCH = 0x0A00;
+
+    /** DelResponse number */
+    public static final int DEL_RESPONSE_GRAMMAR = 9;
+    
     /** The total number of grammars used */
     public static final int NB_GRAMMARS = 20;
 
@@ -412,7 +436,8 @@
             "UNBIND_REQUEST_GRAMMAR_SWITCH",
             "ABANDON_RESPONSE_GRAMMAR_SWITCH",
             "ADD_RESPONSE_GRAMMAR_SWITCH",
-            "COMPARE_RESPONSE_GRAMMAR_SWITCH"
+            "COMPARE_RESPONSE_GRAMMAR_SWITCH",
+            "DEL_RESPONSE_GRAMMAR_SWITCH"
         };
 
     //=========================================================================
@@ -552,6 +577,16 @@
             "COMPARE_RESPONSE_LDAP_RESULT"
         };
 
+    /** A string representation of all the Del Response states */
+    private static String[] DelResponseString =
+        new String[]
+        {
+            "DEL_RESPONSE_TAG", 
+            "DEL_RESPONSE_LENGTH",
+            "DEL_RESPONSE_VALUE",
+            "DEL_RESPONSE_LDAP_RESULT"
+        };
+
     /** The instance */
     private static LdapStatesEnum instance = new LdapStatesEnum();
 
@@ -594,6 +629,7 @@
             case ABANDON_REQUEST_GRAMMAR : return "ABANDON_REQUEST_GRAMMAR";
             case ADD_RESPONSE_GRAMMAR : return "ADD_RESPONSE_GRAMMAR";
             case COMPARE_RESPONSE_GRAMMAR : return "COMPARE_RESPONSE_GRAMMAR";
+            case DEL_RESPONSE_GRAMMAR : return "DEL_RESPONSE_GRAMMAR";
         	default : return "UNKNOWN";
         }
     }
@@ -641,6 +677,10 @@
         {
             return "COMPARE_RESPONSE_GRAMMAR";
         }
+        else if (grammar instanceof DelResponseGrammar)
+        {
+            return "DEL_RESPONSE_GRAMMAR";
+        }
         else 
         {
             return "UNKNOWN GRAMMAR";
@@ -694,6 +734,9 @@
 
                 case COMPARE_RESPONSE_GRAMMAR :
                     return ( ( state == GRAMMAR_END ) ? "COMPARE_RESPONSE_END_STATE" : CompareResponseString[state]
);
+
+                case DEL_RESPONSE_GRAMMAR :
+                    return ( ( state == GRAMMAR_END ) ? "DEL_RESPONSE_END_STATE" : DelResponseString[state]
);
 
                 default :
                     return "UNKNOWN";



Mime
View raw message